docs: sync Rust README with current implementation status

This commit is contained in:
Yeachan-Heo
2026-04-05 18:08:00 +00:00
parent c3b0e12164
commit f09e03a932

View File

@@ -79,28 +79,29 @@ Primary artifacts:
| Feature | Status | | Feature | Status |
|---------|--------| |---------|--------|
| Anthropic API + streaming | ✅ | | Anthropic / OpenAI-compatible provider flows + streaming | ✅ |
| OAuth login/logout | ✅ | | OAuth login/logout | ✅ |
| Interactive REPL (rustyline) | ✅ | | Interactive REPL (rustyline) | ✅ |
| Tool system (bash, read, write, edit, grep, glob) | ✅ | | Tool system (bash, read, write, edit, grep, glob) | ✅ |
| Web tools (search, fetch) | ✅ | | Web tools (search, fetch) | ✅ |
| Sub-agent orchestration | ✅ | | Sub-agent / agent surfaces | ✅ |
| Todo tracking | ✅ | | Todo tracking | ✅ |
| Notebook editing | ✅ | | Notebook editing | ✅ |
| CLAUDE.md / project memory | ✅ | | CLAUDE.md / project memory | ✅ |
| Config file hierarchy (.claude.json) | ✅ | | Config file hierarchy (`.claw.json` + merged config sections) | ✅ |
| Permission system | ✅ | | Permission system | ✅ |
| MCP server lifecycle | ✅ | | MCP server lifecycle + inspection | ✅ |
| Session persistence + resume | ✅ | | Session persistence + resume | ✅ |
| Extended thinking (thinking blocks) | ✅ | | Cost / usage / stats surfaces | ✅ |
| Cost tracking + usage display | ✅ |
| Git integration | ✅ | | Git integration | ✅ |
| Markdown terminal rendering (ANSI) | ✅ | | Markdown terminal rendering (ANSI) | ✅ |
| Model aliases (opus/sonnet/haiku) | ✅ | | Model aliases (opus/sonnet/haiku) | ✅ |
| Slash commands (/status, /compact, /clear, etc.) | ✅ | | Direct CLI subcommands (`status`, `sandbox`, `agents`, `mcp`, `skills`, `doctor`) | ✅ |
| Hooks (PreToolUse/PostToolUse) | 🔧 Config only | | Slash commands (including `/skills`, `/agents`, `/mcp`, `/doctor`, `/plugin`, `/subagent`) | ✅ |
| Plugin system | 📋 Planned | | Hooks (`/hooks`, config-backed lifecycle hooks) | ✅ |
| Skills registry | 📋 Planned | | Plugin management surfaces | ✅ |
| Skills inventory / install surfaces | ✅ |
| Machine-readable JSON output across core CLI surfaces | ✅ |
## Model Aliases ## Model Aliases
@@ -112,87 +113,96 @@ Short names resolve to the latest model versions:
| `sonnet` | `claude-sonnet-4-6` | | `sonnet` | `claude-sonnet-4-6` |
| `haiku` | `claude-haiku-4-5-20251213` | | `haiku` | `claude-haiku-4-5-20251213` |
## CLI Flags ## CLI Flags and Commands
``` Representative current surface:
```text
claw [OPTIONS] [COMMAND] claw [OPTIONS] [COMMAND]
Options: Flags:
--model MODEL Override the active model --model MODEL
--dangerously-skip-permissions Skip all permission checks --output-format text|json
--permission-mode MODE Set read-only, workspace-write, or danger-full-access --permission-mode MODE
--allowedTools TOOLS Restrict enabled tools --dangerously-skip-permissions
--output-format FORMAT Non-interactive output format (text or json) --allowedTools TOOLS
--resume SESSION Re-open a saved session or inspect it with slash commands --resume [SESSION.jsonl|session-id|latest]
--version, -V Print version and build information locally --version, -V
Commands: Top-level commands:
prompt <text> One-shot prompt (non-interactive) prompt <text>
login Authenticate via OAuth help
logout Clear stored credentials version
init Initialize project config status
status Show the current workspace status snapshot sandbox
sandbox Show the current sandbox isolation snapshot dump-manifests
agents Inspect agent definitions bootstrap-plan
mcp Inspect configured MCP servers agents
skills Inspect installed skills mcp
system-prompt Render the assembled system prompt skills
system-prompt
login
logout
init
``` ```
For the current canonical help text, run `cargo run -p rusty-claude-cli -- --help`. The command surface is moving quickly. For the canonical live help text, run:
```bash
cargo run -p rusty-claude-cli -- --help
```
## Slash Commands (REPL) ## Slash Commands (REPL)
Tab completion expands slash commands, model aliases, permission modes, and recent session IDs. Tab completion expands slash commands, model aliases, permission modes, and recent session IDs.
| Command | Description | The REPL now exposes a much broader surface than the original minimal shell:
|---------|-------------|
| `/help` | Show help |
| `/status` | Show session status (model, tokens, cost) |
| `/cost` | Show cost breakdown |
| `/compact` | Compact conversation history |
| `/clear` | Clear conversation |
| `/model [name]` | Show or switch model |
| `/permissions` | Show or switch permission mode |
| `/config [section]` | Show config (env, hooks, model) |
| `/memory` | Show CLAUDE.md contents |
| `/diff` | Show git diff |
| `/export [path]` | Export conversation |
| `/resume [id]` | Resume a saved conversation |
| `/session [id]` | Resume a previous session |
| `/version` | Show version |
See [`../USAGE.md`](../USAGE.md) for examples covering interactive use, JSON automation, sessions, permissions, and the mock parity harness. - session / visibility: `/help`, `/status`, `/sandbox`, `/cost`, `/resume`, `/session`, `/version`, `/usage`, `/stats`
- workspace / git: `/compact`, `/clear`, `/config`, `/memory`, `/init`, `/diff`, `/commit`, `/pr`, `/issue`, `/export`, `/hooks`, `/files`, `/branch`, `/release-notes`, `/add-dir`
- discovery / debugging: `/mcp`, `/agents`, `/skills`, `/doctor`, `/tasks`, `/context`, `/desktop`, `/ide`
- automation / analysis: `/review`, `/advisor`, `/insights`, `/security-review`, `/subagent`, `/team`, `/telemetry`, `/providers`, `/cron`, and more
- plugin management: `/plugin` (with aliases `/plugins`, `/marketplace`)
Notable claw-first surfaces now available directly in slash form:
- `/skills [list|install <path>|help]`
- `/agents [list|help]`
- `/mcp [list|show <server>|help]`
- `/doctor`
- `/plugin [list|install <path>|enable <name>|disable <name>|uninstall <id>|update <id>]`
- `/subagent [list|steer <target> <msg>|kill <id>]`
See [`../USAGE.md`](../USAGE.md) for usage examples and run `cargo run -p rusty-claude-cli -- --help` for the live canonical command list.
## Workspace Layout ## Workspace Layout
``` ```text
rust/ rust/
├── Cargo.toml # Workspace root ├── Cargo.toml # Workspace root
├── Cargo.lock ├── Cargo.lock
└── crates/ └── crates/
├── api/ # Anthropic API client + SSE streaming ├── api/ # Provider clients + streaming + request preflight
├── commands/ # Shared slash-command registry ├── commands/ # Shared slash-command registry + help rendering
├── compat-harness/ # TS manifest extraction harness ├── compat-harness/ # TS manifest extraction harness
├── mock-anthropic-service/ # Deterministic local Anthropic-compatible mock ├── mock-anthropic-service/ # Deterministic local Anthropic-compatible mock
├── plugins/ # Plugin registry and hook wiring primitives ├── plugins/ # Plugin metadata, manager, install/enable/disable surfaces
├── runtime/ # Session, config, permissions, MCP, prompts ├── runtime/ # Session, config, permissions, MCP, prompts, auth/runtime loop
├── rusty-claude-cli/ # Main CLI binary (`claw`) ├── rusty-claude-cli/ # Main CLI binary (`claw`)
├── telemetry/ # Session tracing and usage telemetry types ├── telemetry/ # Session tracing and usage telemetry types
└── tools/ # Built-in tool implementations └── tools/ # Built-in tools, skill resolution, tool search, agent runtime surfaces
``` ```
### Crate Responsibilities ### Crate Responsibilities
- **api** — HTTP client, SSE stream parser, request/response types, auth (API key + OAuth bearer) - **api** — provider clients, SSE streaming, request/response types, auth (API key + OAuth bearer), request-size/context-window preflight
- **commands** — Slash command definitions and help text generation - **commands** — slash command definitions, parsing, help text generation, JSON/text command rendering
- **compat-harness** — Extracts tool/prompt manifests from upstream TS source - **compat-harness** — extracts tool/prompt manifests from upstream TS source
- **mock-anthropic-service** — Deterministic `/v1/messages` mock for CLI parity tests and local harness runs - **mock-anthropic-service** — deterministic `/v1/messages` mock for CLI parity tests and local harness runs
- **plugins** — Plugin metadata, registries, and hook integration surfaces - **plugins** — plugin metadata, install/enable/disable/update flows, plugin tool definitions, hook integration surfaces
- **runtime** — `ConversationRuntime` agentic loop, `ConfigLoader` hierarchy, `Session` persistence, permission policy, MCP client, system prompt assembly, usage tracking - **runtime** — `ConversationRuntime`, config loading, session persistence, permission policy, MCP client lifecycle, system prompt assembly, usage tracking
- **rusty-claude-cli** — REPL, one-shot prompt, streaming display, tool call rendering, CLI argument parsing - **rusty-claude-cli** — REPL, one-shot prompt, direct CLI subcommands, streaming display, tool call rendering, CLI argument parsing
- **telemetry** — Session trace events and supporting telemetry payloads - **telemetry** — session trace events and supporting telemetry payloads
- **tools** — Tool specs + execution: Bash, ReadFile, WriteFile, EditFile, GlobSearch, GrepSearch, WebSearch, WebFetch, Agent, TodoWrite, NotebookEdit, Skill, ToolSearch, REPL runtimes - **tools** — tool specs + execution: Bash, ReadFile, WriteFile, EditFile, GlobSearch, GrepSearch, WebSearch, WebFetch, Agent, TodoWrite, NotebookEdit, Skill, ToolSearch, and runtime-facing tool discovery
## Stats ## Stats