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.
Secure, open, universal terminal coding agent in Rust.
[!TIP] New here? Start with Installation, then Getting Started.
- Overview
- Why VT Code
- Architecture
- Quick start
- What's inside
- Documentation
- Development
- Contributing
- Support
- License
Overview
VT Code is an open-source terminal coding agent written in Rust: one static binary for quick interactive sessions and long-running autonomous work alike — no IDE required, no context left behind. It is a harness, not just an LLM wrapper: the model reasons; the runtime supplies everything else — tools, context, sandboxing, state, and verification — turning raw model output into safe, reviewable progress, entirely in your terminal.
[!NOTE] Status: Active development. Local inference and some automation flows are experimental and may change between releases.
- Building VT Code, a year in covering harness design, evals, security, and lessons learned.
- Podcast · Video
Why VT Code
Most agents are a model plus a tool call. VT Code answers each common failure mode with a structural default in the runtime, not a prompt tweak:
| Failure mode | Structural answer |
|---|---|
| Sessions drift | Dynamic context assembly and auto-compaction keep long sessions grounded. Runtime guidance |
| Tool output floods the window | Results spool to disk and are summarized into context on demand; signal stays in, noise stays out. |
| One unreviewed command | Sandboxed, fail-closed execution with adversarial coverage for injection, path/symlink escape, and environment leakage. Security model |
| "Done" is a claim | Built-in evals with pass@k / pass^k and environment-based verification: the agent's own report never counts as success. Eval guide |
Underneath all four: one ThreadEvent
stream records everything a run did, and the
agent loop contract specifies how
turns, tool results, and recovery behave. Extensibility is structural too:
every major model sits behind one interface, and MCP, Skills, Plugins, ACP,
A2A, and WebMCP attach without forking
(MCP ·
Providers). The interface is a
keyboard-first TUI with WCAG AA themes, gated by cargo nextest and CI with
-D warnings (Testing).
Architecture
One binary, four layers. Everything the model touches goes through the harness; nothing bypasses it.
graph LR
subgraph entry [Entry points]
TUI[TUI]
CLI[CLI / exec / cron]
ACP[Editor via ACP]
end
subgraph harness [Harness]
LOOP[Agent loop]
CTX[Context assembly + compaction]
SEC[Tool policy + sandboxed exec]
EVT[(ThreadEvent log)]
end
subgraph ext [Extensions]
MCPX[MCP servers]
SKILLS[Skills]
PLUGINS[Plugins]
end
MODELS[OpenAI · Anthropic · Gemini · local]
TUI --> LOOP
CLI --> LOOP
ACP --> LOOP
LOOP --> CTX
LOOP --> SEC
LOOP <--> EVT
LOOP <--> ext
LOOP <--> MODELS
- Entry points: the TUI, headless
exec/ask, cron schedules, and editors over ACP all drive the same loop. - Harness: context assembly, policy checks, and sandboxing wrap every
model turn; the
ThreadEventlog records everything for replay and rollback. - Extensions and models: attach without patching the core; swap providers without touching your workflow.
Quick start
1. Install
|
# or: brew install vinhnx/tap/vtcode
# or: cargo install vtcode
2. Configure
/secret add <provider> inside the TUI does the same. vtcode login covers
OAuth providers (ChatGPT, GitHub Copilot); plain env vars and workspace
.env still work for CI. See
Getting started for the credential
resolution order.
[!CAUTION] Never commit API keys or put them in
vtcode.toml.
3. Run
See Commands for the complete CLI surface, including headless
exec, one-shot ask, and session resume.
WebMCP browser bridge (opt-in)
Pair the TUI with a browser editor for authenticated, bounded workspace editing:
See the WebMCP user guide for hosts and deployment.
What's inside
One static Rust binary: no runtime dependencies, no plugins to install, nothing to wire up. Everything below ships in the default build.
At a glance: durable sessions · sandboxed execution · every major model · MCP, Skills & plugins · terminal-native TUI · built-in evals
Commands
Bare vtcode opens the interactive TUI. Four subcommands cover most of the
work:
A second tier handles session lifecycle and day-to-day operations:
| Command | Purpose |
|---|---|
vtcode continue |
Resume the last session, or fork it into a new one with --session-id |
vtcode schedule |
Durable recurring prompts, by cron or one-shot; install-service survives restarts |
vtcode secret |
Store provider API keys in your OS keyring, never in shell history or workspace files |
vtcode models |
Inspect, test, and compare providers and models |
vtcode snapshots / vtcode revert |
List and roll back to workspace snapshots |
vtcode tool-policy |
Allow or deny specific tools per workspace |
vtcode trajectory |
Pretty-print run logs for debugging and audits |
vtcode analyze, vtcode check, vtcode schema tools, vtcode man, and
vtcode update round out the operator surface. See vtcode --help for the
full list.
Everyday recipes
# Review only the uncommitted diff, then exit with a verdict
# Nightly dependency audit as a durable cron job
# Resume yesterday's session and fork it for a new experiment
# See exactly what the agent did in the last run
Documentation
| Layer | Guides |
|---|---|
| Start | Installation · Getting started · Wiki |
| Use | TUI · CLI · WebMCP · Automation · Planning · Configuration |
| Extend | Skills · Plugins · MCP · Editors (ACP) |
| Operate | Safety · Protocols · Loop engineering · Architecture |
The full catalog lives in the Documentation Index.
The WebMCP hosted app (fallback mirror) pairs with the TUI bridge; deployment details live in the WebMCP deployment reference.
Development
graph LR
types --> config --> core --> tools --> agent --> TUI
Rust stable, edition 2024, MSRV 1.93. Clone and run the fast gate:
CI runs with RUSTFLAGS="-D warnings" and --locked; match locally with
cargo check --locked. See the
development overview and
testing guide for details.
Contributing
Contributions are welcome:
- Code: pick an open issue or propose one; keep changes surgical and covered by tests.
- Docs: fixes and new guides in
docs/; every user-facing feature should land with its documentation. - Evals: new suites and regression cases are high-leverage contributions.
- Bug reports: include
vtcode trajectoryoutput when possible; it makes runs reproducible.
Before opening a PR: follow Conventional Commits
(type(scope): subject), run ./scripts/check-dev.sh and cargo nextest run,
and keep the diff focused.
Contributors
Thank you to everyone who shaped VT Code.
Support
Sponsorship
VT Code is built and maintained in spare time. If it helped you ship or learn something, a sponsorship keeps the project independent.
License
First-party code is MIT OR Apache-2.0. See LICENSE. Third-party code keeps its original licenses: see THIRD-PARTY-NOTICES.