# claude-rs **Repository Path**: ajream/claude-rs ## Basic Information - **Project Name**: claude-rs - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-29 - **Last Updated**: 2026-06-03 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # crs — Claude RS Minimal Claude Code clone in Rust. Supports Anthropic API (DeepSeek) and OpenAI API (Qwen). ## Features - **Agent loop** — auto tool call → result → retry until done - **Tool use** — Bash, Read, Write, Edit - **REPL** — interactive mode with reedline, `/model` hot-switch - **Dual protocol** — Anthropic Messages API + OpenAI Chat Completions - **One binary** — 5.5 MB, no runtime deps, no Node/Python - **Configurable** — multi-model, custom system prompt, conversation save/resume ## Comparison with Claude Code | Feature | crs | Claude Code | |---------|-----|-------------| | REPL / interactive | ✅ | ✅ | | One-shot `-p` | ✅ | ✅ | | Bash execution | ✅ | ✅ | | File read / write / edit | ✅ | ✅ | | Streaming output | ✅ | ✅ | | Thinking display | ✅ | ✅ | | Multi-model config | ✅ | ❌ (Claude only) | | Model hot-switch (`/model`) | ✅ | ❌ | | Config in file (no env) | ✅ | ❌ | | Single binary (5.5 MB) | ✅ | ❌ (Node + npm) | | Conversation resume | ✅ | ✅ | | Custom system prompt | ✅ | ✅ | | **Agent / sub-agent** | ❌ | ✅ | | **MCP protocol** | ❌ | ✅ | | **Code search / grep** | ❌ | ✅ | | **Git integration** | ❌ | ✅ | | **Web search** | ❌ | ✅ | | **LSP / code understanding** | ❌ | ✅ | | **Permission system** | ❌ | ✅ | | **IDE integration** | ❌ | ✅ | | **Project scaffolding** | ❌ | ✅ | crs is v0.1 — focused on being lightweight, multi-model, and fast. Advanced features (MCP, agents, search) are not yet implemented. --- ## For Users ### Install Download `crs-v0.1.0.tar.gz` from release page, then: ```bash tar xzf crs-v0.1.0.tar.gz cd crs-release ./install.sh ``` Or manually: ```bash cp crs ~/.local/bin/ # ensure ~/.local/bin is in PATH ``` ### Configure ```bash # Create config mkdir -p ~/.config/crs ``` Edit `~/.config/crs/config.toml`: ```toml [models.deepseek-flash] provider = "anthropic" api_base = "https://api.deepseek.com/anthropic" model_id = "deepseek-v4-flash" api_key = "sk-..." # paste your key here [default] model = "deepseek-flash" max_tokens = 4096 ``` ### Usage ```bash crs # REPL (interactive) crs -p "hello" # one-shot query crs -m deepseek-pro # use different model crs -c my.toml # custom config file ``` REPL commands: `/exit`, `/help`, `/clear`, `/model ` ### Update Config Edit `~/.config/crs/config.toml` any time. Changes take effect next launch. For project-specific config, put `crs.toml` in project root (overrides global). ### Uninstall ```bash rm ~/.local/bin/crs rm -r ~/.config/crs # optional: remove config too ``` --- ## For Developers ### Prerequisites - Rust toolchain (install: ) - Git ### Build & Run ```bash git clone cd claude-rs cp example.crs.toml crs.toml # add your api_key cargo build --release # release binary at target/release/crs-cli cargo run -- -p "hello" # or run directly cargo check # fast compile check only ``` ### Workspace ``` crates/ ├── crs-core/ # Types, config, error, history ├── crs-api/ # Anthropic + OpenAI streaming providers ├── crs-tools/ # Bash/Read/Write/Edit tool execution └── crs-cli/ # CLI args, REPL, agent loop, display ``` ### Package ```bash make release # builds release binary + tarball # output: /tmp/crs-v0.1.0.tar.gz ``` Or manually: ```bash cargo build --release mkdir -p /tmp/crs-release cp target/release/crs-cli /tmp/crs-release/crs strip /tmp/crs-release/crs cp README.md example.crs.toml /tmp/crs-release/ cd /tmp && tar czf crs-v0.1.0.tar.gz crs-release/ ``` ### Makefile ```bash make build # cargo build --release make install # build + cp to ~/.local/bin/crs make uninstall # rm ~/.local/bin/crs make release # build + create tarball ```