skyplay-code/bittorrent-py — reverse-engineered prompt

Reverse engineered prompt

Build me a Python BitTorrent client I can actually use from the command line. I want to be able to start a download with either a magnet link or a torrent file, and it should handle the whole flow, finding peers, getting metadata from magnets, downloading pieces, checking integrity, and writing the files correctly, including multi file torrents.

Please make it feel solid for everyday use. Show a simple live dashboard with download speed, upload speed, progress, ETA, and peer counts. If I stop it with Ctrl C and run it again, it should resume instead of starting over. It should use normal peer discovery methods like trackers and trackerless discovery, and support peer exchange too. If possible, include automatic port forwarding and encrypted peer connections so it works better on home networks and avoids throttling.

Keep the code organized and runnable with a single main entry point. Add basic tests for the important parts. If anything is unclear, look up the current BitTorrent behavior and docs online.

Want more depth? Deep Reverse