Keep CLI parity features local and controllable
The remaining slash commands already existed in the REPL path, so this change focuses on wiring the active CLI parser and runtime to expose them safely. `--version` now exits through a local reporting path, and `--allowedTools` constrains both advertised and executable tools without changing the underlying command surface. Constraint: The active CLI parser lives in main.rs, so a full parser unification would be broader than requested Constraint: --version must not require API credentials or construct the API client Rejected: Migrate the binary to the clap parser in args.rs | too large for a parity patch Rejected: Enforce allowed tools only at request construction time | execution-time mismatch risk Confidence: high Scope-risk: moderate Reversibility: clean Directive: Keep local-only flags like --version on pre-runtime codepaths and mirror tool allowlists in both definition and execution paths Tested: cargo fmt; cargo clippy --workspace --all-targets -- -D warnings; cargo test; cargo run -q -p rusty-claude-cli -- --version; cargo run -q -p rusty-claude-cli -- --help Not-tested: Interactive live API conversation with restricted tool allowlists
This commit is contained in:
@@ -132,7 +132,9 @@ cargo run -p rusty-claude-cli -- --resume session.json /memory /config
|
||||
- `bootstrap-plan` — print the current bootstrap skeleton
|
||||
- `system-prompt [--cwd PATH] [--date YYYY-MM-DD]` — render the synthesized system prompt
|
||||
- `--help` / `-h` — show CLI help
|
||||
- `--version` / `-V` — print the CLI version
|
||||
- `--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
|
||||
|
||||
### Interactive slash commands
|
||||
|
||||
|
||||
Reference in New Issue
Block a user