Crates.io | vtcode |
lib.rs | vtcode |
version | 0.14.1 |
created_at | 2025-09-18 15:48:49.80251+00 |
updated_at | 2025-09-24 14:05:29.354522+00 |
description | A Rust-based terminal coding agent with modular architecture supporting multiple LLM providers |
homepage | https://github.com/vinhnx/vtcode |
repository | https://github.com/vinhnx/vtcode |
max_upload_size | |
id | 1844928 |
size | 866,628 |
cargo install vtcode
or brew install vinhnx/tap/vtcode
or npm install -g vtcode
VT Code is a Rust-based terminal coding agent that pairs a modern TUI with deep, semantic code understanding powered by tree-sitter and ast-grep. Built for developers who demand precision, security, and efficiency in everyday coding workflows.
vtcode-core/src/config/constants.rs
and up-to-date model IDs in docs/models.json
.VT Code can be installed using multiple package managers depending on your preference:
Using Cargo (Rust package manager) - Recommended for Rust developers:
cargo install vtcode
Using Homebrew (macOS only):
brew install vinhnx/tap/vtcode
Using npm (Node.js package manager) - Cross-platform:
npm install -g vtcode
After installation with any method, simply run vtcode
to get started:
vtcode
Available for:
aarch64-apple-darwin
) and Intel (x86_64-apple-darwin
)Each archive contains the executable - extract and rename to vtcode
if needed.
Set your API key for your preferred provider:
export OPENAI_API_KEY="your_key_here"
# or
export ANTHROPIC_API_KEY="your_key_here"
# or
export XAI_API_KEY="your_key_here"
# or
export GEMINI_API_KEY="your_key_here"
# or
export OPENROUTER_API_KEY="your_key_here"
Alternatively, create a .env
file in your project directory:
# .env file
OPENAI_API_KEY=your_openai_key_here
ANTHROPIC_API_KEY=your_anthropic_key_here
XAI_API_KEY=your_anthropic_key_here
GEMINI_API_KEY=your_gemini_key_here
OPENROUTER_API_KEY=your_openrouter_key_here
VT Code supports advanced configuration via vtcode.toml
. See Configuration for details.
Launch the agent with explicit provider/model flags or rely on the defaults from vtcode.toml
:
vtcode --provider openai --model gpt-5-codex
Persist your preferred defaults in configuration rather than hardcoding them:
[agent]
provider = "openai"
default_model = "gpt-5-codex"
Model identifiers should always reference vtcode-core/src/config/constants.rs
and docs/models.json
to stay aligned with vetted releases.
Launch interactive mode with your preferred provider/model:
vtcode --provider openai --model gpt-5-codex
Run a single prompt with streaming output (scripting friendly):
vtcode ask "Summarize diagnostics in src/lib.rs"
Execute a command with tool access disabled (dry run):
vtcode --no-tools ask "Review recent changes in src/main.rs"
When developing locally, the debug script mirrors production defaults:
./run-debug.sh
CLI options are discoverable via vtcode --help
or /help
inside the REPL. All defaults live in vtcode.toml
, including provider fallbacks, tool allowlists, streaming options, and safety policies.
VT Code is composed of a reusable core library plus a thin CLI binary:
vtcode-core/
contains the agent runtime: provider abstractions (llm/
), tool registry (tools/
), configuration loaders, and tree-sitter integrations.src/main.rs
wires the CLI, TUI, and runtime together using clap
for argument parsing and Ratatui for rendering.vtcode.toml
and enables systems like Serena MCP for journaling and memory.Design goals prioritize composability, guarded execution, and predictable performance. The architecture document in docs/ARCHITECTURE.md
dives deeper into module responsibilities and extension hooks.
Multi-Platform Installation
cargo install vtcode
- Install directly from crates.iobrew install vinhnx/tap/vtcode
- macOS package manager installationnpm install -g vtcode
- Node.js package manager installationMulti-Provider AI Support
Enhanced Terminal User Interface
Advanced Code Intelligence
ignore
and nucleo-matcher
cratesEnterprise Security
Modular Architecture
vtcode.toml
; never hardcode credentials or model IDs.vtcode-core/src/config/constants.rs
.docs/models.json
; update it alongside configuration changes.Refer to the guides under docs/project/
for deep dives on providers, tools, and runtime profiles.
cargo check
for fast validation; cargo clippy --workspace --all-targets
to enforce linting.cargo fmt
and run cargo test
for unit and integration coverage../run-debug.sh
launches the debug build with live reload-friendly options.benches/
, and additional examples belong in tests/
(avoid ad-hoc scripts).docs/project/
and docs/models.json
when relevant.This project is licensed under the MIT License - see LICENSE for details.