# crab-code
**Repository Path**: nzdm/crab-code
## Basic Information
- **Project Name**: crab-code
- **Description**: 关于
🦀 一个完全用 Rust 语言从零开始构建的开源 Claude Code 替代方案。智能编码 CLI——能够思考、计划和执行,支持任何 LLM。兼容 Claude Code 工作流程。
- **Primary Language**: Rust
- **License**: Apache-2.0
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2026-04-08
- **Last Updated**: 2026-04-21
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README

**Open-source alternative to Claude Code, built from scratch in Rust.**
[](https://www.rust-lang.org/)
[](LICENSE)
[](https://github.com/lingcoder/crab-code/actions/workflows/ci.yml)
[](#contributing)
**English** | [**中文**](README.zh-CN.md)
---
> **Active Development** — 4500+ tests · 24 crates · ~140k LOC
Crab Code is a Rust-native agentic coding CLI. It aligns with Claude Code's toolset, permission model, and interaction patterns while supporting any LLM provider (Anthropic / OpenAI / DeepSeek / Ollama / Bedrock / Vertex, etc.).
## Quick Start
```bash
git clone https://github.com/lingcoder/crab-code.git && cd crab-code
cargo build --release
export ANTHROPIC_API_KEY=sk-ant-...
./target/release/crab # Interactive TUI
./target/release/crab "explain this codebase" # Single-shot
./target/release/crab -p "fix the bug" # Non-interactive
```
See `crab --help` for more. Config: `~/.crab/settings.json`
## Comparison
| | Crab Code | Claude Code | [OpenCode](https://github.com/anomalyco/opencode) | Codex CLI |
|--|-----------|-------------|----------|-----------|
| Open Source | Apache 2.0 | Proprietary | MIT | Apache 2.0 |
| Language | Rust | TypeScript | TypeScript | Rust |
| Models | Any provider | Anthropic | Any provider | OpenAI only |
| MCP | 3 transports | 6 transports | LSP | 2 transports |
## Architecture
24 Rust crates in 4 layers. See [`docs/architecture.md`](docs/architecture.md) for details.
```
Entry cli · daemon
Engine agent · engine · session · tui · remote
Service api · tools · mcp · skill · plugin · telemetry · ide · sandbox · job · acp
Foundation core · common · config · auth · fs · memory · process
```
## Build & Test
```bash
cargo build --workspace
cargo test --workspace
cargo clippy --workspace -- -D warnings
```
## Contributing
PRs welcome.
## License
[Apache License 2.0](LICENSE)