Development Setup
June 17, 2026 ยท View on GitHub
Canonical local setup for contributing to VT Code.
Prerequisites
- Rust toolchain (stable) via rustup
- Git
- One LLM provider API key for local interactive runs (
OPENAI_API_KEY,ANTHROPIC_API_KEY,GEMINI_API_KEY,GOOGLE_API_KEY,ZAI_API_KEY,MOONSHOT_API_KEY,STEPFUN_API_KEY, orMINIMAX_API_KEY)
One-Time Setup
git clone https://github.com/vinhnx/vtcode.git
cd vtcode
./scripts/setup.sh --with-hooks
./scripts/setup.sh verifies rustfmt/clippy, installs cargo-nextest when missing, and runs cargo check.
For debug or release launches:
./scripts/run.sh
./scripts/run-debug.sh
Daily Development Loop
# Fast compile check
cargo check
# Fast test loop (recommended)
cargo nextest run
# Fallback if nextest is unavailable
cargo test --workspace
Full Quality Gate
./scripts/check.sh
This runs formatting checks, linting, governance checks, build, tests (nextest-first), and docs generation.
Common Commands
# Format
cargo fmt --all
# Lint (deny warnings)
cargo clippy --workspace --all-targets --all-features -- -D warnings
# Build
cargo build --workspace
# Docs
cargo doc --workspace --no-deps --document-private-items
Troubleshooting
cargo nextestmissing:- Run
cargo install cargo-nextest --locked
- Run
- API key missing for interactive runs:
- Export one provider key, for example
export OPENAI_API_KEY="sk-..."
- Export one provider key, for example
- Script permissions:
- Run
chmod +x scripts/*.sh
- Run