croc: A Command-line Tool for Secure Cross-Device File Transfer
croc is an open-source command-line file transfer tool that lets two computers on different networks or operating systems send files directly to each other with a single passphrase, end-to-end encrypted, with resumable transfers and support for multiple files at once.
Project facts
GitHub Ecosystem- License
- MIT
- Language
- Go
- Stars
- 40,443
- Data checked
- 2026-09-25
Snapshot figures reflect the check date and may change over time.
Sending a file between two computers that aren’t on the same local network usually means uploading to cloud storage and sharing a link, or shuttling a USB drive between them. croc offers a more direct route: this open-source command-line tool, written in Go, has the sender run one command to get a passphrase, which the receiver then types into another machine — the file transfers peer-to-peer, end-to-end encrypted the whole way. GitHubDaily recommended it back in April 2025.
Core features
- Passphrase as the key: the passphrase generated on send completes key agreement via PAKE, establishing an end-to-end encrypted channel between sender and receiver; you can swap the encryption curve with
--curve p521. - Cross-platform interoperability: works on Windows, macOS, and Linux, plus a browser version that’s fully compatible with the CLI and can send or receive with it interchangeably — accessible directly at getcroc.com.
- Resumable transfers: if a transfer is interrupted, it can resume from where it left off rather than starting over.
- Multiple files and piping: send multiple files or an entire folder at once, pipe data via stdin/stdout, send plain text with
--text, or generate a QR code with--qrfor a phone to scan. - Zero-config direct connection: no server or port forwarding to set up — it prefers a direct P2P connection and automatically falls back to a relay when that’s not possible; it can also route through a
--socks5proxy such as Tor. - Self-hosted relay:
croc relayspins up a relay with a single command, and it’s just as easy to deploy with Docker; point clients at it with--relayand--pass.
Typical use cases
- Sending large files or entire folders directly across networks and operating systems (say, between Windows and Mac) without routing through third-party cloud storage.
- The sender generates a QR code with
--qrso the recipient can scan it with a phone browser or the F-Droid client to receive the file. - Developers piping command output with
cat file | croc send, or sending links and text snippets withcroc send --text; teams that need it can also run their own relay.
Quick start
Install (Homebrew on macOS, or the official script on any system):
brew install croc
curl https://getcroc.com | bash
Then transferring takes two steps: the sender runs croc send <file-or-folder>, and the terminal prints a passphrase; the receiver runs croc <passphrase> on another computer to start receiving.
Summary
croc suits anyone who wants to securely send files directly between two devices without relying on cloud storage or a USB drive: those comfortable with the command line can complete a transfer in two commands, and non-technical users have a browser version, an Android client, and community GUIs to choose from. The project is MIT-licensed and written in Go. Two things worth noting: on Linux or macOS, it’s recommended to pass the passphrase via the CROC_SECRET environment variable when receiving, so it doesn’t show up in the process list; and when a direct P2P connection isn’t possible, transfers fall back to a public relay, which the README describes as best-effort and possibly subject to fairness limits — anyone who cares about speed or availability can self-host a relay instead.