croc — Send Files and Folders Securely Between Any Two Computers
croc is a simple CLI for sending files between computers. Run `croc send file.zip` on one side; croc prints a code; run `croc <code>` on the other side — end-to-end encrypted, NAT-traversing, zero setup.
What it is
croc is a simple CLI tool for sending files and folders between any two computers. Run croc send file.zip on one side, croc prints a code phrase, and run croc <code> on the other side. The transfer is end-to-end encrypted, traverses NATs and firewalls automatically, and requires zero configuration or account setup.
croc targets developers, sysadmins, and anyone who needs to transfer files between machines without setting up SSH, configuring cloud storage, or using email attachments. It works across operating systems and network configurations.
Why it saves time or tokens
File transfer between computers usually involves SCP (requires SSH setup), cloud storage (requires accounts), or USB drives (requires physical access). croc eliminates all of this with a single command. The relay server handles NAT traversal, so it works even when both machines are behind firewalls. For AI-assisted workflows where generated files need to move between environments, croc provides the simplest transfer method.
How to use
- Install croc:
brew install crocorcurl https://getcroc.schollz.com | bash - Send a file:
croc send myfile.zip - On the receiving machine:
croc <code-phrase>using the code shown by the sender
Example
# Sender
$ croc send presentation.pdf
Sending 'presentation.pdf' (2.4 MB)
Code is: castle-gamma-piano
On the other computer run:
croc castle-gamma-piano
# Receiver
$ croc castle-gamma-piano
Accept 'presentation.pdf' (2.4 MB)? (y/n) y
Receiving...
presentation.pdf 100% |████████████| (2.4/2.4 MB, 8.2 MB/s)
| Feature | Description |
|---|---|
| E2E encryption | PAKE-based key exchange |
| NAT traversal | Works behind firewalls |
| Cross-platform | macOS, Linux, Windows |
| Resume | Continue interrupted transfers |
| Folders | Send entire directories |
Related on TokRepo
- AI tools for devops — developer and sysadmin utilities on TokRepo
- AI tools for self-hosted — self-hosted tools and infrastructure
Common pitfalls
- The default relay server is public; for sensitive files, self-host your own relay with
croc relay - Very large transfers (multi-GB) may be slow through the public relay; direct transfers or self-hosted relays improve speed
- The code phrase expires after a configurable timeout; the receiver must enter it before the sender's session times out
Frequently Asked Questions
Yes. croc uses PAKE (Password Authenticated Key Exchange) to establish an encrypted channel using the code phrase as the shared secret. The relay server cannot read the file contents. End-to-end encryption ensures only the sender and receiver with the correct code can access the data.
Yes. Run croc relay on any server with a public IP. Configure clients to use your relay with the --relay flag. Self-hosting gives you control over the relay infrastructure and avoids sending data through the public relay server.
Yes. croc runs on macOS, Linux, Windows, FreeBSD, and Android (via Termux). You can send files from a Mac to a Windows machine or between any combination of supported platforms. The protocol is OS-agnostic.
Yes. Use croc send myfolder/ to send an entire directory. croc compresses the folder, transfers it, and decompresses it on the receiving end. The directory structure is preserved.
croc supports resumable transfers. If the connection drops during a large file transfer, re-run the same croc command with the same code and it resumes from where it left off rather than starting over.
Citations (3)
- croc GitHub— croc is a CLI for secure file transfer
- croc Security— PAKE-based key exchange for end-to-end encryption
- croc Relay— NAT traversal techniques for peer-to-peer connections
Related on TokRepo
Discussion
Related Assets
NAPI-RS — Build Node.js Native Addons in Rust
Write high-performance Node.js native modules in Rust with automatic TypeScript type generation and cross-platform prebuilt binaries.
Mamba — Fast Cross-Platform Package Manager
A drop-in conda replacement written in C++ that resolves environments in seconds instead of minutes.
Plasmo — The Browser Extension Framework
Build, test, and publish browser extensions for Chrome, Firefox, and Edge using React or Vue with hot-reload and automatic manifest generation.