dropall-cli
v1.0.2
Published
CLI tool for uploading and downloading files from a Dropall P2P room
Maintainers
Readme
dropall-cli
A command-line client for Dropall — the browser-based P2P file transfer app. Upload and download files from any Dropall room without opening a browser.
Installation
# Install Volta if needed:
# https://volta.sh
curl https://get.volta.sh | bash
# From this cli directory, pin the expected toolchain
volta pin [email protected]
volta pin [email protected]
# Install dependencies
pnpm install
# Build the package
pnpm build
# Link the CLI globally for local use
npm link
dropall <command> [options]For development without linking globally:
pnpm exec tsx src/cli.ts <command> [options]Commands
upload — Share a file in a room
dropall upload <file> [options]Announces the file to the room and keeps serving it until you press Ctrl-C. When you quit, the file is automatically removed from the room.
| Option | Short | Default | Description |
|---|---|---|---|
| --room <id> | -r | required | Room ID to join |
| --username <name> | -u | CLI-User | Your display name |
| --server <url> | -s | https://dropallp2p-ebrv57bf.manus.space | Dropall server URL |
| --password <pwd> | -p | — | Room password (if locked) |
| --port <n> | | 0 (random) | Local HTTP port to serve the file on |
Example:
dropall upload ./report.pdf --room my-room --username Alicedownload — Download a file from a room
dropall download [options]If --file-id is supplied, downloads that file immediately. Otherwise, an interactive picker lists all files in the room and lets you choose.
| Option | Short | Default | Description |
|---|---|---|---|
| --room <id> | -r | required | Room ID to join |
| --username <name> | -u | CLI-User | Your display name |
| --file-id <id> | -f | — | ID of the specific file to download |
| --output <dir> | -o | current directory | Directory to save the downloaded file |
| --server <url> | -s | https://dropallp2p-ebrv57bf.manus.space | Dropall server URL |
| --password <pwd> | -p | — | Room password (if locked) |
Examples:
# Interactive picker
dropall download --room my-room --username Bob --output ~/Downloads
# Direct download by file ID
dropall download --room my-room --username Bob --file-id abc123xyz --output ~/Downloadslist — List files in a room
dropall list [options]Connects to the room, prints all currently shared files (ID, name, size, uploader, age), then exits.
| Option | Short | Default | Description |
|---|---|---|---|
| --room <id> | -r | required | Room ID |
| --username <name> | -u | CLI-User | Your display name |
| --server <url> | -s | https://dropallp2p-ebrv57bf.manus.space | Dropall server URL |
| --password <pwd> | -p | — | Room password (if locked) |
| --json | | — | Output raw JSON instead of a table |
Example:
dropall list --room my-room
dropall list --room my-room --json | jq '.[].name'Transfer Architecture
CLI uploader CLI downloader
│ │
│ 1. join-room (Socket.IO) │
│ 2. file-announce (with httpUrl) │
│─────────────────────────────────► │
│ │ 3. join-room
│ │ 4. receive room-files (with httpUrl)
│ │
│ ◄── HTTP GET /files/<id> ─────────│
│ 5. stream chunks (Dropall v1) │
│─────────────────────────────────► │
│ │ 6. reassemble & save to diskWhen the uploader is a browser peer, the CLI falls back to the standard WebRTC data channel path. This requires the optional wrtc package:
pnpm add wrtc --optionalIf wrtc is not installed, the CLI prints the browser URL so you can download manually.
Room Locking
Locked rooms require a password for all operations. Pass --password <pwd> to any command. If the room is locked and no password is supplied, the CLI exits with a clear error message.
Running Against a Local Server
# Start the Dropall server locally (from the dropall-clone directory)
pnpm dev
# Use the CLI against it
dropall upload ./file.txt --room test --server http://localhost:3000
dropall list --room test --server http://localhost:3000
dropall download --room test --server http://localhost:3000Development
pnpm install
pnpm build
pnpm exec tsx src/cli.ts --helpTypeScript source is in src/. The CLI uses:
- socket.io-client — signalling
- express — local HTTP file server (upload command)
- commander — argument parsing
- inquirer — interactive prompts
- chalk — terminal colours
- ora — spinners
- node-fetch — HTTP client
