Code Assistant
About
An LLM-powered, autonomous coding assistant. Also offers an MCP and ACP mode.
Details
- License
- MIT
Explore
Multi-Modal Tool Execution: Adapts to different LLM capabilities with pluggable tool invocation modes - native function calling, XML-style tags, and triple-caret blocks - ensuring compatibility across various AI providers.
Real-Time Streaming Interface: Advanced streaming processors parse and display tool invocations as they stream from the LLM, with smart filtering to prevent unsafe tool combinations.
Session-Based Project Management: Each chat session is tied to a specific project and maintains persistent state, working memory, and draft messages with attachment support.
Multiple Interface Options: Choose between a modern GUI built on Zed's GPUI framework, traditional terminal interface, or headless MCP server mode for integration with MCP clients such as Claude Desktop.
Agent Client Protocol (ACP) Support: Full compatibility with the Agent Client Protocol standard, enabling seamless integration with ACP-compatible editors like Zed. See Zed's documentation on adding custom agents for setup instructions.
Session Compaction: Before running out of context space, the agent generates a session summary and continues work.
Auto-Loaded Repository Guidance: Automatically includes AGENTS.md (or CLAUDE.md fallback) from the project root in the assistant's system context to align behavior with repo-specific instructions.
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
sudo apt-get install -y --no-install-recommends \
pkg-config build-essential libssl-dev libzstd-dev \
libfontconfig-dev libwayland-dev libx11-xcb-dev \
libxkbcommon-x11-dev libasound2-dev libvulkan1
After building, create your configuration files:
bash
mkdir -p ~/.config/code-assistant
cp providers.example.json ~/.config/code-assistant/providers.json
cp models.example.json ~/.config/code-assistant/models.json
export ANTHROPIC_API_KEY="sk-ant-..."
export OPENAI_API_KEY="sk-..."
See the Configuration section for detailed setup instructions.
Create ~/.config/code-assistant/projects.json to define available projects:
jsonc{
"code-assistant": {
"path": "/Users/<username>/workspace/code-assistant",
"format_on_save": {
"/.rs": "cargo fmt" // Formats all files in project, so make sure files are already formatted
}
},
"my-project": {
"path": "/Users/<username>/workspace/my-project",
"format_on_save": {
"/.ts": "prettier --write {path}" // If the formatter accepts a path, provide "{path}"
}
}
}
The code-assistant uses two JSON configuration files to manage LLM providers and models:
~/.config/code-assistant/providers.json - Configure provider credentials and endpoints:
json{
"anthropic": {
"label": "Anthropic Claude",
"provider": "anthropic",
"config": {
"api_key": "${ANTHROPIC_API_KEY}",
"base_url": "https://api.anthropic.com/v1"
}
},
"openai": {
"label": "OpenAI",
"provider": "openai-responses",
"config": {
"api_key": "${OPENAI_API_KEY}"
}
}
}
~/.config/code-assistant/models.json - Define available models:
json{
"Claude Opus 4.7 (Adaptive Thinking)": {
"provider": "anthropic",
"id": "claude-opus-4-7",
"config": {
"max_tokens": 64000,
"thinking": {
"type": "adaptive"
},
"output_config": {
"effort": "high"
}
}
},
"Claude Sonnet 4.5 (Thinking)": {
"provider": "anthropic",
"id": "claude-sonnet-4-5",
"config": {
"max_tokens": 32768,
"thinking": {
"type": "enabled",
"budget_tokens": 8192
}
}
},
"Claude Sonnet 4.5": {
"provider": "anthropic",
"id": "claude-sonnet-4-5",
"config": {
"max_tokens": 32768
}
},
"GPT-5": {
"provider": "openai",
"id": "gpt-5-codex",
"config": {
"temperature": 0.7
}
}
}
Note on Claude Opus 4.7+ extended thinking: Starting with Claude Opus 4.7, Anthropic
no longer accepts the manual thinking: { type: "enabled", budget_tokens: N } form
(it returns a 400 error). These models require adaptive thinking, where depth is
controlled via the output_config.effort parameter (low, medium, high, xhigh,
max). code-assistant detects Opus 4.7+ model IDs (claude-opus-4-7,
claude-opus-4-8, claude-opus-latest) and emits the correct request shape by default.
You can override the effort level (or any other field) via the model's config block,
as shown in the example above. See Anthropic's extended thinking
and effort docs for details.
Environment Variable Substitution: Use ${VAR_NAME} in provider configs to reference environment variables for API keys.
Full Examples: See providers.example.json and models.example.json for complete configuration examples with all supported providers (Anthropic, OpenAI, Ollama, SAP AI Core, Vertex AI, Groq, Cerebras, MistralAI, OpenRouter).
Some tools require external API keys to function. Configure these in ~/.config/code-assistant/tools.json:
json{
"perplexity_api_key": "${PERPLEXITY_API_KEY}"
}
Available Tool Settings:
- perplexity_api_key - Enables the perplexity_ask tool for AI-powered web search
Tools without their required configuration will not be available to the assistant.
List Available Models:
bash
code-assistant --list-models
code-assistant --list-providers
<details>
<summary>Claude Desktop Integration (MCP)</summary>
Configure in Claude Desktop settings (Developer tab → Edit Config):
jsonc{
"mcpServers": {
"code-assistant": {
"command": "/path/to/code-assistant/target/release/code-assistant",
"args": ["server"],
"env": {
"SHELL": "/bin/zsh" // Your login shell
}
}
}
}
</details>
<details>
<summary>Zed Editor Integration (ACP)</summary>
Configure in Zed settings:
json{
"agent_servers": {
"Code-Assistant": {
"command": "/path/to/code-assistant/target/release/code-assistant",
"args": ["acp", "--model", "Claude Sonnet 4.5"],
"env": {
"ANTHROPIC_API_KEY": "sk-ant-..."
}
}
}
}
Make sure your providers.json and models.json are configured with the model you specify. The agent will appear in Zed's assistant panel with full ACP support.
For detailed setup instructions, see Zed's documentation on adding custom agents.
</details>
<details>
<summary>Advanced Options</summary>
Tool Syntax Modes:
- --tool-syntax native: Use the provider's built-in tool calling (most reliable, but streaming of parameters depends on provider)
- --tool-syntax xml: XML-style tags for streaming of parameters
- --tool-syntax caret: Triple-caret blocks for token-efficiency and streaming of parameters
Session Recording:
bashperplexity_api_key
Enables the `perplexity_ask` tool for AI-powered web search
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
xcodebuild -downloadComponent MetalToolchain
Some tools require external API keys to function. Configure these in ~/.config/code-assistant/tools.json:
{
"perplexity_api_key": "${PERPLEXITY_API_KEY}"
}
Available Tool Settings:
- perplexity_api_key - Enables the perplexity_ask tool for AI-powered web search
Tools without their required configuration will not be available to the assistant.
List Available Models:
```bash
An AI coding assistant built in Rust that provides both command-line and graphical interfaces for autonomous code analysis and modification.
Key Features
Multi-Modal Tool Execution: Adapts to different LLM capabilities with pluggable tool invocation modes - native function calling, XML-style tags, and triple-caret blocks - ensuring compatibility across various AI providers.
Real-Time Streaming Interface: Advanced streaming processors parse and display tool invocations as they stream from the LLM, with smart filtering to prevent unsafe tool combinations.
Session-Based Project Management: Each chat session is tied to a specific project and maintains persistent state, working memory, and draft messages with attachment support.
Multiple Interface Options: Choose between a modern GUI built on Zed's GPUI framework, traditional terminal interface, or headless MCP server mode for integration with MCP clients such as Claude Desktop.
Agent Client Protocol (ACP) Support: Full compatibility with the Agent Client Protocol standard, enabling seamless integration with ACP-compatible editors like Zed. See Zed's documentation on adding custom agents for setup instructions.
Session Compaction: Before running out of context space, the agent generates a session summary and continues work.
Auto-Loaded Repository Guidance: Automatically includes AGENTS.md (or CLAUDE.md fallback) from the project root in the assistant's system context to align behavior with repo-specific instructions.
Installation
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



