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
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 = "npm run dev"
test = "cargo test"
lint = "npm run lint && cargo clippy"
build = "just build"
[hooks]
pre_commit = ["vx run lint"]
post_setup = ["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 (114 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 |
| 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, conan, vcpkg, spack |
| DevOps |
kubectl, helm, podman, terraform, hadolint, dagu, actionlint |
| Security |
gitleaks, trivy |
| 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 |
| Other Langs |
zig |
| Container |
dive |
| Config Mgmt |
chezmoi, mise |
| Package Managers |
brew, choco, winget |
| Misc |
gh, prek, actrun, wix, vscode, xcodebuild, systemctl, release-please, rez, 7zip, trippy |
Provider System (Starlark DSL)
All 114 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
- 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"]
}
}
}
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
1---2name: vx-usage3description: 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, or cross-platform setup. vx auto-manages Node.js, Python, Go, Rust, and 105 tools via Starlark DSL providers. Also covers MCP integration patterns and GitHub Actions.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 git39```4041### Tool Management42```bash43vx install node@22 # Install specific version44vx install uv go rust # Install multiple tools at once45vx list # List all available tools46vx list --installed # List installed tools only47vx versions node # Show available versions48vx switch node@20 # Switch active version49vx uninstall go@1.21 # Remove a version50```5152### Project Management53```bash54vx init # Initialize vx.toml for project55vx sync # Install all tools from vx.toml56vx setup # Full project setup (sync + hooks)57vx dev # Enter dev environment with all tools58vx run test # Run project scripts from vx.toml59vx check # Verify tool constraints60vx lock # Generate vx.lock for reproducibility61```6263### Environment & Config64```bash65vx env list # List environments66vx config show # Show configuration67vx cache info # Show cache usage68vx search <query> # Search available tools69vx info # System info and capabilities70```7172## Project Configuration (vx.toml)7374Projects use `vx.toml` in the root directory:7576```toml77[tools]78node = "22" # Major version79go = "1.22" # Minor version80uv = "latest" # Always latest81rust = "1.80" # Specific version82just = "*" # Any version8384[scripts]85dev = "npm run dev"86test = "cargo test"87lint = "npm run lint && cargo clippy"88build = "just build"8990[hooks]91pre_commit = ["vx run lint"]92post_setup = ["npm install"]93```9495## Using `--with` for Multi-Runtime9697When a command needs additional runtimes available:9899```bash100vx --with bun node app.js # Node.js + Bun in PATH101vx --with deno npm test # npm + Deno available102```103104## Package Aliases105106vx supports **package aliases** — short commands that automatically route to ecosystem packages:107108```bash109# These are equivalent:110vx vite # Same as: vx npm:vite111vx vite@5.0 # Same as: vx npm:vite@5.0112vx rez # Same as: vx uv:rez113vx pre-commit # Same as: vx uv:pre-commit114vx meson # Same as: vx uv:meson115vx release-please # Same as: vx npm:release-please116```117118**Benefits**:119- Simpler commands without remembering ecosystem prefixes120- Automatic runtime dependency management (node/python installed as needed)121- Respects project `vx.toml` version configuration122123**Available Aliases**:124| Short Command | Equivalent | Ecosystem |125|--------------|------------|-----------|126| `vx vite` | `vx npm:vite` | npm |127| `vx release-please` | `vx npm:release-please` | npm |128| `vx rez` | `vx uv:rez` | uv |129| `vx pre-commit` | `vx uv:pre-commit` | uv |130| `vx meson` | `vx uv:meson` | uv |131132## Companion Tool Environment Injection133134When `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.135136```toml137# vx.toml — MSVC env vars injected for ALL tools138[tools]139node = "22"140cmake = "3.28"141rust = "1.82"142143[tools.msvc]144version = "14.42"145os = ["windows"]146```147148Now tools like node-gyp, CMake, Cargo (cc crate) automatically find MSVC:149150```bash151# node-gyp finds MSVC via VCINSTALLDIR152vx npx node-gyp rebuild153154# CMake discovers the compiler155vx cmake -B build -G "Ninja"156157# Cargo cc crate finds MSVC for C dependencies158vx cargo build159```160161**Injected Environment Variables** (MSVC example):162| Variable | Purpose |163|----------|---------|164| `VCINSTALLDIR` | VS install path (node-gyp, CMake) |165| `VCToolsInstallDir` | Exact toolchain path |166| `VX_MSVC_ROOT` | vx MSVC root path |167168## MSVC Build Tools (Windows)169170Microsoft Visual C++ compiler for Windows development:171172```bash173# Install MSVC Build Tools174vx install msvc@latest175vx install msvc 14.40 # Specific version176177# Using MSVC tools via namespace178vx msvc cl main.cpp -o main.exe179vx msvc link main.obj180vx msvc nmake181182# Direct aliases183vx cl main.cpp # Same as: vx msvc cl184vx nmake # Same as: vx msvc nmake185186# Version-specific usage187vx msvc@14.40 cl main.cpp188```189190**Available MSVC Tools**:191| Tool | Command | Description |192|------|---------|-------------|193| cl | `vx msvc cl` | C/C++ compiler |194| link | `vx msvc link` | Linker |195| lib | `vx msvc lib` | Library manager |196| nmake | `vx msvc nmake` | Make utility |197198## Supported Tools (114 Providers)199200| Category | Tools |201|----------|-------|202| **JavaScript** | node, npm, npx, bun, deno, pnpm, yarn, vite, nx, turbo |203| **JS Tooling** | oxlint, biome |204| **Python** | uv, uvx, python, pip, ruff, maturin, pre-commit |205| **Rust** | cargo, rustc, rustup |206| **Go** | go, gofmt, gws |207| **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 |208| **TUI/Terminal** | helix, yazi, zellij, lazygit, lazydocker, k9s |209| **Build Tools** | just, task, cmake, ninja, make, meson, xmake, protoc, conan, vcpkg, spack |210| **DevOps** | kubectl, helm, podman, terraform, hadolint, dagu, actionlint |211| **Security** | gitleaks, trivy |212| **Cloud CLI** | awscli, azcli, gcloud |213| **.NET** | dotnet, msbuild, nuget |214| **C/C++** | msvc, llvm, nasm, ccache, buildcache, sccache, rcedit |215| **Media** | ffmpeg, imagemagick |216| **Java** | java |217| **AI** | ollama, openclaw |218| **Other Langs** | zig |219| **Container** | dive |220| **Config Mgmt** | chezmoi, mise |221| **Package Managers** | brew, choco, winget |222| **Misc** | gh, prek, actrun, wix, vscode, xcodebuild, systemctl, release-please, rez, 7zip, trippy |223224## Provider System (Starlark DSL)225226All 114 providers are defined using **provider.star** (Starlark DSL) — a declarative, zero-compilation approach. Each provider lives in `crates/vx-providers/<name>/provider.star`.227228vx uses a **two-phase execution model** (inspired by Buck2):2291. **Analysis Phase (Starlark)**: `provider.star` runs as pure computation, returning descriptor dicts. No I/O.2302. **Execution Phase (Rust)**: The Rust runtime interprets descriptors for actual downloads, installs, and process execution.231232### How to add a new tool233234```starlark235# crates/vx-providers/mytool/provider.star236load("@vx//stdlib:provider.star", "runtime_def", "github_permissions")237load("@vx//stdlib:provider_templates.star", "github_rust_provider")238239name = "mytool"240description = "My awesome tool"241ecosystem = "custom"242243runtimes = [runtime_def("mytool", aliases=["mt"])]244permissions = github_permissions()245246# Use a template — covers 90% of tools247_p = github_rust_provider("owner", "mytool",248 asset = "mytool-{vversion}-{triple}.{ext}")249fetch_versions = _p["fetch_versions"]250download_url = _p["download_url"]251install_layout = _p["install_layout"]252store_root = _p["store_root"]253get_execute_path = _p["get_execute_path"]254environment = _p["environment"]255```256257### Available templates258259| Template | Use case | Example |260|----------|----------|---------|261| `github_rust_provider` | Rust tools on GitHub (most common) | ripgrep, fd, bat, just, uv |262| `github_go_provider` | Go tools on GitHub (goreleaser style) | gh, task |263| `github_binary_provider` | Single binary download (no archive) | kubectl |264| `system_provider` | System package manager only | 7zip |265266### Template Placeholders267268| Placeholder | Rust template | Go template | Description |269|-------------|---------------|-------------|-------------|270| `{version}` | ✓ | ✓ | Version number (e.g., "1.0.0") |271| `{vversion}` | ✓ | — | With v-prefix (e.g., "v1.0.0") |272| `{triple}` | ✓ | — | Rust target triple (e.g., "x86_64-unknown-linux-musl") |273| `{os}` | — | ✓ | Go GOOS (linux, darwin, windows) |274| `{arch}` | — | ✓ | Go GOARCH (amd64, arm64) |275| `{ext}` | ✓ | ✓ | Archive extension (zip/tar.gz) |276| `{exe}` | ✓ | ✓ | Executable suffix (.exe/"") |277278### Starlark Standard Library (14 modules)279280Located in `crates/vx-starlark/stdlib/`. The main entry point is `provider.star` which re-exports everything:281282```starlark283# Import everything from the unified facade284load("@vx//stdlib:provider.star",285 "runtime_def", "bundled_runtime_def", "dep_def",286 "github_permissions", "platform_map",287 "env_set", "env_prepend",288 "archive_layout", "binary_layout")289```290291Key modules:292- `provider.star` — Unified facade (re-exports all)293- `runtime.star` — `runtime_def`, `bundled_runtime_def`, `dep_def`294- `platform.star` — `platform_map`, `platform_select`, `rust_triple`, `go_os_arch`295- `env.star` — `env_set`, `env_prepend`, `env_append`, `env_unset`296- `layout.star` — `archive_layout`, `binary_layout`, `bin_subdir_layout`, hooks297- `provider_templates.star` — High-level templates (4 templates)298- `permissions.star` — `github_permissions`, `system_permissions`299- `system_install.star` — `winget_install`, `brew_install`, `apt_install`300301## Important Rules for AI Agents3023031. **Always use `vx` prefix** when running tools in vx-managed projects3042. **Use `vx just`** instead of `just` for task runner commands3053. **Use `vx npm`** instead of `npm` directly3064. **Use `vx cargo`** instead of `cargo` directly3075. **Check `vx.toml`** first to understand project tool requirements3086. **Use `vx run <script>`** for project-defined scripts3097. **Never suggest manual tool installation** - vx handles it automatically3108. Commands like `vx install` are for explicit pre-installation; normal usage auto-installs3119. **Use correct terminology**: Runtime (not Tool), Provider (not Plugin), provider.star (not provider config)31210. **Provider development**: New tools are added via `provider.star` Starlark DSL in `crates/vx-providers/<name>/`31311. **Tests go in `tests/` dirs** — never inline `#[cfg(test)]` in source files314315## Version Resolution Priority316317vx resolves tool versions in this order (highest to lowest):3183191. **Command-line override**: `vx node@22 app.js`3202. **Project vx.toml**: `[tools] node = "22"`3213. **Parent directory vx.toml** (traverses up to root)3224. **User global config**: `~/.config/vx/config.toml`3235. **Provider default**: latest stable version324325## MCP Integration326327vx is **MCP-ready** — replace `npx`/`uvx` with `vx` in MCP server configurations.328This eliminates the "install Node.js/Python first" requirement for all MCP servers.329330### Configuration Pattern331332```json333{334 "mcpServers": {335 "example-server": {336 "command": "vx",337 "args": ["npx", "-y", "@example/mcp-server@latest"]338 },339 "python-server": {340 "command": "vx",341 "args": ["uvx", "some-python-mcp-server@latest"]342 }343 }344}345```346347### Real-World MCP Examples348349```json350{351 "mcpServers": {352 "filesystem": {353 "command": "vx",354 "args": ["npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/dir"]355 },356 "github": {357 "command": "vx",358 "args": ["npx", "-y", "@modelcontextprotocol/server-github"],359 "env": { "GITHUB_TOKEN": "<token>" }360 },361 "sqlite": {362 "command": "vx",363 "args": ["uvx", "mcp-server-sqlite", "--db-path", "/path/to/db.sqlite"]364 }365 }366}367```368369### Migration Pattern370371| Original | vx-powered |372|----------|------------|373| `"command": "npx"` | `"command": "vx", "args": ["npx", ...]` |374| `"command": "uvx"` | `"command": "vx", "args": ["uvx", ...]` |375| `"command": "node"` | `"command": "vx", "args": ["node", ...]` |376| `"command": "python"` | `"command": "vx", "args": ["python", ...]` |377| `"command": "bun"` | `"command": "vx", "args": ["bun", ...]` |378379### Benefits for AI Agents380381- **Zero-config**: No need to check if Node.js/Python is installed before starting MCP servers382- **Version consistency**: MCP servers always use the version specified in `vx.toml`383- **Cross-platform**: Same MCP config works on Windows, macOS, and Linux384- **CI/CD ready**: MCP servers in CI pipelines just work with vx385386## GitHub Actions Integration387388vx provides a GitHub Action (`action.yml`) for CI/CD workflows. Use it in `.github/workflows/` files:389390### Basic Usage391392```yaml393- uses: loonghao/vx@main394 with:395 version: 'latest' # vx version (default: latest)396 github-token: ${{ secrets.GITHUB_TOKEN }}397```398399### Pre-install Tools400401```yaml402- uses: loonghao/vx@main403 with:404 tools: 'node go uv' # Space-separated tools to pre-install405 cache: 'true' # Enable tool caching (default: true)406```407408### Project Setup (vx.toml)409410```yaml411- uses: loonghao/vx@main412 with:413 setup: 'true' # Run `vx setup --ci` for vx.toml projects414```415416### Full Example417418```yaml419name: CI420on: [push, pull_request]421422jobs:423 build:424 runs-on: ${{ matrix.os }}425 strategy:426 matrix:427 os: [ubuntu-latest, macos-latest, windows-latest]428429 steps:430 - uses: actions/checkout@v6431432 - uses: loonghao/vx@main433 with:434 tools: 'node@22 uv'435 setup: 'true'436 cache: 'true'437438 - run: vx node --version439 - run: vx npm test440```441442### Action Inputs443444| Input | Default | Description |445|-------|---------|-------------|446| `version` | `latest` | vx version to install |447| `github-token` | `${{ github.token }}` | GitHub token for API requests |448| `tools` | `''` | Space-separated tools to pre-install |449| `cache` | `true` | Enable caching of ~/.vx directory |450| `cache-key-prefix` | `vx-tools` | Custom prefix for cache key |451| `setup` | `false` | Run `vx setup --ci` for vx.toml projects |452453### Action Outputs454455| Output | Description |456|--------|-------------|457| `version` | The installed vx version |458| `cache-hit` | Whether the cache was hit |459460## Container Image Support461462vx also provides a container image for containerized workflows, and it can be consumed from Podman-compatible environments:463464465```dockerfile466# Use vx as base image467FROM ghcr.io/loonghao/vx:latest468469# Tools are auto-installed on first use470RUN vx node --version471RUN vx uv pip install mypackage472```473474### Multi-stage Build with vx475476```dockerfile477FROM ghcr.io/loonghao/vx:latest AS builder478RUN vx node --version && vx npm ci && vx npm run build479480FROM nginx:alpine481COPY --from=builder /home/vx/dist /usr/share/nginx/html482```483484### GitHub Actions Container Jobs485486```yaml487jobs:488 build:489 runs-on: ubuntu-latest490 container:491 image: ghcr.io/loonghao/vx:latest492 steps:493 - uses: actions/checkout@v6494 - run: vx node --version495 - run: vx npm test496```