Add a clap-driven Rust CLI entrypoint with interactive and prompt modes, terminal markdown rendering, syntax-highlighted streamed output, and raw-mode input handling for the CLI workstream. The slice stays self-contained in rusty-claude-cli while preserving the existing manifest/bootstrap utilities and making workspace clippy verification pass again.\n\nConstraint: This parallel worktree owns only the CLI rendering and terminal UI slice\nConstraint: .omx artifacts must stay uncommitted\nRejected: Pull in a full TUI framework such as ratatui | unnecessary scope for the requested slice\nConfidence: medium\nScope-risk: moderate\nReversibility: clean\nDirective: Replace the demo response path with real runtime integration before treating this as production chat UX\nTested: cargo fmt; cargo test --workspace; cargo clippy --workspace --all-targets -- -D warnings; cargo run -p rusty-claude-cli -- --help; cargo run -p rusty-claude-cli -- --output-format text prompt 'stream me some markdown'\nNot-tested: Interactive raw-mode key handling in a real terminal/TTY session
Rust port foundation
This directory contains the first compatibility-first Rust foundation for a drop-in Claude Code CLI replacement.
Current milestone
This initial milestone focuses on harness-first scaffolding, not full feature parity:
- a Cargo workspace aligned to major upstream seams
- a placeholder CLI crate (
rusty-claude-cli) - runtime, command, and tool registry skeleton crates
- a
compat-harnesscrate that reads the upstream TypeScript sources in../src/ - tests that prove upstream manifests/bootstrap hints can be extracted from the leaked TypeScript codebase
Workspace layout
rust/
├── Cargo.toml
├── README.md
├── crates/
│ ├── rusty-claude-cli/
│ ├── runtime/
│ ├── commands/
│ ├── tools/
│ └── compat-harness/
└── tests/
How to use
From this directory:
cargo fmt --all
cargo check --workspace
cargo test --workspace
cargo run -p rusty-claude-cli -- --help
cargo run -p rusty-claude-cli -- dump-manifests
cargo run -p rusty-claude-cli -- bootstrap-plan
Design notes
The shape follows the PRD's harness-first recommendation:
- Extract observable upstream command/tool/bootstrap facts first.
- Keep Rust module boundaries recognizable.
- Grow runtime compatibility behind proof artifacts.
- Document explicit gaps instead of implying drop-in parity too early.
Relationship to the root README
The repository root README explains the leaked TypeScript codebase. This document tracks the Rust replacement effort that lives in rust/.