Modernized fork of Sha with a clearer UI, cleaner codebase, and faster WebRTC file transfers.
翻译准备中
正在加载完整 README。 以下为已保存的摘录。
• Anyone → anyone: pick files in the browser or run cdx send, share the 5-digit code, and the receiver
types it into the Receive box, scans the QR code, or runs cdx receive. Several files arrive as one .zip.
CD never stores files. Transfers are live and end-to-end encrypted.
The shell installers check release checksums. The CLI is named cdx because cd is a shell builtin.
Without the CLI, type the code into the Receive box on cd.yash0.in.
To send from a browser to a terminal, use cd.yash0.in/send.查看完整 README ↗Fast, private file handoffs: cd.yash0.in
cdx send <file>, share the 5-digit code, and the receiver
types it into the Receive box, scans the QR code, or runs cdx receive <code>. Several files share one code and arrive as separate files.CD never stores files. Transfers are live and end-to-end encrypted.
cdx| Platform | Command |
|---|---|
| Linux / macOS | curl -fsSL https://cd.yash0.in/install.sh | sh |
| Windows (PowerShell) | irm https://cd.yash0.in/install.ps1 | iex |
| Go 1.26+ | go install github.com/YashasVM/cd/cmd/cdx@latest |
The shell installers check release checksums. The CLI is named cdx because cd is a shell builtin.
cdx send ./report.pdf # shows a code and QR in a terminal
cdx send ./shots ./notes.md # several files, one code; they arrive separately
cdx send --json --qr ./receive-qr.png ./report.pdf # QR image for chat
cdx send --link ./secret.zip # private end-to-end encrypted link instead of a code
cdx receive 48291 # save to the current directory
cdx receive 48291 --out ~/Downloads
Without the CLI, open https://cd.yash0.in/#<code> (for example
cd.yash0.in/#48291) or type the code into the
Receive box on cd.yash0.in.
To send from a browser to a terminal, use cd.yash0.in/send.
| Command | What it does |
|---|---|
cdx status [transfer-ID or code] | List background sends |
cdx wait <code> | Exit 0 once the receiver has verified every byte, or 1 if the transfer failed |
cdx wait --timeout 5m <code> | Same, but exit 3 if the receiver hasn't finished by then (the send keeps going) |
cdx update | Update cdx to the latest release (checksum-verified) |
--json | Machine-readable output, including {"error":{"kind","message"}} on failure and explicit retry guidance |
--qr <path> | Save a QR PNG locally; JSON includes its absolute qrPath. The output path must not exist. |
--wait / --detach | Force foreground or background sending |
Behavior: in a terminal, send displays a share card with a scannable QR and waits until the
receiver verifies the file. Captured stdout holds only the code (or compact JSON with --json). Progress is opt-in with --progress for captured output. When stdout isn't a terminal (agents, scripts, pipes), it detaches as soon as
the code is live. Codes expire after 15 minutes and admit one receiver.
Files of 1 MiB or more switch to a direct WebRTC path mid-transfer when the network allows it.
For safe retries of a detached send, use cdx send --request-id <unique-id> --json <path>.
Repeating the same request returns the original transfer; changing its input fails explicitly.
Status history is stored by transfer ID, so reused codes do not overwrite earlier sends.
To keep verified progress across interruptions, use the opt-in resume protocol:
cdx send --resumable --json ./report.pdf
cdx send --resume <transfer-ID> --json ./report.pdf
cdx receive --resume '<private-v2-link>' --out ./report.pdf
Resumable CLI sends stay in the foreground and use private links. Receiver checkpoints are kept beside the output; sender records live in the private CLI state directory. Reselect the same file and private link in the browser to resume a send; reopen the link in the same browser to resume a receive. Restart the sender first and wait for its private link to appear, then reconnect the receiver. Browser resume requires OPFS storage. Records expire after 24 hours. Resume verifies the source and retained prefix and uses fresh session keys. This first resumable protocol uses the relay; ordinary transfers retain direct WebRTC transport. Explicit browser cancellation discards saved progress; CLI receiver cancellation does too, while interrupting the sender retains its resume record.
Security: a 5-digit code lets the relay hold the transfer key so the code is easy to type, so anyone who
guesses a live code can receive the file. For sensitive files, use --link: the key stays in the URL fragment,
which never reaches the server. Details are in SECURITY.md and the protocol spec.
Agents should follow AGENTS.md and the file-sharing skill.
To teach the AI coding agents on your machine to share files with cdx, run cdx agent setup (the
installer offers it too). It asks per agent: Claude Code and ~/.agents/skills get the skill; Codex,
Gemini CLI and opencode get a short note in their global instructions file. cdx agent remove undoes it.
Or install just the skill with npx skills add YashasVM/cd.
Browser / cdx ── encrypted WebSocket ── CD relay (Durable Object) ── Browser / cdx
└─ direct WebRTC upgrade for large files from cdx ─┘
One Cloudflare Worker serves the UI, signaling, relay (/ws/v1), and code directory (/api/codes).
Each transfer gets its own Durable Object room. Rooms hold one sender and one receiver, limit memory use,
expire on their own, and keep no file data.
Developers can embed live encrypted transfers with the Android SDK and sample, without requiring the CD app. See the third-party integration RFC for the broader platform plan.
This checkout includes experimental CLI pairing and the device relay. A compatible native receiver is required; Android app sources and an APK are not included here. With a receiver available, build the CLI and run:
go build -o ./bin/cdx-dev ./cmd/cdx
./bin/cdx-dev pair --name phone
./bin/cdx-dev devices
./bin/cdx-dev send --to phone ./report.pdf
以上为 README 的开头部分。其余内容请阅读原文。 查看完整 README ↗