The schollz/croc repository provides a powerful, open-source command-line tool designed for secure and easy file transfer between computers. Written in Go, croc enables users to send files, folders, or text between any two devices, regardless of operating system, with a focus on simplicity, security, and cross-platform compatibility. Its primary purpose is to facilitate peer-to-peer data transfer without the need for complex setup, local servers, or port forwarding, making it accessible to both technical and non-technical users.
One of croc’s standout features is its use of end-to-end encryption, leveraging the Password-Authenticated Key Exchange (PAKE) protocol. This ensures that all data transferred is protected from eavesdropping, and only the sender and recipient can access the contents. The process is initiated by generating a unique code phrase, which acts as a shared secret between the sender and receiver. This phrase can be customized, and croc supports clipboard integration for easy sharing. The encryption mechanism can be further tailored by selecting different elliptic curves or hash algorithms, providing flexibility for advanced users.
Croc is designed for maximum convenience and reliability. It supports resuming interrupted transfers, sending multiple files or folders at once, and allows for overwriting files without prompts. Users can exclude specific folders from transfers, pipe data through stdin and stdout, and send text or URLs directly. The tool also offers a QR code feature, making it easier to initiate transfers with mobile devices. For those concerned about privacy or needing to operate in restrictive network environments, croc can use proxies such as Tor, and supports IPv6 with IPv4 fallback.
Installation is straightforward, with packages available for all major operating systems, including Windows, macOS, Linux distributions, FreeBSD, and Android. Users can install croc via popular package managers like Homebrew, Scoop, Chocolatey, Winget, pacman, dnf, portage, and conda, or build from source using Go. Docker support is also provided, allowing croc to run in containerized environments. For advanced users or organizations, croc offers the ability to self-host a relay server, which can be customized for ports and used to route transfers through private infrastructure, enhancing control and privacy.
Croc’s design emphasizes ease of use, with minimal configuration required. The sending and receiving process is as simple as running a command with the file and sharing the code phrase. On Linux and macOS, additional security measures are recommended to prevent leaking the secret via process names, using environment variables for the code phrase. Quiet mode is available for scripting and automation, suppressing all output.
The project is actively maintained and has evolved through community contributions. It draws inspiration from similar tools like magic-wormhole and incorporates best practices in encryption and networking. Croc is suitable for anyone needing a reliable, secure, and cross-platform solution for transferring files, whether for personal use, collaboration, or automation. Its flexibility, strong security, and ease of use make it a standout tool in the realm of peer-to-peer file sharing.