Warning
This ambitious project is very very early (like experiment-early) don't expect it to get to OpenCode level anytime soon. Like it literally doesn't even work yet.
A purely Rust-based AI CLI coding agent with a beautiful terminal UI for interactive "agentic engineering".
In the words of the buildwithpi.ai creator, 'There are many coding agents, this one is mine'.
It's OpenCode but in pure Rust ๐ฆ w/ my personal flavors.
~ Carlo (Author)
- Made with Rust - Uses ratatui, crossterm and nucleo (fuzzy search), all fast tech.
- Sounds - I wanted this in opencode, I just made it built in instead of a plugin.
- TPS, TTFT, Latency metrics - Also wanted this in opencode, just made it built-in.
- Opens instantly - one of my main motivations why I made this! :D Very lightweight after build.
- Terminal UI (TUI) - Beautiful, responsive interface built with ratatui
- Built for the OpenCode user - works out of the box w/ opencode themes, every UX, and some existing configs so you don't need to force your team to use crabcode.
- Same UX - carefully ported most of the good UX from OpenCode i.e. shortcuts, etc.
- Agent System - Switch between PLAN (read-only analysis) and BUILD (implementation) agents with TAB, and custom agents.
- Multiple Model Support - Works w/ the same models.dev support.
- Command System - Intuitive commands:
/sessions,/new,/connect,/models,/exit+ custom commands. - Session Management - Create and manage multiple chat sessions
- Streaming Responses - Real-time streaming of AI responses (w/ aisdk.rs)
Install via cargo:
cargo install crabcode-
Run crabcode:
crabcode
-
Configure your AI model:
/connect -
Start coding! Type your questions or requests and press Enter.
| Command | Description |
|---|---|
/sessions |
List all sessions |
/new |
Create a new session |
/connect |
Open the provider connect dialog |
/models |
List available models |
/exit |
Quit crabcode |
| Key | Action |
|---|---|
Ctrl+X |
Open the shortcuts dialog |
TAB |
Switch between PLAN and BUILD agents |
Enter |
Submit message or execute command |
Ctrl+C (once) |
Clear input |
Ctrl+C (twice) |
Quit |
Esc |
Close popup suggestions |
โ/โ |
Navigate in input or suggestions popup |
- PLAN - Read-only analysis and planning agent. Best for understanding codebases, architecture questions, and planning changes.
- BUILD - Full access implementation agent. Best for writing code, implementing features, and making changes.
Your credentials are stored in an OS-specific data directory:
- macOS:
~/Library/Application Support/crabcode/auth.json - Linux:
~/.local/share/crabcode/auth.json
Read the extensive list of configs here.
Will be powered by mostly aisdk + models.dev So most of them will work out of the box.
I tried crabcode specifically for these providers:
- opencode-zen
- nano-gpt
- zai
- minimax
- fireworks
- baseten
- ollama
Feel free to create an issue / add to this list if you tried
I might work harder to support these in the future.
- ChatGPT/Codex Subscription (Though they have good-will to support OpenCode, so maybe CrabCode can as well). might support later.
- Kimi For Coding Subscription - I keep getting 401 but it works in OpenCode, I may have to contact them first. might support later
- Gemini - It's OAuth + also very unsure. So currently no.
- Claude Code Subscription - Known to explicitly not like harnesses. So never will, sorry.
git clone https://github.com/blankeos/crabcode.git
cd crabcode
cargo build --releasecargo testContributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This project was inspired by anomalyco/opencode. Also made this project w/ OpenCode btw, so thank you OpenCode! ๐
- Chat, switch models, agents
- Minimal configurations (I want it to just feel at least like vanilla opencode)
- The cheapest model providers (GLM, etc.)
- A ding sound, my only opencode plugin at the moment.
- No reverse-engineering oauth from big AI (Codex, Claude Code, Gemini), at least for now (Don't wanna get in trouble).
- Possibly ralphy? (very far, idk how to do that)
- ACP w/ Zed? (very far, idk how to do that)
- No plugin ecosystem
- No desktop app
- No web sharing thing
I'm learning rust :D. Built a few TUIs as practice. Also been making AI chat apps on web, so I wanna work on this.
