Skip to main content

croc CLI interoperability

CrocApp embeds croc v10.5.0 as a Go library (via a gomobile-built framework) rather than shelling out to the croc binary. That means it speaks the exact same protocol as the CLI, in both directions.

note

Upstream croc released v10.6.0 after this pin was set; CrocApp has not moved to it yet.

Example: CLI sends, app receives

On a laptop, using the croc CLI:

croc send file.txt
# -> prints something like 9822-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.

Example: app sends, CLI receives

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

croc 9822-word-word-word

Self-hosted relay

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

croc --relay myserver:9009 send file.txt

In CrocApp, set the same address under the relay power option.

Feature-to-flag mapping

#Featurecroc flag / origin
F1Send files (multi)positional args
F2Send folderspositional args
F3Send text/clipboard--text
F4Receive via codepositional args
F5Custom code phrase (min 6 chars)--code
F6QR show on send / scan on receive--qrcode
F7Choose output folder--out
F8Overwrite/resume handling--overwrite
F9Incoming file list preview, accept/declineinteractive prompt
F10Progress, speed, cancel
F11LAN + relay auto racecroc default
F12Transfer history
F13Custom relay, password, IPv6--relay --relay6 --pass
F14Force local-only--local
F15Disable compression--no-compress
F16Zip folder before send--zip
F17Exclude patterns / .gitignore--exclude --git
F18Auto-accept toggle--yes
F19Both-sides confirm--ask

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. Using a current, non-ancient croc CLI on the other end is the safest bet.