VT Code
An open-source terminal coding agent built in Rust.
Plan, run, and review coding work from your terminal, with hosted or local models, sandboxed execution, and resumable sessions.

Contents
- VT Code
Overview
Explore a codebase, plan changes, run tools, and review edits, in the interactive TUI or headless with
vtcode exec. You pick the model and the permissions; the runtime handles context management, tool calls, and
execution policy.
| At a glance | What you get |
|---|---|
| Planning | Plan read-only, then review turn diffs. |
| Safety | Auditable command policy and sandboxing. |
| Self-correct | HOVER loop: Hypothesize, Observe, |
| Verify, Evaluate, Revise, Repeat on tool mismatch. | |
| Long runs | Headless exec with compaction, resumption, and logs. |
| Integrations | MCP, Skills, plugins, and editor bridges. |
| Models | Hosted or local providers, chosen per task. |
flowchart LR
H[Hypothesize] --> O[Observe tool evidence]
O --> V[Verify outcome]
V --> E[Evaluate vs hypothesis]
E -->|mismatch| R[Revise and retry corrected]
R --> H
E -->|match| D[Done]
Legend: H states the expected outcome; O collects bounded tool evidence; V checks exit
status and verifier result; E compares expectation against evidence; R applies an
evidence-supported correction. mismatch (non-zero exit, empty search, stale patch, failed verifier,
repeated evidence) loops back with corrected arguments; match exits to Done. Rereads alone are not
revision. Full acceptance table: HOVER validation.
The rest of this page covers installation, configuration, a first task, and the deeper topics.
Quick start
Requirements: macOS, Linux, or Windows/WSL. The Cargo path also needs Rust 1.98.1+ (edition 2024).
1. Install
# Review the installer script before running it: https://github.com/vinhnx/vtcode/blob/main/scripts/install.sh
curl -fsSL https://raw.githubusercontent.com/vinhnx/VTCode/main/scripts/install.sh | bash
On macOS/Linux, the installer also sets up ripgrep and ast-grep by default. For package-managed installs, use
Homebrew or Cargo instead:
brew trust vinhnx/tap
brew install vinhnx/tap/vtcode
# Or install with Rust (requires Rust 1.98.1+)
cargo install vtcode
Verify the install with vtcode --version, then see the installation guide for
prerequisites, additional methods, and optional search-tool setup.
[!NOTE] Windows artifacts are best-effort and may lag behind macOS/Linux.
2. Configure your project
From your project directory, initialize configuration and instructions, then add provider credentials. For example, with OpenAI:
cd path/to/your/project
vtcode init # scaffolds config + AGENTS.md; review before committing
vtcode secret add openai # stores an OpenAI API key in your OS keyring
Replace openai with your provider. You can also provide credentials through environment variables or a workspace
.env; vtcode login supports available login flows. See Getting started and
Provider guides for provider-specific setup.
[!NOTE] ChatGPT OAuth reuses the Codex CLI's public client identity via an unofficial compatibility flow; prefer your own OpenAI API key. GitHub Copilot uses the official
copilotCLI. See OAuth authentication.
[!CAUTION] Never commit API keys or put them in
vtcode.toml.
3. Run your first task
vtcode # open the interactive TUI in your project
Give VT Code a focused request, such as "Explain how this project handles authentication." Review its proposed changes and test results before committing. See Usage for automation and session commands, or getting started for a guided tour.
Usage
Interactive
Use vtcode to explore, plan, and implement changes in the TUI. For larger tasks, start with
read-only planning, then review
turn diffs before committing. See the
interactive guide for controls.
After a task, /explain reviews outcome, changes, decisions, verification, and review priorities without another
model call:
/explain --detailsadds evidence./explain diagramshows execution relationships./explain --webopens the browser view with an offline fallback./explain --export htmlsaves a standalone report.
Scopes and report options: explanation usage.
Headless
Three commands cover automation: ask for a tool-free answer, exec for a tool-enabled coding task, and review
for uncommitted changes:
vtcode ask "explain Rc vs Arc" # one-shot answer, no session, no tools
vtcode exec "refactor main.rs" # headless task with the full tool loop
vtcode review # agent review of uncommitted changes
exec runs the full tool loop, so it requires [automation.full_auto] and full_auto workspace trust. Interactive
terminals prompt for trust; non-TTY runs fail unless VTCODE_TRUST_WORKSPACE=full-auto is set. The tool allow-list,
explicit denies, and execution policy still apply. See exec mode and
full automation for trust, output, and configuration details.
For repeatable, environment-checked results, use the eval framework. A completion message alone is not verification.
Scheduled tasks
For recurring work, use scheduled tasks: durable prompt jobs on the same exec runtime.
# Weekly dependency audit (Mondays 09:00)
vtcode schedule create --name "weekly-dep-audit" \
--cron "0 9 * * 1" \
--prompt "Check for outdated dependencies and report known vulnerabilities"
Sessions
Resume or inspect earlier work:
# Resume the most recent interactive session
vtcode continue
# Continue the last headless run with a follow-up prompt
vtcode exec resume --last "continue the refactor"
# Inspect the execution log
vtcode trajectory
Use vtcode continue --session-id to fork an earlier session.
Integrations
Enable these only when you need them; none are required for the quick start.
| Integration | What it gives you |
|---|---|
| MCP | Connect external tools and data sources. |
| Agent Skills | Load reusable prompt packages on demand. |
| Plugins | Extend the agent with plugin manifests. |
| ACP with Zed | Drive VT Code from the Zed editor. |
| WebMCP | Pair the TUI with an authenticated browser editor via /webmcp pair ; the hosted app (site, mirror) connects through this bridge. See the deployment reference. |
| Memcode MCP | Carry context between tasks; see the design write-up. |
Documentation
Guides grouped by task. The full catalog lives in the documentation index, the docs overview, and the Wiki:
| Goal | Guides |
|---|---|
| Get started | Installation · Getting started · Providers · OAuth login · FAQ · Compatibility |
| Work in the TUI | TUI · Command reference · Planning · Turn diffs · Configuration · Safety |
| Automate | Exec mode · Full automation · Decisions probe · Scheduled tasks · Hooks |
| Extend and integrate | Skills · Plugins · MCP · Editors (ACP) · WebMCP · Memcode |
| Develop and evaluate | Development · Testing · Evals · Architecture · HOVER · Protocols · Loop engineering |
Development
graph LR
BIN[vtcode binary] --> CORE[vtcode-core harness]
BIN --> EVAL[vtcode-eval]
CORE --> LLM[vtcode-llm]
CORE --> SAFETY[vtcode-safety]
CORE --> EVENTS[vtcode-exec-events]
CORE --> CONFIG[vtcode-config]
CORE --> MEMORY[vtcode-memory]
CORE --> UI[vtcode-ui]
Building requires Rust 1.98.1+ (edition 2024); tests need cargo-nextest. The full 23-crate map lives in the
architecture guide.
Context handling separates session history from provider request projections. Local clearing protects complete recent tool batches; headless runs estimate the cleared projection before automatic compaction. See context architecture and the compaction guide for budgets, provider strategies, and persistence boundaries.
git clone https://github.com/vinhnx/VTCode.git
cd VTCode
./scripts/run-debug.sh # build and launch a debug binary
./scripts/check-dev.sh # fast gate: clippy, fmt, check
cargo nextest run # tests (requires cargo-nextest)
CI builds with --locked and RUSTFLAGS="-D warnings"; match locally with
RUSTFLAGS="-D warnings" cargo check --locked. Setup and checks are documented in the
development overview and the testing guide.
Release binaries and notes: GitHub releases.
Contributing
Contributions are welcome in every form:
- Code: pick or propose an issue; keep changes surgical and tested.
- Docs: every user-facing feature lands with its documentation.
- Evals: new suites and regression cases are high-leverage; see the eval guide.
- Bug reports: include
vtcode trajectoryoutput when possible.
Before a PR, see the contribution guide: Conventional Commits (type(scope): subject),
./scripts/check-dev.sh + cargo nextest run, and a focused diff.
Security
Report vulnerabilities privately via GitHub private vulnerability reporting; never open a public issue. Details: security policy.
Community
Thanks to everyone who builds, tests, and improves VT Code. For partnerships, reach the maintainer at
vinhnguyen2308 [at] gmail [dot] com; bugs and feature requests belong in
GitHub Issues.
View all contributors
Security Advisors
Main Contributor
Core Contributors
Contributors
Want to see your avatar here? Every bit counts: one-line fixes, bug reports, and feedback are all welcome.
Report a bug · Request a feature · Share feedback · Star the repo · Contribute
Support the project
Resources
- Building VT Code, a year in: harness design, evals, security, and lessons learned.
- Podcast · Video
Share VT Code
If VT Code helped you ship something, spread the word:
Share on X · Share on Hacker News · Share on LinkedIn · Share via Email · Share via SMS
Sponsorship
VT Code is maintained in spare time; a sponsorship keeps it independent.
License
First-party code is MIT OR Apache-2.0 under LICENSE. Third-party code keeps its original licenses, listed in THIRD-PARTY-NOTICES.
