Skip to main content

croc CLI interoperability

CrocApp embeds croc v11.5.5 as a Go library rather than shelling out to the croc binary. That means it speaks the exact same protocol as the CLI, in both directions.

note

The other device needs croc 11 or newer. A croc 10 device cannot complete a transfer with CrocApp.

Example: CLI sends, app receives​

On a laptop, using the croc CLI:

croc send file.txt
# -> prints a code like word-word-word

On your phone or Mac, open Receive in CrocApp and enter the printed code. The file arrives exactly as if the sender had also used CrocApp.

The CLI's --qrcode flag shows a QR code of https://getcroc.com/?code=<code>. On iOS, scan it with Scan QR Code in CrocApp, or paste that link into the Receive field: CrocApp reads the code from it. See Code phrases.

Example: app sends, CLI receives​

Start a send in CrocApp, get the code phrase it displays, then on another machine:

CROC_SECRET=word-word-word croc

Self-hosted relay​

Both devices need to agree on the relay. From the CLI:

croc --relay myserver:9009 send file.txt

In CrocApp, set the same address under Relay in Settings.

Large files and --transport​

CrocApp has no --transport setting. It carries every transfer over croc's relay or the local network, and it never uses Tailcat, the direct connection that croc's command line can try for sends of 128 MiB or more. A command-line sender on the default --transport auto sends a large file to CrocApp, or receives one from it, over the relay as usual.

--transport derp is the exception. It makes the sender use Tailcat only, which CrocApp does not have. Receiving from a sender that uses it fails with "peer requires Tailcat, but Tailcat is disabled or unavailable locally". Send again without that flag, or with --transport relay.

croc send --transport relay file.txt

Settings and croc flags​

In CrocAppcroc flag
Custom code phrase (at least 6 characters)--code
Send text or clipboard--text
QR code on send and scan on receive--qrcode
Receive folder--out
Keep Both and Replace--rename and --overwrite
Relay Address, IPv6 Address, Password--relay, --relay6, --pass
Local Network Only--local
Disable Compression--no-compress
Zip Folders Before Sending--zip
Patterns, one per line and Respect .gitignore--exclude and --git
Auto-Accept Transfers--yes
Confirm on Both Sides--ask

The file list preview, progress and history are CrocApp's own. The croc command line has no equivalent.

Version and relay compatibility​

Because CrocApp links croc's own library code rather than reimplementing the protocol, relay and protocol compatibility follow whatever croc itself supports at the pinned version, so the other end needs croc 11 or newer. With no custom relay, both sides pick the same relay from croc's public pool by the code, so there is nothing to set.