VX - Universal Development Tool Manager
One-sentence summary: vx = prefix any dev tool command with vx → it auto-installs the tool and runs it.
vx is a universal development tool manager that automatically installs and manages
development tools (Node.js, Python/uv, Go, Rust, etc.) with zero configuration.
Core Concept
Instead of requiring users to manually install tools, prefix any command with vx:
vx node --version # Auto-installs Node.js if needed
vx uv pip install x # Auto-installs uv if needed
vx go build . # Auto-installs Go if needed
vx cargo build # Auto-installs Rust if needed
vx just test # Auto-installs just if needed
vx is fully transparent - same commands, same arguments, just add vx prefix.
Essential Commands
Tool Execution (most common)
vx <tool> [args...] # Run any tool (auto-installs if missing)
vx node app.js # Run Node.js
vx python script.py # Run Python (via uv)
vx npm install # Run npm
vx npx create-react-app app # Run npx
vx cargo test # Run cargo
vx just build # Run just (task runner)
vx git status # Run git
vx gh pr status # Run GitHub CLI
Git and GitHub for Codex
When Codex or another AI agent works in a vx-managed repository, use vx-managed
Git and GitHub CLI commands. Do not run bare git or bare gh.
vx git status --short --branch
vx git fetch origin main
vx git checkout -B fix/example origin/main
vx git diff --stat
vx git add path/to/file
vx git commit -m "fix: example"
vx gh issue view 123
vx gh pr view 456 --json title,state,headRefName
vx gh pr checks 456
vx gh run view 789 --json status,conclusion,jobs
Token-Efficient Agent Workflows
vx is not just an installation wrapper. For agents, it is the stable way to use
fast search, structured GitHub queries, JSON filters, and scoped diffs without
spending tokens on irrelevant output.
Prefer narrow, structured commands before broad dumps:
# Search and file discovery
vx rg -n --glob '!target/**' --glob '!node_modules/**' "OutputRenderer"
vx rg --files -g '*.rs' -g '!target/**'
vx fd provider.star crates/vx-providers
# Git context with small output first
vx git status --short --branch
vx git diff --stat
vx git diff --name-only origin/main...HEAD
vx git grep -n "CommandOutput" origin/main -- crates/vx-cli
# GitHub context with selected fields
vx gh issue view 123 --json title,state,labels,body
vx gh pr view 456 --json title,state,headRefName,baseRefName,files
vx gh pr checks 456 --json name,state,conclusion,link
vx gh run view 789 --json status,conclusion,jobs
vx gh run view 789 --json jobs --jq '.jobs[] | {name,conclusion,startedAt,completedAt}'
vx gh run view 789 --log | vx rg -n -m 80 "error|failed|panic|Traceback|warning"
# Structured filtering
vx jq -r '.files[].path' pr.json
vx yq '.jobs | keys' .github/workflows/ci.yml
Token-saving defaults for agents:
- Start with
vx rg, vx fd, vx git diff --stat, and vx git diff --name-only; open full files or full diffs only after locating the relevant surface.
- Use
vx gh --json ... with selected fields, and add --jq when a small projection is enough.
- Use vx structured output flags when the vx command supports them:
--json, --fields, --toon, --compact, or --output-format toon|compact.
- For forwarded runtimes like
vx node, vx cargo, or vx npm, use that tool's own quiet, JSON, or filtering flags when available.
- Pipe large logs through vx-managed filters such as
vx rg, vx jq, or vx yq before reading them.
- Use
vx --compact <tool> ... only when you still need broad subprocess output after structured fields and grep-style filters are not enough. It preserves vx transparency unless explicitly requested.
- Do not expect default
vx git or vx gh forwarding to shrink output; explicit --json, --jq, filtering, or --compact is what saves tokens.
Compression decision tree for CI/log triage:
- Status only:
vx gh run view <run> --json status,conclusion,jobs --jq '.jobs[] | {name,conclusion}'.
- Suspected failure:
vx gh run view <run> --log | vx rg -n -m 80 "error|failed|panic|Traceback|FAILED|warning".
- Broad but bounded context:
vx --compact gh run view <run> --log.
- Last resort: full raw logs, preferably saved to a file and searched locally before being pasted into an agent prompt.
Observed on a successful 5,589-line GitHub Actions run: selected gh --json --jq
projection was about 500 tokens, raw gh --log output was about 226k tokens,
and vx --compact gh --log was about 15.9k tokens. That makes semantic
selection the default, compact mode the fallback for broad context, and raw logs
the exception.
Agent Operating Principles
vx skills should help agents make small, correct, maintainable changes with
bounded context. Treat vx as a token-aware execution layer, not just a command
prefix.
Use this loop for coding tasks:
- Inspect the narrowest relevant file, symbol, diff, log, or test output first.
- Prefer existing project patterns over new helpers or abstractions.
- Make the smallest maintainable change that solves the actual request.
- Validate with the cheapest useful scoped command for the risk involved.
- Summarize only what changed, what was checked, and any remaining risk.
Context discipline:
- Scope before printing. Search paths first, then open focused file sections.
- Avoid dumping full files, broad diffs, generated output, or full CI logs unless the task truly requires them.
- For unknown or potentially huge output, cap and filter with vx-managed tools.
- Do not cap instruction files, skill files, or agent policy files; read the relevant one fully unless it is unexpectedly huge.
- If capped output is insufficient, narrow the query before increasing the cap.
Examples:
vx rg -n -m 20 "render_token_savings|OutputRenderer" crates/vx-cli crates/vx-metrics
vx git diff --stat origin/main...HEAD
vx git diff --name-only origin/main...HEAD
vx gh run view 789 --json status,conclusion,jobs --jq '.jobs[] | {name,conclusion}'
vx gh run view 789 --log | vx rg -n -m 50 "error|failed|panic|Traceback|FAILED"
vx --compact gh run view 789 --log
vx metrics tokens --last 20 --json
Validation discipline:
- Use focused checks first, such as
vx cargo test -p vx-cli --test cli_parsing_tests <case>.
- Run broader checks only when the touched surface or release risk justifies it.
- Prefer evidence from the actual failing command, CI job, or runtime behavior over speculative fixes.
- Do not add wrappers, maps, helper files, or validation layers unless they clearly reduce real complexity.
Tool Management
vx install node@22 # Install specific version
vx install uv go rust # Install multiple tools at once
vx list # List all available tools
vx list --installed # List installed tools only
vx versions node # Show available versions
vx switch node@20 # Switch active version
vx uninstall go@1.21 # Remove a version
Project Management
vx init # Initialize vx.toml for project
vx sync # Install all tools from vx.toml
vx setup # Full project setup (sync + hooks)
vx dev # Enter dev environment with all tools
vx run test # Run project scripts from vx.toml
vx check # Verify tool constraints
vx lock # Generate vx.lock for reproducibility
Environment & Config
vx env list # List environments
vx config show # Show configuration
vx cache info # Show cache usage
vx search <query> # Search available tools
vx info # System info and capabilities
Project Configuration (vx.toml)
Projects use vx.toml in the root directory:
[tools]
node = "22" # Major version
go = "1.22" # Minor version
uv = "latest" # Always latest
rust = "1.80" # Specific version
just = "*" # Any version
[scripts]
dev = "vx npm run dev"
test = "vx cargo test"
lint = "vx npm run lint && vx cargo clippy"
build = "vx just build"
[hooks]
pre_commit = ["vx run lint"]
post_setup = ["vx npm install"]
Using --with for Multi-Runtime
When a command needs additional runtimes available:
vx --with bun node app.js # Node.js + Bun in PATH
vx --with deno npm test # npm + Deno available
Package Aliases
vx supports package aliases — short commands that automatically route to ecosystem packages:
# These are equivalent:
vx vite # Same as: vx npm:vite
vx vite@5.0 # Same as: vx npm:vite@5.0
vx rez # Same as: vx uv:rez
vx pre-commit # Same as: vx uv:pre-commit
vx meson # Same as: vx uv:meson
vx release-please # Same as: vx npm:release-please
Benefits:
- Simpler commands without remembering ecosystem prefixes
- Automatic runtime dependency management (node/python installed as needed)
- Respects project
vx.toml version configuration
Available Aliases:
| Short Command |
Equivalent |
Ecosystem |
vx vite |
vx npm:vite |
npm |
vx release-please |
vx npm:release-please |
npm |
vx rez |
vx uv:rez |
uv |
vx pre-commit |
vx uv:pre-commit |
uv |
vx meson |
vx uv:meson |
uv |
Companion Tool Environment Injection
When vx.toml includes tools like MSVC, vx automatically injects discovery environment variables into all subprocess environments. This allows any tool needing a C/C++ compiler to discover the vx-managed installation.
# vx.toml — MSVC env vars injected for ALL tools
[tools]
node = "22"
cmake = "3.28"
rust = "1.82"
[tools.msvc]
version = "14.42"
os = ["windows"]
Now tools like node-gyp, CMake, Cargo (cc crate) automatically find MSVC:
# node-gyp finds MSVC via VCINSTALLDIR
vx npx node-gyp rebuild
# CMake discovers the compiler
vx cmake -B build -G "Ninja"
# Cargo cc crate finds MSVC for C dependencies
vx cargo build
Injected Environment Variables (MSVC example):
| Variable |
Purpose |
VCINSTALLDIR |
VS install path (node-gyp, CMake) |
VCToolsInstallDir |
Exact toolchain path |
VX_MSVC_ROOT |
vx MSVC root path |
MSVC Build Tools (Windows)
Microsoft Visual C++ compiler for Windows development:
# Install MSVC Build Tools
vx install msvc@latest
vx install msvc 14.40 # Specific version
# Using MSVC tools via namespace
vx msvc cl main.cpp -o main.exe
vx msvc link main.obj
vx msvc nmake
# Direct aliases
vx cl main.cpp # Same as: vx msvc cl
vx nmake # Same as: vx msvc nmake
# Version-specific usage
vx msvc@14.40 cl main.cpp
Available MSVC Tools:
| Tool |
Command |
Description |
| cl |
vx msvc cl |
C/C++ compiler |
| link |
vx msvc link |
Linker |
| lib |
vx msvc lib |
Library manager |
| nmake |
vx msvc nmake |
Make utility |
Supported Tools (142 Providers)
| Category |
Tools |
| JavaScript |
node, npm, npx, bun, deno, pnpm, yarn, vite, nx, turbo |
| JS Tooling |
oxlint, biome |
| Python |
uv, uvx, python, pip, ruff, maturin, pre-commit |
| Rust |
cargo, rustc, rustup |
| Go |
go, gofmt, gws, goreleaser, golangci-lint |
| System/CLI |
git, bash, curl, pwsh, jq, yq, fd, bat, ripgrep, fzf, starship, jj, sd, eza, dust, duf, xh, atuin, zoxide, tealdeer, gping, delta, hyperfine, watchexec, bottom |
| TUI/Terminal |
helix, yazi, zellij, lazygit, lazydocker, k9s |
| Build Tools |
just, task, cmake, ninja, make, meson, xmake, protoc, buf, conan, vcpkg, spack |
| DevOps |
kubectl, helm, flux, kind, k3d, nerdctl, skaffold, podman, terraform, hadolint, dagu, actionlint |
| Security |
gitleaks, trivy, cosign, grype, syft |
| Cloud CLI |
awscli, azcli, gcloud |
| .NET |
dotnet, msbuild, nuget |
| C/C++ |
msvc, llvm, nasm, ccache, buildcache, sccache, rcedit |
| Media |
ffmpeg, imagemagick |
| Java |
java |
| AI |
ollama, openclaw, mcpcall |
| Other Langs |
zig |
| Container |
dive |
| Config Mgmt |
chezmoi, mise |
| Package Managers |
brew, choco, winget |
| Data/API |
duckdb, grpcurl |
| Misc |
gh, prek, actrun, wix, vscode, xcodebuild, systemctl, release-please, rez, 7zip, trippy |
Provider System (Starlark DSL)
All 142 providers are defined using provider.star (Starlark DSL) — a declarative, zero-compilation approach. Each provider lives in crates/vx-providers/<name>/provider.star.
vx uses a two-phase execution model (inspired by Buck2):
- Analysis Phase (Starlark):
provider.star runs as pure computation, returning descriptor dicts. No I/O.
- Execution Phase (Rust): The Rust runtime interprets descriptors for actual downloads, installs, and process execution.
How to add a new tool
# crates/vx-providers/mytool/provider.star
load("@vx//stdlib:provider.star", "runtime_def", "github_permissions")
load("@vx//stdlib:provider_templates.star", "github_rust_provider")
name = "mytool"
description = "My awesome tool"
ecosystem = "custom"
runtimes = [runtime_def("mytool", aliases=["mt"])]
permissions = github_permissions()
# Use a template — covers 90% of tools
_p = github_rust_provider("owner", "mytool",
asset = "mytool-{vversion}-{triple}.{ext}")
fetch_versions = _p["fetch_versions"]
download_url = _p["download_url"]
install_layout = _p["install_layout"]
store_root = _p["store_root"]
get_execute_path = _p["get_execute_path"]
environment = _p["environment"]
Available templates
| Template |
Use case |
Example |
github_rust_provider |
Rust tools on GitHub (most common) |
ripgrep, fd, bat, just, uv |
github_go_provider |
Go tools on GitHub (goreleaser style) |
gh, task |
github_binary_provider |
Single binary download (no archive) |
kubectl |
system_provider |
System package manager only |
7zip |
Template Placeholders
| Placeholder |
Rust template |
Go template |
Description |
{version} |
✓ |
✓ |
Version number (e.g., "1.0.0") |
{vversion} |
✓ |
— |
With v-prefix (e.g., "v1.0.0") |
{triple} |
✓ |
— |
Rust target triple (e.g., "x86_64-unknown-linux-musl") |
{os} |
— |
✓ |
Go GOOS (linux, darwin, windows) |
{arch} |
— |
✓ |
Go GOARCH (amd64, arm64) |
{ext} |
✓ |
✓ |
Archive extension (zip/tar.gz) |
{exe} |
✓ |
✓ |
Executable suffix (.exe/"") |
Starlark Standard Library (14 modules)
Located in crates/vx-starlark/stdlib/. The main entry point is provider.star which re-exports everything:
# Import everything from the unified facade
load("@vx//stdlib:provider.star",
"runtime_def", "bundled_runtime_def", "dep_def",
"github_permissions", "platform_map",
"env_set", "env_prepend",
"archive_layout", "binary_layout")
Key modules:
provider.star — Unified facade (re-exports all)
runtime.star — runtime_def, bundled_runtime_def, dep_def
platform.star — platform_map, platform_select, rust_triple, go_os_arch
env.star — env_set, env_prepend, env_append, env_unset
layout.star — archive_layout, binary_layout, bin_subdir_layout, hooks
provider_templates.star — High-level templates (4 templates)
permissions.star — github_permissions, system_permissions
system_install.star — winget_install, brew_install, apt_install
Important Rules for AI Agents
- Always use
vx prefix when running tools in vx-managed projects
- Use
vx just instead of just for task runner commands
- Use
vx npm instead of npm directly
- Use
vx cargo instead of cargo directly
- Use
vx git instead of git for repository operations
- Use
vx gh instead of gh for GitHub issue, PR, checks, and workflow operations
- Use
vx rg, vx fd, vx jq, and vx yq for scoped search and structured filtering
- Prefer token-efficient output:
--json, selected fields, --jq, --toon, --compact, --output-format toon|compact, and narrow globs
- Check
vx.toml first to understand project tool requirements
- Use
vx run <script> for project-defined scripts
- Never suggest manual tool installation - vx handles it automatically
- Commands like
vx install are for explicit pre-installation; normal usage auto-installs
- Use correct terminology: Runtime (not Tool), Provider (not Plugin), provider.star (not provider config)
- Provider development: New tools are added via
provider.star Starlark DSL in crates/vx-providers/<name>/
- Tests go in
tests/ dirs — never inline #[cfg(test)] in source files
Version Resolution Priority
vx resolves tool versions in this order (highest to lowest):
- Command-line override:
vx node@22 app.js
- Project vx.toml:
[tools] node = "22"
- Parent directory vx.toml (traverses up to root)
- User global config:
~/.config/vx/config.toml
- Provider default: latest stable version
MCP Integration
vx is MCP-ready — replace npx/uvx with vx in MCP server configurations.
This eliminates the "install Node.js/Python first" requirement for all MCP servers.
Configuration Pattern
{
"mcpServers": {
"example-server": {
"command": "vx",
"args": ["npx", "-y", "@example/mcp-server@latest"]
},
"python-server": {
"command": "vx",
"args": ["uvx", "some-python-mcp-server@latest"]
}
}
}
Real-World MCP Examples
{
"mcpServers": {
"filesystem": {
"command": "vx",
"args": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]
},
"github": {
"command": "vx",
"args": ["npx", "-y", "@modelcontextprotocol/server-github"],
"env": { "GITHUB_TOKEN": "<token>" }
},
"sqlite": {
"command": "vx",
"args": ["uvx", "mcp-server-sqlite", "--db-path", "/path/to/db.sqlite"]
}
}
}
Testing MCP Servers with mcpcall
Use the built-in mcpcall provider for scriptable MCP smoke tests. Prefer
compact vx output plus mcpcall JSON output when agents need concise logs:
vx install mcpcall@0.4.0
vx --compact mcpcall list --url http://127.0.0.1:8765/mcp --json
vx --compact mcpcall doctor --url http://127.0.0.1:8765/mcp --json
vx --compact mcpcall call --url http://127.0.0.1:8765/mcp dcc_status --json
Migration Pattern
| Original |
vx-powered |
"command": "npx" |
"command": "vx", "args": ["npx", ...] |
"command": "uvx" |
"command": "vx", "args": ["uvx", ...] |
"command": "node" |
"command": "vx", "args": ["node", ...] |
"command": "python" |
"command": "vx", "args": ["python", ...] |
"command": "bun" |
"command": "vx", "args": ["bun", ...] |
Benefits for AI Agents
- Zero-config: No need to check if Node.js/Python is installed before starting MCP servers
- Version consistency: MCP servers always use the version specified in
vx.toml
- Cross-platform: Same MCP config works on Windows, macOS, and Linux
- CI/CD ready: MCP servers in CI pipelines just work with vx
GitHub Actions Integration
vx provides a GitHub Action (action.yml) for CI/CD workflows. Use it in .github/workflows/ files:
Basic Usage
- uses: loonghao/vx@main
with:
version: 'latest' # vx version (default: latest)
github-token: ${{ secrets.GITHUB_TOKEN }}
Pre-install Tools
- uses: loonghao/vx@main
with:
tools: 'node go uv' # Space-separated tools to pre-install
cache: 'true' # Enable tool caching (default: true)
Project Setup (vx.toml)
- uses: loonghao/vx@main
with:
setup: 'true' # Run `vx setup --ci` for vx.toml projects
Full Example
name: CI
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v6
- uses: loonghao/vx@main
with:
tools: 'node@22 uv'
setup: 'true'
cache: 'true'
- run: vx node --version
- run: vx npm test
Action Inputs
| Input |
Default |
Description |
version |
latest |
vx version to install |
github-token |
${{ github.token }} |
GitHub token for API requests |
tools |
'' |
Space-separated tools to pre-install |
cache |
true |
Enable caching of ~/.vx directory |
cache-key-prefix |
vx-tools |
Custom prefix for cache key |
setup |
false |
Run vx setup --ci for vx.toml projects |
Action Outputs
| Output |
Description |
version |
The installed vx version |
cache-hit |
Whether the cache was hit |
Container Image Support
vx also provides a container image for containerized workflows, and it can be consumed from Podman-compatible environments:
# Use vx as base image
FROM ghcr.io/loonghao/vx:latest
# Tools are auto-installed on first use
RUN vx node --version
RUN vx uv pip install mypackage
Multi-stage Build with vx
FROM ghcr.io/loonghao/vx:latest AS builder
RUN vx node --version && vx npm ci && vx npm run build
FROM nginx:alpine
COPY --from=builder /home/vx/dist /usr/share/nginx/html
GitHub Actions Container Jobs
jobs:
build:
runs-on: ubuntu-latest
container:
image: ghcr.io/loonghao/vx:latest
steps:
- uses: actions/checkout@v6
- run: vx node --version
- run: vx npm test
Source: loonghao/dcc-mcp-3dsmax — distributed by TomeVault.
1---2name: vx-usage-23description: Teaches AI agents how to use vx, the universal dev tool manager. Use when the project has vx.toml or .vx/, or when the user mentions vx, tool version management, Git/GitHub operations, or cross-platform setup. vx auto-manages Node.js, Python, Go, Rust, and 142 providers via Starlark DSL provider.star files. Also covers MCP integration patterns and GitHub Actions. Use when this capability is needed.4---56# VX - Universal Development Tool Manager78> **One-sentence summary**: vx = prefix any dev tool command with `vx` → it auto-installs the tool and runs it.910vx is a universal development tool manager that automatically installs and manages11development tools (Node.js, Python/uv, Go, Rust, etc.) with zero configuration.1213## Core Concept1415Instead of requiring users to manually install tools, prefix any command with `vx`:1617```bash18vx node --version # Auto-installs Node.js if needed19vx uv pip install x # Auto-installs uv if needed20vx go build . # Auto-installs Go if needed21vx cargo build # Auto-installs Rust if needed22vx just test # Auto-installs just if needed23```2425vx is fully transparent - same commands, same arguments, just add `vx` prefix.2627## Essential Commands2829### Tool Execution (most common)30```bash31vx <tool> [args...] # Run any tool (auto-installs if missing)32vx node app.js # Run Node.js33vx python script.py # Run Python (via uv)34vx npm install # Run npm35vx npx create-react-app app # Run npx36vx cargo test # Run cargo37vx just build # Run just (task runner)38vx git status # Run git39vx gh pr status # Run GitHub CLI40```4142### Git and GitHub for Codex4344When Codex or another AI agent works in a vx-managed repository, use vx-managed45Git and GitHub CLI commands. Do not run bare `git` or bare `gh`.4647```bash48vx git status --short --branch49vx git fetch origin main50vx git checkout -B fix/example origin/main51vx git diff --stat52vx git add path/to/file53vx git commit -m "fix: example"5455vx gh issue view 12356vx gh pr view 456 --json title,state,headRefName57vx gh pr checks 45658vx gh run view 789 --json status,conclusion,jobs59```6061### Token-Efficient Agent Workflows6263vx is not just an installation wrapper. For agents, it is the stable way to use64fast search, structured GitHub queries, JSON filters, and scoped diffs without65spending tokens on irrelevant output.6667Prefer narrow, structured commands before broad dumps:6869```bash70# Search and file discovery71vx rg -n --glob '!target/**' --glob '!node_modules/**' "OutputRenderer"72vx rg --files -g '*.rs' -g '!target/**'73vx fd provider.star crates/vx-providers7475# Git context with small output first76vx git status --short --branch77vx git diff --stat78vx git diff --name-only origin/main...HEAD79vx git grep -n "CommandOutput" origin/main -- crates/vx-cli8081# GitHub context with selected fields82vx gh issue view 123 --json title,state,labels,body83vx gh pr view 456 --json title,state,headRefName,baseRefName,files84vx gh pr checks 456 --json name,state,conclusion,link85vx gh run view 789 --json status,conclusion,jobs86vx gh run view 789 --json jobs --jq '.jobs[] | {name,conclusion,startedAt,completedAt}'87vx gh run view 789 --log | vx rg -n -m 80 "error|failed|panic|Traceback|warning"8889# Structured filtering90vx jq -r '.files[].path' pr.json91vx yq '.jobs | keys' .github/workflows/ci.yml92```9394Token-saving defaults for agents:95- Start with `vx rg`, `vx fd`, `vx git diff --stat`, and `vx git diff --name-only`; open full files or full diffs only after locating the relevant surface.96- Use `vx gh --json ...` with selected fields, and add `--jq` when a small projection is enough.97- Use vx structured output flags when the vx command supports them: `--json`, `--fields`, `--toon`, `--compact`, or `--output-format toon|compact`.98- For forwarded runtimes like `vx node`, `vx cargo`, or `vx npm`, use that tool's own quiet, JSON, or filtering flags when available.99- Pipe large logs through vx-managed filters such as `vx rg`, `vx jq`, or `vx yq` before reading them.100- Use `vx --compact <tool> ...` only when you still need broad subprocess output after structured fields and grep-style filters are not enough. It preserves vx transparency unless explicitly requested.101- Do not expect default `vx git` or `vx gh` forwarding to shrink output; explicit `--json`, `--jq`, filtering, or `--compact` is what saves tokens.102103Compression decision tree for CI/log triage:1041. Status only: `vx gh run view <run> --json status,conclusion,jobs --jq '.jobs[] | {name,conclusion}'`.1052. Suspected failure: `vx gh run view <run> --log | vx rg -n -m 80 "error|failed|panic|Traceback|FAILED|warning"`.1063. Broad but bounded context: `vx --compact gh run view <run> --log`.1074. Last resort: full raw logs, preferably saved to a file and searched locally before being pasted into an agent prompt.108109Observed on a successful 5,589-line GitHub Actions run: selected `gh --json --jq`110projection was about 500 tokens, raw `gh --log` output was about 226k tokens,111and `vx --compact gh --log` was about 15.9k tokens. That makes semantic112selection the default, compact mode the fallback for broad context, and raw logs113the exception.114115### Agent Operating Principles116117vx skills should help agents make small, correct, maintainable changes with118bounded context. Treat vx as a token-aware execution layer, not just a command119prefix.120121Use this loop for coding tasks:1221. Inspect the narrowest relevant file, symbol, diff, log, or test output first.1232. Prefer existing project patterns over new helpers or abstractions.1243. Make the smallest maintainable change that solves the actual request.1254. Validate with the cheapest useful scoped command for the risk involved.1265. Summarize only what changed, what was checked, and any remaining risk.127128Context discipline:129- Scope before printing. Search paths first, then open focused file sections.130- Avoid dumping full files, broad diffs, generated output, or full CI logs unless the task truly requires them.131- For unknown or potentially huge output, cap and filter with vx-managed tools.132- Do not cap instruction files, skill files, or agent policy files; read the relevant one fully unless it is unexpectedly huge.133- If capped output is insufficient, narrow the query before increasing the cap.134135Examples:136137```bash138vx rg -n -m 20 "render_token_savings|OutputRenderer" crates/vx-cli crates/vx-metrics139vx git diff --stat origin/main...HEAD140vx git diff --name-only origin/main...HEAD141vx gh run view 789 --json status,conclusion,jobs --jq '.jobs[] | {name,conclusion}'142vx gh run view 789 --log | vx rg -n -m 50 "error|failed|panic|Traceback|FAILED"143vx --compact gh run view 789 --log144vx metrics tokens --last 20 --json145```146147Validation discipline:148- Use focused checks first, such as `vx cargo test -p vx-cli --test cli_parsing_tests <case>`.149- Run broader checks only when the touched surface or release risk justifies it.150- Prefer evidence from the actual failing command, CI job, or runtime behavior over speculative fixes.151- Do not add wrappers, maps, helper files, or validation layers unless they clearly reduce real complexity.152153### Tool Management154```bash155vx install node@22 # Install specific version156vx install uv go rust # Install multiple tools at once157vx list # List all available tools158vx list --installed # List installed tools only159vx versions node # Show available versions160vx switch node@20 # Switch active version161vx uninstall go@1.21 # Remove a version162```163164### Project Management165```bash166vx init # Initialize vx.toml for project167vx sync # Install all tools from vx.toml168vx setup # Full project setup (sync + hooks)169vx dev # Enter dev environment with all tools170vx run test # Run project scripts from vx.toml171vx check # Verify tool constraints172vx lock # Generate vx.lock for reproducibility173```174175### Environment & Config176```bash177vx env list # List environments178vx config show # Show configuration179vx cache info # Show cache usage180vx search <query> # Search available tools181vx info # System info and capabilities182```183184## Project Configuration (vx.toml)185186Projects use `vx.toml` in the root directory:187188```toml189[tools]190node = "22" # Major version191go = "1.22" # Minor version192uv = "latest" # Always latest193rust = "1.80" # Specific version194just = "*" # Any version195196[scripts]197dev = "vx npm run dev"198test = "vx cargo test"199lint = "vx npm run lint && vx cargo clippy"200build = "vx just build"201202[hooks]203pre_commit = ["vx run lint"]204post_setup = ["vx npm install"]205```206207## Using `--with` for Multi-Runtime208209When a command needs additional runtimes available:210211```bash212vx --with bun node app.js # Node.js + Bun in PATH213vx --with deno npm test # npm + Deno available214```215216## Package Aliases217218vx supports **package aliases** — short commands that automatically route to ecosystem packages:219220```bash221# These are equivalent:222vx vite # Same as: vx npm:vite223vx vite@5.0 # Same as: vx npm:vite@5.0224vx rez # Same as: vx uv:rez225vx pre-commit # Same as: vx uv:pre-commit226vx meson # Same as: vx uv:meson227vx release-please # Same as: vx npm:release-please228```229230**Benefits**:231- Simpler commands without remembering ecosystem prefixes232- Automatic runtime dependency management (node/python installed as needed)233- Respects project `vx.toml` version configuration234235**Available Aliases**:236| Short Command | Equivalent | Ecosystem |237|--------------|------------|-----------|238| `vx vite` | `vx npm:vite` | npm |239| `vx release-please` | `vx npm:release-please` | npm |240| `vx rez` | `vx uv:rez` | uv |241| `vx pre-commit` | `vx uv:pre-commit` | uv |242| `vx meson` | `vx uv:meson` | uv |243244## Companion Tool Environment Injection245246When `vx.toml` includes tools like MSVC, vx automatically injects discovery environment variables into **all** subprocess environments. This allows any tool needing a C/C++ compiler to discover the vx-managed installation.247248```toml249# vx.toml — MSVC env vars injected for ALL tools250[tools]251node = "22"252cmake = "3.28"253rust = "1.82"254255[tools.msvc]256version = "14.42"257os = ["windows"]258```259260Now tools like node-gyp, CMake, Cargo (cc crate) automatically find MSVC:261262```bash263# node-gyp finds MSVC via VCINSTALLDIR264vx npx node-gyp rebuild265266# CMake discovers the compiler267vx cmake -B build -G "Ninja"268269# Cargo cc crate finds MSVC for C dependencies270vx cargo build271```272273**Injected Environment Variables** (MSVC example):274| Variable | Purpose |275|----------|---------|276| `VCINSTALLDIR` | VS install path (node-gyp, CMake) |277| `VCToolsInstallDir` | Exact toolchain path |278| `VX_MSVC_ROOT` | vx MSVC root path |279280## MSVC Build Tools (Windows)281282Microsoft Visual C++ compiler for Windows development:283284```bash285# Install MSVC Build Tools286vx install msvc@latest287vx install msvc 14.40 # Specific version288289# Using MSVC tools via namespace290vx msvc cl main.cpp -o main.exe291vx msvc link main.obj292vx msvc nmake293294# Direct aliases295vx cl main.cpp # Same as: vx msvc cl296vx nmake # Same as: vx msvc nmake297298# Version-specific usage299vx msvc@14.40 cl main.cpp300```301302**Available MSVC Tools**:303| Tool | Command | Description |304|------|---------|-------------|305| cl | `vx msvc cl` | C/C++ compiler |306| link | `vx msvc link` | Linker |307| lib | `vx msvc lib` | Library manager |308| nmake | `vx msvc nmake` | Make utility |309310## Supported Tools (142 Providers)311312| Category | Tools |313|----------|-------|314| **JavaScript** | node, npm, npx, bun, deno, pnpm, yarn, vite, nx, turbo |315| **JS Tooling** | oxlint, biome |316| **Python** | uv, uvx, python, pip, ruff, maturin, pre-commit |317| **Rust** | cargo, rustc, rustup |318| **Go** | go, gofmt, gws, goreleaser, golangci-lint |319| **System/CLI** | git, bash, curl, pwsh, jq, yq, fd, bat, ripgrep, fzf, starship, jj, sd, eza, dust, duf, xh, atuin, zoxide, tealdeer, gping, delta, hyperfine, watchexec, bottom |320| **TUI/Terminal** | helix, yazi, zellij, lazygit, lazydocker, k9s |321| **Build Tools** | just, task, cmake, ninja, make, meson, xmake, protoc, buf, conan, vcpkg, spack |322| **DevOps** | kubectl, helm, flux, kind, k3d, nerdctl, skaffold, podman, terraform, hadolint, dagu, actionlint |323| **Security** | gitleaks, trivy, cosign, grype, syft |324| **Cloud CLI** | awscli, azcli, gcloud |325| **.NET** | dotnet, msbuild, nuget |326| **C/C++** | msvc, llvm, nasm, ccache, buildcache, sccache, rcedit |327| **Media** | ffmpeg, imagemagick |328| **Java** | java |329| **AI** | ollama, openclaw, mcpcall |330| **Other Langs** | zig |331| **Container** | dive |332| **Config Mgmt** | chezmoi, mise |333| **Package Managers** | brew, choco, winget |334| **Data/API** | duckdb, grpcurl |335| **Misc** | gh, prek, actrun, wix, vscode, xcodebuild, systemctl, release-please, rez, 7zip, trippy |336337## Provider System (Starlark DSL)338339All 142 providers are defined using **provider.star** (Starlark DSL) — a declarative, zero-compilation approach. Each provider lives in `crates/vx-providers/<name>/provider.star`.340341vx uses a **two-phase execution model** (inspired by Buck2):3421. **Analysis Phase (Starlark)**: `provider.star` runs as pure computation, returning descriptor dicts. No I/O.3432. **Execution Phase (Rust)**: The Rust runtime interprets descriptors for actual downloads, installs, and process execution.344345### How to add a new tool346347```starlark348# crates/vx-providers/mytool/provider.star349load("@vx//stdlib:provider.star", "runtime_def", "github_permissions")350load("@vx//stdlib:provider_templates.star", "github_rust_provider")351352name = "mytool"353description = "My awesome tool"354ecosystem = "custom"355356runtimes = [runtime_def("mytool", aliases=["mt"])]357permissions = github_permissions()358359# Use a template — covers 90% of tools360_p = github_rust_provider("owner", "mytool",361 asset = "mytool-{vversion}-{triple}.{ext}")362fetch_versions = _p["fetch_versions"]363download_url = _p["download_url"]364install_layout = _p["install_layout"]365store_root = _p["store_root"]366get_execute_path = _p["get_execute_path"]367environment = _p["environment"]368```369370### Available templates371372| Template | Use case | Example |373|----------|----------|---------|374| `github_rust_provider` | Rust tools on GitHub (most common) | ripgrep, fd, bat, just, uv |375| `github_go_provider` | Go tools on GitHub (goreleaser style) | gh, task |376| `github_binary_provider` | Single binary download (no archive) | kubectl |377| `system_provider` | System package manager only | 7zip |378379### Template Placeholders380381| Placeholder | Rust template | Go template | Description |382|-------------|---------------|-------------|-------------|383| `{version}` | ✓ | ✓ | Version number (e.g., "1.0.0") |384| `{vversion}` | ✓ | — | With v-prefix (e.g., "v1.0.0") |385| `{triple}` | ✓ | — | Rust target triple (e.g., "x86_64-unknown-linux-musl") |386| `{os}` | — | ✓ | Go GOOS (linux, darwin, windows) |387| `{arch}` | — | ✓ | Go GOARCH (amd64, arm64) |388| `{ext}` | ✓ | ✓ | Archive extension (zip/tar.gz) |389| `{exe}` | ✓ | ✓ | Executable suffix (.exe/"") |390391### Starlark Standard Library (14 modules)392393Located in `crates/vx-starlark/stdlib/`. The main entry point is `provider.star` which re-exports everything:394395```starlark396# Import everything from the unified facade397load("@vx//stdlib:provider.star",398 "runtime_def", "bundled_runtime_def", "dep_def",399 "github_permissions", "platform_map",400 "env_set", "env_prepend",401 "archive_layout", "binary_layout")402```403404Key modules:405- `provider.star` — Unified facade (re-exports all)406- `runtime.star` — `runtime_def`, `bundled_runtime_def`, `dep_def`407- `platform.star` — `platform_map`, `platform_select`, `rust_triple`, `go_os_arch`408- `env.star` — `env_set`, `env_prepend`, `env_append`, `env_unset`409- `layout.star` — `archive_layout`, `binary_layout`, `bin_subdir_layout`, hooks410- `provider_templates.star` — High-level templates (4 templates)411- `permissions.star` — `github_permissions`, `system_permissions`412- `system_install.star` — `winget_install`, `brew_install`, `apt_install`413414## Important Rules for AI Agents4154161. **Always use `vx` prefix** when running tools in vx-managed projects4172. **Use `vx just`** instead of `just` for task runner commands4183. **Use `vx npm`** instead of `npm` directly4194. **Use `vx cargo`** instead of `cargo` directly4205. **Use `vx git`** instead of `git` for repository operations4216. **Use `vx gh`** instead of `gh` for GitHub issue, PR, checks, and workflow operations4227. **Use `vx rg`, `vx fd`, `vx jq`, and `vx yq`** for scoped search and structured filtering4238. **Prefer token-efficient output**: `--json`, selected fields, `--jq`, `--toon`, `--compact`, `--output-format toon|compact`, and narrow globs4249. **Check `vx.toml`** first to understand project tool requirements42510. **Use `vx run <script>`** for project-defined scripts42611. **Never suggest manual tool installation** - vx handles it automatically42712. Commands like `vx install` are for explicit pre-installation; normal usage auto-installs42813. **Use correct terminology**: Runtime (not Tool), Provider (not Plugin), provider.star (not provider config)42914. **Provider development**: New tools are added via `provider.star` Starlark DSL in `crates/vx-providers/<name>/`43015. **Tests go in `tests/` dirs** — never inline `#[cfg(test)]` in source files431432## Version Resolution Priority433434vx resolves tool versions in this order (highest to lowest):4354361. **Command-line override**: `vx node@22 app.js`4372. **Project vx.toml**: `[tools] node = "22"`4383. **Parent directory vx.toml** (traverses up to root)4394. **User global config**: `~/.config/vx/config.toml`4405. **Provider default**: latest stable version441442## MCP Integration443444vx is **MCP-ready** — replace `npx`/`uvx` with `vx` in MCP server configurations.445This eliminates the "install Node.js/Python first" requirement for all MCP servers.446447### Configuration Pattern448449```json450{451 "mcpServers": {452 "example-server": {453 "command": "vx",454 "args": ["npx", "-y", "@example/mcp-server@latest"]455 },456 "python-server": {457 "command": "vx",458 "args": ["uvx", "some-python-mcp-server@latest"]459 }460 }461}462```463464### Real-World MCP Examples465466```json467{468 "mcpServers": {469 "filesystem": {470 "command": "vx",471 "args": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]472 },473 "github": {474 "command": "vx",475 "args": ["npx", "-y", "@modelcontextprotocol/server-github"],476 "env": { "GITHUB_TOKEN": "<token>" }477 },478 "sqlite": {479 "command": "vx",480 "args": ["uvx", "mcp-server-sqlite", "--db-path", "/path/to/db.sqlite"]481 }482 }483}484```485486### Testing MCP Servers with mcpcall487488Use the built-in `mcpcall` provider for scriptable MCP smoke tests. Prefer489compact vx output plus mcpcall JSON output when agents need concise logs:490491```bash492vx install mcpcall@0.4.0493vx --compact mcpcall list --url http://127.0.0.1:8765/mcp --json494vx --compact mcpcall doctor --url http://127.0.0.1:8765/mcp --json495vx --compact mcpcall call --url http://127.0.0.1:8765/mcp dcc_status --json496```497498### Migration Pattern499500| Original | vx-powered |501|----------|------------|502| `"command": "npx"` | `"command": "vx", "args": ["npx", ...]` |503| `"command": "uvx"` | `"command": "vx", "args": ["uvx", ...]` |504| `"command": "node"` | `"command": "vx", "args": ["node", ...]` |505| `"command": "python"` | `"command": "vx", "args": ["python", ...]` |506| `"command": "bun"` | `"command": "vx", "args": ["bun", ...]` |507508### Benefits for AI Agents509510- **Zero-config**: No need to check if Node.js/Python is installed before starting MCP servers511- **Version consistency**: MCP servers always use the version specified in `vx.toml`512- **Cross-platform**: Same MCP config works on Windows, macOS, and Linux513- **CI/CD ready**: MCP servers in CI pipelines just work with vx514515## GitHub Actions Integration516517vx provides a GitHub Action (`action.yml`) for CI/CD workflows. Use it in `.github/workflows/` files:518519### Basic Usage520521```yaml522- uses: loonghao/vx@main523 with:524 version: 'latest' # vx version (default: latest)525 github-token: ${{ secrets.GITHUB_TOKEN }}526```527528### Pre-install Tools529530```yaml531- uses: loonghao/vx@main532 with:533 tools: 'node go uv' # Space-separated tools to pre-install534 cache: 'true' # Enable tool caching (default: true)535```536537### Project Setup (vx.toml)538539```yaml540- uses: loonghao/vx@main541 with:542 setup: 'true' # Run `vx setup --ci` for vx.toml projects543```544545### Full Example546547```yaml548name: CI549on: [push, pull_request]550551jobs:552 build:553 runs-on: ${{ matrix.os }}554 strategy:555 matrix:556 os: [ubuntu-latest, macos-latest, windows-latest]557558 steps:559 - uses: actions/checkout@v6560561 - uses: loonghao/vx@main562 with:563 tools: 'node@22 uv'564 setup: 'true'565 cache: 'true'566567 - run: vx node --version568 - run: vx npm test569```570571### Action Inputs572573| Input | Default | Description |574|-------|---------|-------------|575| `version` | `latest` | vx version to install |576| `github-token` | `${{ github.token }}` | GitHub token for API requests |577| `tools` | `''` | Space-separated tools to pre-install |578| `cache` | `true` | Enable caching of ~/.vx directory |579| `cache-key-prefix` | `vx-tools` | Custom prefix for cache key |580| `setup` | `false` | Run `vx setup --ci` for vx.toml projects |581582### Action Outputs583584| Output | Description |585|--------|-------------|586| `version` | The installed vx version |587| `cache-hit` | Whether the cache was hit |588589## Container Image Support590591vx also provides a container image for containerized workflows, and it can be consumed from Podman-compatible environments:592593594```dockerfile595# Use vx as base image596FROM ghcr.io/loonghao/vx:latest597598# Tools are auto-installed on first use599RUN vx node --version600RUN vx uv pip install mypackage601```602603### Multi-stage Build with vx604605```dockerfile606FROM ghcr.io/loonghao/vx:latest AS builder607RUN vx node --version && vx npm ci && vx npm run build608609FROM nginx:alpine610COPY --from=builder /home/vx/dist /usr/share/nginx/html611```612613### GitHub Actions Container Jobs614615```yaml616jobs:617 build:618 runs-on: ubuntu-latest619 container:620 image: ghcr.io/loonghao/vx:latest621 steps:622 - uses: actions/checkout@v6623 - run: vx node --version624 - run: vx npm test625```626627---628> Source: [loonghao/dcc-mcp-3dsmax](https://github.com/loonghao/dcc-mcp-3dsmax) — distributed by [TomeVault](https://tomevault.io).629<!-- tomevault:4.0:skill_md:2026-06-15 -->