Thanks to visit codestin.com
Credit goes to docs.rs

vtcode 0.35.3

A Rust-based terminal coding agent with modular architecture supporting multiple LLM providers
docs.rs failed to build vtcode-0.35.3
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

Quickstart

Installing and running VT Code

Install globally with your preferred package manager. If you use Cargo:

cargo install vtcode

Alternatively, if you use Homebrew:

brew install vinhnx/tap/vtcode

Or if you prefer NPM:

npm install -g vtcode

Then simply run vtcode to get started:

vtcode

Using VT Code with your preferred provider

Set your API key environment variable and run VT Code:

# Set your API key
export OPENAI_API_KEY="your_api_key_here"

# Launch VT Code
vtcode

Available providers

VT Code supports multiple providers including OpenAI, Anthropic, xAI, DeepSeek, Gemini, Z.AI, Moonshot AI, OpenRouter, and Ollama (local).

Set your preferred 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

Agent Client Protocol (ACP)

VT Code can integrate with code editors like Zed. To configure ACP, refer to the ACP docs.

Configuration

VT Code supports a rich set of configuration options, with preferences stored in vtcode.toml. Key configuration features include:

  • Lifecycle Hooks: Execute shell commands in response to agent events - see Lifecycle Hooks Guide
  • Tool Policies: Control which tools are allowed, prompted, or denied
  • Security Settings: Configure human-in-the-loop approval and workspace boundaries
  • Performance Tuning: Adjust context limits, timeouts, and caching behavior

For full configuration options, see Configuration.


Key Features

  • Security First: Multi-layered security model with execution policy, sandbox integration, and argument injection protection
  • 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, Swift
  • Smart Tools: Built-in code analysis, file operations, terminal commands, and refactoring
  • Editor Integration: Native support for Zed IDE via Agent Client Protocol (ACP)
  • Lifecycle Hooks: Execute custom shell commands in response to agent events for context enrichment, policy enforcement, and automation (docs)
  • Semantic Search: AST-based search capabilities with ast-grep integration
  • Context Management: Advanced token budget tracking and context curation
  • TUI Interface: Rich terminal user interface with real-time streaming

Security & Safety

VT Code implements a defense-in-depth security model to protect against prompt injection and argument injection attacks:

  • Execution Policy: Command allowlist with per-command argument validation
  • Workspace Isolation: All operations confined to workspace boundaries
  • Sandbox Integration: Optional Anthropic sandbox runtime for network commands
  • Human-in-the-Loop: Configurable approval system for sensitive operations
  • Audit Trail: Comprehensive logging of all command executions

See Security Model for details.


Docs & Examples


Visual Studio Code Extension

VT Code is available as an VS Code extension.

The original VTCode extension for Visual Studio Code with full semantic code understanding and AI assistance.

VT Code is also compatible with other VS Code-compatible editors:

Compatible with Cursor, Windsurf, and other VS Code-compatible editors through the Open VSX registry.

For installation instructions and download links for other IDEs, visit our IDE Downloads page. For troubleshooting, see the IDE Integration Troubleshooting Guide.


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

This repository is licensed under the MIT License.