claude-code-acp-rs
A Rust implementation of Claude Code ACP Agent. Use Claude Code from any ACP-compatible client such as Zed!
This is an alternative to the official TypeScript implementation (@zed-industries/claude-code-acp).
Installation
From Cargo
# Install the rust toolchain first: https://www.rust-lang.org/tools/install
From Source
With OpenTelemetry Support
To enable distributed tracing with OpenTelemetry:
# Install with otel feature
# Or from source
Usage
Command Line
# Show help
# Run with diagnostic mode (logs to file)
# Run with verbose logging
With Zed Editor
Configure Zed to use this agent by specifying claude-code-acp-rs as the agent command.
Environment Variables
ANTHROPIC_BASE_URL: Custom API base URLANTHROPIC_API_KEY: API key (preferred)ANTHROPIC_AUTH_TOKEN: Authentication token (legacy, fallback)ANTHROPIC_MODEL: Model to use (default: claude-sonnet-4-20250514)ANTHROPIC_SMALL_FAST_MODEL: Model for fast operationsMAX_THINKING_TOKENS: Maximum tokens for extended thinking mode
Configuration Files
The agent can also load configuration from Claude Code settings files. When environment variables are not set, the agent will read from:
~/.claude/settings.json(user settings).claude/settings.json(project settings).claude/settings.local.json(local settings)
Configuration priority (highest to lowest):
- Environment variables
- Settings files - Top-level fields
- Settings files -
envobject - Defaults
Supported settings formats:
Using top-level fields:
Using env object (compatible with Claude Code CLI):
This allows you to use your existing Claude Code configuration without setting environment variables.
OpenTelemetry Tracing
When compiled with the otel feature, you can enable distributed tracing to debug and monitor the agent:
# Send traces to Jaeger (default OTLP endpoint)
# With custom service name
# Or use environment variable
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4317
Jaeger Quick Start
# Start Jaeger with Docker
# Run the agent with tracing
# View traces at http://localhost:16686
Coexistence with npm Version
This Rust implementation uses the command name claude-code-acp-rs to avoid conflicts with the npm package @zed-industries/claude-code-acp (which uses claude-code-acp).
Both versions can be installed and used on the same system:
claude-code-acpβ npm version (TypeScript)claude-code-acp-rsβ Rust version (this project)
Extended Thinking Mode
This agent supports Claude's Extended Thinking mode for complex reasoning tasks. See the Thinking Mode Guide for details.
Quick Start:
# Enable thinking mode with environment variable
# Run the agent
Features:
- π§ Deep reasoning for complex programming tasks
- π Better code analysis and generation quality
- π Configurable thinking token budget (4096, 8000, 16000)
- π― Support via environment variables or ACP
_metafield
For more details, see: