vtcode 0.33.0

A Rust-based terminal coding agent with modular architecture supporting multiple LLM providers
docs.rs failed to build vtcode-0.33.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: vtcode-0.21.8

VT Code

humaneval pass@1

MCP zed

crates.io docs.rs npm

demo


VT Code is a Rust-based terminal coding agent with semantic code intelligence via Tree-sitter and ast-grep. It supports multiple LLM providers with automatic failover and efficient context management.

Key Features

  • Multi-Provider AI: OpenAI, Anthropic, xAI, DeepSeek, Gemini, Z.AI, Moonshot AI, OpenRouter, Ollama (local)
  • Code Intelligence: Tree-sitter parsers for Rust, Python, JavaScript/TypeScript, Go, Java
  • Smart Tools: Built-in code analysis, file operations, terminal commands, and refactoring
  • Editor Integration: Native support for Zed IDE via Agent Client Protocol (ACP)
  • Security First: Sandboxed execution with configurable safety policies

Installation

Package Managers

# Cargo (recommended)
cargo install vtcode

# Homebrew (macOS)
brew install vinhnx/tap/vtcode

# NPM
npm install -g vtcode

Quick Start

# Set your API key
export OPENAI_API_KEY="your_api_key_here"

# Launch VT Code
vtcode

# Or run a single query
vtcode ask "Explain this Rust code"

Configuration

Create vtcode.toml in your project root:

[agent]
provider = "openai"                    # Choose your provider
default_model = "gpt-5"               # Latest model
api_key_env = "OPENAI_API_KEY"        # Environment variable

[tools]
default_policy = "prompt"             # Safety: "allow", "prompt", or "deny"

[tools.policies]
read_file = "allow"                   # Always allow file reading
write_file = "prompt"                 # Prompt before modifications
run_terminal_cmd = "prompt"           # Prompt before commands

Available Providers

Set your API key environment variable:

export OPENAI_API_KEY="sk-..."           # OpenAI
export ANTHROPIC_API_KEY="sk-ant-..."    # Anthropic
export GEMINI_API_KEY="AIza..."          # Google Gemini
export XAI_API_KEY="xai-..."             # xAI
export DEEPSEEK_API_KEY="sk-..."         # DeepSeek
export ZAI_API_KEY="zai-..."             # Z.AI
export MOONSHOT_API_KEY="sk-..."         # Moonshot AI
export OPENROUTER_API_KEY="sk-or-..."    # OpenRouter

Command Line Interface

Basic Usage

# Interactive mode
vtcode

# Single query mode
vtcode ask "your question here"

# With specific provider and model
vtcode --provider openai --model gpt-5 ask "Refactor this code"

Agent Client Protocol

VT Code supports the Agent Client Protocol (ACP) for integration with code editors like Zed.

ACP Quick Setup

  1. Install VT Code with cargo install vtcode
  2. Configure your vtcode.toml with provider credentials
  3. Register in Zed's settings:
{
    "agent_servers": {
        "vtcode": {
            "command": "vtcode",
            "args": ["acp"],
            "env": {
                "OPENAI_API_KEY": "your_api_key_here"
            }
        }
    }
}

Development

Getting Started

# Clone and build
git clone https://github.com/vinhnx/vtcode.git
cd vtcode
cargo build --release

# Run tests
cargo test

Support VT Code Development

I build VT Code in my free time as a passion project to research and explore how coding agents work in practice. If you find VT Code useful, please consider supporting my work with a coffee via BuyMeACoffee:

BuyMeACoffee

QR Code

Your support means the world to me, thank you!

License

MIT License - see LICENSE for full terms.