croc: Open-Source CLI File Transfer Tool — Secure, Cross-Platform, Zero Config
croc: Open-Source CLI File Transfer To…
croc is a secure, cross-platform CLI tool for transferring files between any two computers with a single command.
croc is an open-source command-line file transfer tool written in Go, featuring PAKE end-to-end encryption, cross-platform support (Windows/macOS/Linux), resumable transfers, and zero configuration. With 36,000+ GitHub stars, it lets users securely send files or folders using just a shared passphrase — no account, no setup required.
Why We Still Need a Dedicated File Transfer Tool
Cloud storage, instant messaging apps, and collaboration platforms are everywhere — cross-device file transfers seem like a solved problem. Yet friction persists in practice: WeChat compresses image quality, email attachments have size limits, cloud storage requires the recipient to log in just to download, and AirDrop only works within the Apple ecosystem. These seemingly minor inconveniences add up and significantly slow down productivity.
The open-source project croc was built to solve exactly this problem. It's a command-line tool written in Go, with a core mission of "easily and securely sending things from one computer to another." The project has amassed over 36,000 stars on GitHub, gaining 511 stars in a single day — a testament to its popularity and reputation in the developer community.
Core Features of croc
End-to-End Encryption for Secure Transfers
croc's most important selling point is security. It uses PAKE (Password-Authenticated Key Exchange) to negotiate encryption keys. PAKE is a cryptographic protocol that allows two parties to securely derive a strong encryption key from nothing more than a shared low-entropy password (like a short set of words), while resisting both man-in-the-middle attacks and offline dictionary attacks. The core idea is to weave the password into the mathematics of Diffie-Hellman key exchange, making it impossible for an attacker who intercepts all transmitted data to recover the key without knowing the password.
The sender and receiver only need to share a short passphrase, allowing them to establish an end-to-end encrypted transfer channel without ever exposing the passphrase to the relay server. In other words, even if data is routed through a public relay server, the relay operator cannot decrypt the file contents. This design balances convenience with privacy and security — making it especially well-suited for transferring sensitive documents like contracts or identification files.
Truly Cross-Platform, Any Content
croc natively supports all major operating systems — Windows, macOS, and Linux — breaking free from single-ecosystem limitations. Whether you're transferring between Windows and Mac, or between a Linux server and a personal laptop, the experience is identical.
Beyond single files, croc supports entire folders, multiple files in batch, and even plain text snippets. For developers who need to quickly sync code, config files, or logs between machines, this flexibility is particularly valuable.
Resumable Transfers — No Starting Over
Network interruptions during large file transfers are incredibly frustrating. croc has built-in resumable transfer support, implemented via file chunking: before sending, the file is split into fixed-size blocks, each with a checksum hash. The receiver tracks which blocks have been successfully received, and upon reconnection, both sides negotiate via a handshake to resume from the right block, skipping what's already been completed. This approach mirrors HTTP Range requests and BitTorrent's piece-based downloading — industry-standard practice for reliable large file transfers. For cross-region transfers or unstable network conditions, resumability is a highly valuable reliability guarantee.
Minimal User Experience: One Command to Send a File
Using croc is almost aggressively simple. The sender runs a single command in the terminal:
croc send myfile.txt
The tool immediately generates a random passphrase (e.g., 1234-word-word-word). The receiver runs on their machine:
croc 1234-word-word-word
The transfer begins instantly. No account registration, no server configuration, no network parameters to fiddle with. This "zero cognitive overhead" design is precisely why it spreads so quickly among developers.
Relay Mechanism: Public Convenience and Private Control
croc relies on a relay server under the hood to coordinate connections between the two parties. In modern networks, most devices sit behind NAT (Network Address Translation) without a public IP, making direct TCP connections impossible. croc's relay server acts as a "signaling coordinator," helping both sides complete the handshake and establish a connection — once established, croc attempts TCP hole-punching for a direct peer-to-peer connection. If direct connection fails, data is relayed through the server, but remains end-to-end encrypted throughout — the relay cannot read the content. This design draws inspiration from WebRTC's STUN/TURN approach, balancing NAT traversal capability with privacy protection.
The project's public relay is used by default for instant, out-of-the-box use. For teams with higher security or compliance requirements, croc also supports self-hosted relay servers, giving you full control over the entire data flow. This dual-track design — public for convenience, private for control — serves both individual users who need something quick and enterprise environments with strict compliance requirements.
croc vs. Similar Tools
The file transfer space has no shortage of competitors — Magic Wormhole, rsync, and scp are all common choices. Where does croc differentiate itself?
- vs. scp/rsync: croc requires no pre-configured SSH keys or knowledge of the recipient's IP address. A passphrase is all you need, making the barrier to entry extremely low.
- vs. Magic Wormhole: Both are based on PAKE, but croc is written in Go and compiled into a single binary. Go statically links all dependencies into a single executable at compile time — no runtime environment needs to be pre-installed on the target machine. This contrasts sharply with Magic Wormhole's requirement for a Python interpreter and a collection of dependency packages, often sidestepping version conflicts in controlled enterprise or server environments, making distribution and installation far simpler.
- vs. Cloud Storage: croc coordinates a direct peer-to-peer connection via the relay, eliminating the need to upload files to third-party storage before the recipient downloads them — resulting in faster transfers and better privacy.
The combination of "single binary, zero dependencies, passphrase-based transfer" gives croc a unique niche in lightweight, instant file transfer scenarios.
Who Is croc Best Suited For
croc is particularly well-suited for the following use cases and users:
- Developers and DevOps engineers: Quickly moving scripts, configs, and log files between multiple servers and local machines.
- Privacy-conscious users: Transferring sensitive files without wanting data to pass through third-party cloud storage.
- Cross-platform workers: Frequently exchanging files in mixed Windows, Mac, and Linux environments.
Conclusion
croc's success reaffirms a simple truth: great tools do less, not more. No flashy GUI, no bloated feature stacks — just doing one thing to perfection: transferring files securely, simply, and across any platform.
If you're still frustrated by the friction of moving files between devices, give this open-source "little crocodile" a chance — it might just become the handiest tool in your toolkit.
Related articles

The Open-Weights Model Debate: Balancing Safety and Openness
An in-depth analysis of the open-weights model debate: public release brings transparency and innovation, but raises safety and misuse risks. Exploring tiered release, red-teaming, and governance challenges.

How Complaining Erodes Your Mind: Understanding the Self-Reinforcing Nature of Attention
Habitual complaining trains your brain to find more negativity, creating a vicious cycle. Learn about the self-reinforcing nature of attention and practical ways to break free from negative loops.

The Depth Perception Challenge for Transparent Objects: How LingBot-Depth Breaks Through with Masked Depth Modeling
Depth perception for transparent and reflective objects has long been a core challenge in robotic grasping. LingBot-Depth uses masked depth modeling to turn sensor failure into supervisory signals, inferring glass depth from RGB context.