rust/ contains the Rust workspace for the integrated rusty-claude-cli deliverable.
It is intended to be something you can clone, build, and run directly.
rust/
├── Cargo.toml
├── Cargo.lock
├── README.md
└── crates/
├── api/ # Anthropic API client + SSE streaming support
├── commands/ # Shared slash-command metadata/help surfaces
├── compat-harness/ # Upstream TS manifest extraction harness
├── runtime/ # Session/runtime/config/prompt orchestration
├── rusty-claude-cli/ # Main CLI binary
└── tools/ # Built-in tool implementations
rustup, stable toolchain)From the repository root:
cd rust
cargo build --release -p rusty-claude-cli
The optimized binary will be written to:
./target/release/rusty-claude-cli
Run the verified workspace test suite used for release-readiness:
cd rust
cargo test --workspace --exclude compat-harness
cd rust
cargo run -p rusty-claude-cli -- --help
cd rust
cargo run -p rusty-claude-cli -- --version
Configure settings.json with an oauth block containing clientId, authorizeUrl, tokenUrl, optional callbackPort, and optional scopes, then run:
cd rust
cargo run -p rusty-claude-cli -- login
This opens the browser, listens on the configured localhost callback, exchanges the auth code for tokens, and stores OAuth credentials in ~/.claude/credentials.json (or $CLAUDE_CONFIG_HOME/credentials.json).
cd rust
cargo run -p rusty-claude-cli -- logout
This removes only the stored OAuth credentials and preserves unrelated JSON fields in credentials.json.
Send one prompt, stream the answer, then exit:
cd rust
cargo run -p rusty-claude-cli -- prompt "Summarize the architecture of this repository"
Use a specific model:
cd rust
cargo run -p rusty-claude-cli -- --model claude-sonnet-4-20250514 prompt "List the key crates in this workspace"
Restrict enabled tools in an interactive session:
cd rust
cargo run -p rusty-claude-cli -- --allowedTools read,glob
Start the interactive shell:
cd rust
cargo run -p rusty-claude-cli --
Inside the REPL, useful commands include:
/help
/status
/model claude-sonnet-4-20250514
/permissions workspace-write
/cost
/compact
/memory
/config
/init
/diff
/version
/export notes.txt
/sessions
/session list
/exit
Inspect or maintain a saved session file without entering the REPL:
cd rust
cargo run -p rusty-claude-cli -- --resume session-123456 /status /compact /cost
You can also inspect memory/config state for a restored session:
cd rust
cargo run -p rusty-claude-cli -- --resume ~/.claude/sessions/session-123456.json /memory /config
prompt <text...> — run one prompt non-interactively--resume <session-id-or-path> [/commands...] — inspect or maintain a saved session stored under ~/.claude/sessions/dump-manifests — print extracted upstream manifest countsbootstrap-plan — print the current bootstrap skeletonsystem-prompt [--cwd PATH] [--date YYYY-MM-DD] — render the synthesized system prompt--help / -h — show CLI help--version / -V — print the CLI version and build info locally (no API call)--output-format text|json — choose non-interactive prompt output rendering--allowedTools <tool[,tool...]> — restrict enabled tools for interactive sessions and prompt-mode tool use/help — show command help/status — show current session status/compact — compact local session history/model [model] — inspect or switch the active model/permissions [read-only|workspace-write|danger-full-access] — inspect or switch permissions/clear [--confirm] — clear the current local session/cost — show token usage totals/resume <session-id-or-path> — load a saved session into the REPL/config [env|hooks|model] — inspect discovered Claude config/memory — inspect loaded instruction memory files/init — create a starter CLAUDE.md/diff — show the current git diff for the workspace/version — print version and build metadata locally/export [file] — export the current conversation transcript/sessions — list recent managed local sessions from ~/.claude/sessions//session [list|switch <session-id>] — inspect or switch managed local sessions/exit — leave the REPLANTHROPIC_API_KEY — highest-precedence API credentialANTHROPIC_AUTH_TOKEN — bearer-token override used when no API key is set~/.claude/credentials.json — used when neither env var is setANTHROPIC_BASE_URL — override the Anthropic API base URLANTHROPIC_MODEL — default model used by selected live integration testsRUSTY_CLAUDE_PERMISSION_MODE — default REPL permission mode (read-only, workspace-write, or danger-full-access)CLAUDE_CONFIG_HOME — override Claude config discovery rootCLAUDE_CODE_REMOTE — enable remote-session bootstrap handling when supportedCLAUDE_CODE_REMOTE_SESSION_ID — remote session identifier when using remote modeCLAUDE_CODE_UPSTREAM — override the upstream TS source path for compat-harness extractionCLAWD_WEB_SEARCH_BASE_URL — override the built-in web search service endpoint used by toolingcompat-harness exists to compare the Rust port against the upstream TypeScript codebase and is intentionally excluded from the requested release test run.