perkoon
v0.2.4
Published
P2P file transfer CLI — send files directly between devices, no cloud required
Maintainers
Readme
perkoon
Fast P2P file transfer. No cloud. No accounts. Files go directly between devices using WebRTC.
Install
npm install -g perkoonOr use without installing:
npx perkoon send file.zipUsage
Send a file:
$ perkoon send report.pdf
✓ report.pdf (2.5 MB)
✓ Code: K7MX4QPR9W2N
Receiver command: perkoon receive K7MX4QPR9W2N
Or open in browser: https://perkoon.com/K7MX4QPR9W2N
Waiting for receiver...
✓ Receiver connected
Waiting for receiver to accept...
✓ Receiver accepted
✓ Direct connection established
✓ Complete: 2.5 MB in 0.3s (8.3 MB/s)Receive a file:
$ perkoon receive K7MX4QPR9W2N
✓ Joined session K7MX4QPR9W2N
✓ Direct connection established
✓ Saved: ./received/report.pdf
✓ Complete: 0.3s (8.3 MB/s)Or receive in the browser — open the link shown by the sender. No install needed on the receiving end. The browser user will see a file acceptance dialog, click Accept, and the file transfers directly via WebRTC.
Options
--password <pw> Protect session with a password
--timeout <sec> Wait time for peer (default: 300)
--output <dir> Where to save files (default: ./received)
--output - Write received file to stdout
--overwrite Replace existing files
--json Machine-readable JSON output
--quiet No progress outputJSON mode
For automation and AI agents, --json outputs structured events to stdout:
$ perkoon send file.zip --json --quiet
{"event":"file_ready","name":"file.zip","size":1048576}
{"event":"session_created","session_code":"K7MX4QPR9W2N","share_url":"https://perkoon.com/K7MX4QPR9W2N"}
{"event":"waiting_for_receiver"}
{"event":"receiver_connected"}
{"event":"waiting_for_acceptance"}
{"event":"transfer_accepted"}
{"event":"webrtc_connected"}
{"event":"progress","percent":50,"speed":5242880,"eta":1,"bytes_transferred":524288}
{"event":"transfer_complete","session_code":"K7MX4QPR9W2N","duration_ms":2000,"speed":5242880}Exit codes
| Code | Meaning | |------|---------| | 0 | Success | | 1 | Usage error (bad arguments) | | 2 | File error (not found, not a file) | | 3 | Network/session error | | 4 | Auth error (wrong password, access denied) | | 5 | Timeout (no peer connected) |
How it works
Files transfer directly between devices using WebRTC data channels. The perkoon.com server handles signaling only — your data never touches our servers.
CLI → CLI:
- Sender creates a session and gets a 12-character code
- Receiver joins with that code
- WebRTC peer connection is established directly
- File data flows between the two devices
CLI → Browser:
- Sender creates a session and gets a share URL
- Receiver opens the URL in any browser — no install needed
- Browser shows the file and an Accept button
- On accept, WebRTC connection is established and file transfers directly
Requirements
- Node.js >= 18
Links
- Website: https://perkoon.com
- Send files from the browser: https://perkoon.com
License
Proprietary. See LICENSE for details.
