RoboCode is a Rust-first reimplementation of the core local agent CLI patterns from the reference Claude Code project.
Chinese version: README.zh-CN.md
This repository currently includes:
- A multi-crate Rust workspace
- A lightweight REPL CLI
- Layered startup configuration with project and global config support
- Session persistence with JSONL transcripts and a SQLite index
- A permission-aware tool runtime
- Built-in local tools for shell, files, search, web access, and Git workflows including worktrees and stash/restore flows
- A provider abstraction with support for multiple API families and native tool-calling where available
robocode-cli: command-line entrypoint and REPLrobocode-config: config loading and precedence resolutionrobocode-core: session engine and orchestrationrobocode-model: model provider abstraction and implementationsrobocode-tools: built-in tools and execution adaptersrobocode-permissions: permission modes and decision logicrobocode-session: transcript storage and resume supportrobocode-types: shared domain types
Run the test suite:
cargo test --workspaceStart the CLI:
cargo run -p robocode-cli -- --provider fallback --model test-localStart the CLI with an explicit config file:
cargo run -p robocode-cli -- --config .robocode/config.tomlConfiguration can come from:
- a global config file
- a project-local
.robocode/config.toml - environment variables
- CLI flags
Priority is CLI > environment > project config > global config > defaults.
Example config:
provider = "openai"
model = "gpt-5.2"
permission_mode = "acceptEdits"
request_timeout_secs = 120
max_retries = 2Supported provider families:
anthropicopenaiopenai-compatibleollamafallback
Native tool-calling currently maps:
- Anthropic
tool_use - OpenAI and OpenAI-compatible
tool_calls fallbackandollamatext-first local flows
Useful commands:
/help
/provider
/status
/config
/doctor
/permissions
/sessions
/resume latest
/git status
/git worktree list
/git stash list
/web search rust language --limit 3
/web fetch https://www.rust-lang.org --max-bytes 500
The /resume command also supports /resume #<index> and /resume <session-id-prefix>.
Built-in tool families include:
- file and search tools:
read_file,write_file,edit_file,glob,grep - web tools:
web_search,web_fetch - Git tools: status, diff, branch, add, switch, commit, push, restore, stash, and worktree flows
- shell execution with platform-specific adapters for POSIX and PowerShell
Project docs:
docs/architecture.mddocs/architecture.zh-CN.mddocs/documentation-localization.mddocs/documentation-localization.zh-CN.mddocs/reference-analysis.mddocs/reference-analysis.zh-CN.mddocs/product-requirements.mddocs/product-requirements.zh-CN.mddocs/staged-roadmap.mddocs/staged-roadmap.zh-CN.mddocs/ref-gap-matrix.mddocs/ref-gap-matrix.zh-CN.mddocs/superpowers/plans/2026-04-11-robocode-plan-index.mddocs/superpowers/plans/2026-04-11-robocode-plan-index.zh-CN.mddocs/superpowers/plans/2026-04-11-v2-session-command-enhancement.mddocs/superpowers/plans/2026-04-11-v2-session-command-enhancement.zh-CN.md
This is an actively developing V1 implementation focused on a reliable local CLI core before broader platform features.