Repolode
schollz

schollz/croc

A CLI tool that sends files and folders between any two computers, peer-to-peer with relay fallback and end-to-end encryption via a shared code phrase.

Open-source alternative to:WeTransferAirDrop

Stars
40,872
Forks
1,653
Open issues
5
Last commit
3 days ago

What is it?

croc lets any two computers transfer files and folders from a terminal or a browser. The sender runs `croc send` and gets a short code phrase; the receiver enters that phrase, and the two clients establish a password-authenticated key exchange (PAKE) that produces a key for end-to-end encryption. Connections try to go peer-to-peer and fall back to a relay when a direct path is not available, so no port forwarding or local server is needed.

Beyond single files, croc sends multiple files and folders in one transfer, can resume interrupted transfers, and works across Windows, Linux, macOS, and a browser client at getcroc.com that interoperates with the CLI. It can route traffic through a SOCKS5 proxy such as Tor, and it can be self-hosted by running `croc relay` on your own server. Newer versions add an optional encrypted temporary storage mode for asynchronous sharing and a `croc ssh` command for a shared terminal session.

Key features

  • 01Peer-to-peer transfers with relay fallback, so no port forwarding is needed.
  • 02End-to-end encryption derived from a shared code phrase using PAKE.
  • 03Sends multiple files and folders in one transfer, with resumable interrupted transfers.
  • 04Works on Windows, Linux, macOS, and in the browser, interoperating with the CLI.
  • 05Supports SOCKS5 proxies such as Tor and self-hosted relays.

Use cases

  • Sending a large file or folder to a colleague without setting up a server or cloud share.
  • Transferring files between your own laptop and desktop on different networks.
  • Sharing files with someone who only has a browser by sending them a link or QR code.
  • Scripting file transfers in automation via pipes and quiet mode.

Quick start

  1. 1

    Install croc with Homebrew on macOS

    brew install croc
  2. 2

    Send a file or folder and note the code phrase it prints

    croc send [file(s)-or-folder]
  3. 3

    On the other computer, receive using the code phrase

    croc code-phrase

In collections

Topics

FAQ

What is croc?
A CLI tool that sends files and folders between any two computers, peer-to-peer with relay fallback and end-to-end encryption via a shared code phrase. croc lets any two computers transfer files and folders from a terminal or a browser. The sender runs `croc send` and gets a short code phrase; the receiver enters that phrase, and the two clients establish a password-authenticated key exchange (PAKE) that produces a key for end-to-end encryption. Connections try to go peer-to-peer and fall back to a relay when a direct path is not available, so no port forwarding or local server is needed.
Is croc free to use? What license does it have?
croc is open source under the MIT license. Check the license terms before using it in commercial products.
Is croc still maintained?
Actively maintained. The last commit to croc was on Nov 4, 2026.
What can I use croc for?
Sending a large file or folder to a colleague without setting up a server or cloud share. Transferring files between your own laptop and desktop on different networks. Sharing files with someone who only has a browser by sending them a link or QR code. Scripting file transfers in automation via pipes and quiet mode.
How do I install croc?
Install croc with Homebrew on macOS: brew install croc Send a file or folder and note the code phrase it prints: croc send [file(s)-or-folder] On the other computer, receive using the code phrase: croc code-phrase
Where can I get croc?
The source code and installation instructions are on GitHub: https://github.com/schollz/croc

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects

Command-line AirDrop for Linux, letting iPhones and Linux machines send files to each other over AWDL on supported non-Apple Wi-Fi cards.

3.3K+86 this week256RustMITWell maintainedUpdated 4 days ago