A terminal-based BitTorrent client with an interactive TUI
npm install torm

Torm is a terminal-based BitTorrent client built with TypeScript and Ink. It provides both an interactive terminal user interface (TUI) and a command-line interface (CLI) for managing torrents.
- Full-screen interactive TUI with keyboard navigation
- Command-line interface for scripting and automation
- Background daemon for persistent downloads
- Support for magnet links and .torrent files
- Drag-and-drop support for adding multiple torrents
- Real-time download/upload speed monitoring
- Peer and tracker information display
- Configurable download paths and settings
- Labels for organizing torrents
macOS / Linux:
``bash`
curl -fsSL https://raw.githubusercontent.com/realAndi/torm/main/scripts/install.sh | bash
Windows (PowerShell):
`powershell`
irm https://raw.githubusercontent.com/realAndi/torm/main/scripts/install.ps1 | iex
Then run torm to launch the TUI.
If you have Node.js or Bun installed:
`bash`
npm install -g tormor
bun install -g torm
`bash`
git clone https://github.com/realAndi/torm.git
cd torm
bun install
bun run build
Launch the interactive interface by running:
`bash`
torm
This opens a full-screen terminal interface for managing your torrents.
#### TUI Keyboard Shortcuts
| Key | Action |
|-----|--------|
| q | Quit application |?
| | Show/hide help overlay |Up
| / k | Select previous torrent |Down
| / j | Select next torrent |Enter
| | Open torrent details |Escape
| | Go back / clear search |a
| | Add new torrent |d
| | Delete selected torrent |p
| | Pause selected torrent |r
| | Resume selected torrent |L
| | Edit labels |S
| | Open settings |/
| | Focus search bar |Ctrl+C
| | Quit (with confirmation) |
#### Detail View
When viewing torrent details, use the number keys to switch tabs:
| Key | Tab |
|-----|-----|
| 1 | General information |2
| | Files list |3
| | Peers list |4
| | Trackers |
Run commands directly without entering the TUI:
`bash`
torm
#### Available Commands
Adding Torrents
`bashAdd a .torrent file
torm add ubuntu.torrent
Listing Torrents
`bash
List all torrents
torm listAliases
torm ls
`Torrent Information
`bash
Show detailed torrent info
torm info Alias
torm show
`Controlling Torrents
`bash
Pause a torrent
torm pause
torm stop Resume a torrent
torm resume
torm start Verify/recheck pieces
torm verify
torm recheck
`Removing Torrents
`bash
Remove torrent (keeps files)
torm remove Remove torrent and delete files
torm remove --delete-filesSkip confirmation prompt
torm remove -f
torm remove --forceAliases
torm rm
torm delete
`Daemon Management
Torm runs a background daemon to manage downloads:
`bash
Start the daemon
torm daemon startCheck daemon status
torm daemon statusStop the daemon
torm daemon stopRestart the daemon
torm daemon restart
`#### CLI Options
| Option | Description |
|--------|-------------|
|
-v, --version | Show version number |
| -h, --help | Show help |
| -c, --clipboard | Read torrent/magnet from clipboard |
| -o, --download-path | Set download path |
| -f, --force | Skip confirmation prompts |
| --delete-files | Delete files when removing torrent |
| --verbose | Show verbose output |Configuration
Torm stores configuration and data in your home directory:
- Config:
~/.config/torm/ (Linux/macOS)
- Downloads: Default download directory is configurable via settingsAccess settings through the TUI by pressing
S or configure via the config file.Architecture
Torm is organized into three layers:
- Engine: Core BitTorrent protocol implementation (tracker communication, peer management, piece selection, disk I/O)
- CLI: Command routing and argument parsing
- UI: Interactive terminal interface built with Ink/React
Known Issues
- Torrents may occasionally need to be deleted twice from the list. This is a known issue being investigated.
Development
`bash
Install dependencies
bun installRun in development mode
bun run devBuild
bun run buildRun tests
bun run testLint
bun run lintFormat code
bun run format
``Contributions are welcome. Please read CONTRIBUTING.md for guidelines.
Torm is built on the shoulders of giants. Thanks to these projects and their maintainers:
- Ink by Vadim Demedes - React for CLIs, the foundation of Torm's terminal UI
- React by Meta - The declarative UI paradigm that makes the TUI possible
- meow by Sindre Sorhus - CLI argument parsing done right
- geoip-lite - IP geolocation for peer country flags
- ink-scroll-list - Scrollable lists for Ink
- Bun by Oven - The fast JavaScript runtime that powers Torm
- TypeScript by Microsoft - Type safety for the entire codebase
- Vitest - Fast unit testing framework
Torm implements the BitTorrent protocol from scratch, guided by:
- BEP 3 - The BitTorrent Protocol Specification
- BEP 9 - Extension for Peers to Send Metadata Files
- BEP 10 - Extension Protocol
- BEP 11 - Peer Exchange (PEX)
- BEP 15 - UDP Tracker Protocol
Torm is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0).
This ensures the project remains open source and improvements stay accessible to the community.
Torm is a BitTorrent client implementing an open protocol. Users are responsible for complying with applicable laws and regulations in their jurisdiction.