Stegstr
Command line

Two CLIs, one repository

The Node CLI runs from a bare clone with nothing installed and speaks the robust hiding method. The Rust CLI needs a one-time build and adds JSON contracts, stable exit codes, channel calibration and an MCP server. Both read every Stegstr image format.

Node CLI

Requires Node 18 or newer. The bundle at dist-cli/stegstr.mjs is committed with no runtime dependencies, so it works offline and inside sandboxes where npm install cannot run.

git clone https://github.com/brunkstr/Stegstr.git && cd Stegstr
node dist-cli/stegstr.mjs selftest
node dist-cli/stegstr.mjs modes
node dist-cli/stegstr.mjs capacity cover.jpg --mode standard
node dist-cli/stegstr.mjs embed cover.jpg -o out.jpg --payload "hello"
node dist-cli/stegstr.mjs embed cover.jpg -o out.jpg --payload-file note.txt --mode bulk
node dist-cli/stegstr.mjs detect out.jpg
node dist-cli/stegstr.mjs detect out.jpg --out payload.bin
CommandDoesOptions
embedHides a payload; decodes its own output before exit 0-o, --payload / --payload-file / --payload-base64, --mode locator|standard|bulk, --quality N, --json
detectFinds and extracts a payload--mode or auto, --out path, --json
capacityBytes a cover can carry per mode--mode, --json
modesLists modes with payload sizes and minimum image edge--json
selftestRound-trips a built-in image; proves the install works--json

Exit codes: 0 success, 1 nothing found, 2 bad usage. Output images should be .jpg unless you control the whole path; platforms convert PNG to JPEG anyway.

Rust CLI

cd Stegstr/src-tauri && cargo build --release --bin stegstr-cli
./target/release/stegstr-cli --help
stegstr-cli decode image.jpg [--decrypt] [--json]
stegstr-cli detect image.jpg [--json]
stegstr-cli embed cover -o out --payload <string|@file> [--encrypt] [--payload-base64] [--robust | --robustness standard|max] [--json]
stegstr-cli post "content" [--privkey-hex HEX] [--ref CODE] [--output bundle.json] [--json]
stegstr-cli calibrate --sent original --received returned [--name profile] [--profiles-out path] [--json]
stegstr-cli mcp

--json emits exactly one JSON object on stdout with schemas committed under schema/cli/. Exit codes: 0 success, 1 usage or unclassified error, 2 capacity exceeded, 3 no payload found, 4 decryption failure, 5 malformed input. The CLI never prompts; --yes is accepted as a no-op.

Which one to use

For the resize-robust method and the least setup, the Node CLI. For agent tooling with typed contracts, calibration, or MCP, the Rust CLI. Unifying the two behind one capability table is on the roadmap; until then, both read each other's images.