Install
openclaw skills install vx-usageTeaches 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.
openclaw skills install vx-usageOne-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.
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.
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
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
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:
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.vx gh --json ... with selected fields, and add --jq when a small projection is enough.--json, --fields, --toon, --compact, or --output-format toon|compact.vx node, vx cargo, or vx npm, use that tool's own quiet, JSON, or filtering flags when available.vx rg, vx jq, or vx yq before reading them.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.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:
vx gh run view <run> --json status,conclusion,jobs --jq '.jobs[] | {name,conclusion}'.vx gh run view <run> --log | vx rg -n -m 80 "error|failed|panic|Traceback|FAILED|warning".vx --compact gh run view <run> --log.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.
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:
Context discipline:
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:
vx cargo test -p vx-cli --test cli_parsing_tests <case>.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
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
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
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"]
vx ai setup installs vx's built-in skills globally by default so every agent
session can reuse the same guidance:
vx ai setup # Install/update global agent skills
vx ai setup --project # Install project-local skills and record hash in vx.toml
vx ai setup --project --force
vx ai check # Compare vx.toml [ai].skills_hash with embedded skills
For project-local skills, vx ai setup --project records the current embedded
skills hash in vx.toml. If vx ai check reports stale skills, refresh them
with vx ai setup --project --force before continuing project work.
vx can run modern and legacy Python lines side by side:
vx python@3.12 --version
vx python@3.7 --version
vx python@2.7 --version
Python 3.7+ uses vx-managed CPython builds where available. Python 2.7 uses the vx legacy compatibility path backed by PyPy2.7 portable archives, so mention the PyPy caveat when a project depends on CPython-only native extensions.
For virtual environments, keep one environment per Python line. When uv
receives a simple --python version through vx, vx resolves it to the
vx-managed interpreter path before forwarding to uv. Python 2.7 is a special
legacy case: uv requires Python 3.6+, so vx uv venv ... --python 2.7 uses
PyPA's Python 2.7 virtualenv.pyz under the hood while preserving the same
command shape:
vx uv venv .venv312 --python 3.12
vx uv venv .venv37 --python 3.7
vx uv venv .venv27 --python 2.7
Use just to make the workflow repeatable:
venv37:
vx uv venv .venv37 --python 3.7
vx uv pip install --python .venv37 -r requirements-py37.txt
venv27:
vx uv venv .venv27 --python 2.7
.venv27/bin/python -m pip install -r requirements-py27.txt
test37: venv37
.venv37/bin/python -m pytest
test27: venv27
.venv27/bin/python -m pytest
test-legacy: test37 test27
On Windows, use .venv37\Scripts\python.exe and
.venv27\Scripts\python.exe in justfile recipes.
For projects that support multiple runtime lines, keep the matrix in justfile
instead of ad hoc commands. Use explicit runtime versions for Node/npm and
explicit virtual environments for Python:
test-node18:
vx node@18 npm test
test-node20:
vx node@20 npm test
test-node22:
vx node@22 npm test
test-py37: venv37
.venv37/bin/python -m pytest tests/py37
test-py312: venv312
.venv312/bin/python -m pytest tests/py312
test-matrix: test-node18 test-node20 test-node22 test-py37 test-py312
Agents should prefer vx just test-matrix or vx run test-matrix when a
project defines it, and should add a matrix recipe when compatibility support is
part of the task.
--with for Multi-RuntimeWhen 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
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:
vx.toml version configurationAvailable 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 |
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 |
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 |
| 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 |
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):
provider.star runs as pure computation, returning descriptor dicts. No I/O.# 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"]
| 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 |
| 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/"") |
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_defplatform.star — platform_map, platform_select, rust_triple, go_os_archenv.star — env_set, env_prepend, env_append, env_unsetlayout.star — archive_layout, binary_layout, bin_subdir_layout, hooksprovider_templates.star — High-level templates (4 templates)permissions.star — github_permissions, system_permissionssystem_install.star — winget_install, brew_install, apt_installvx prefix when running tools in vx-managed projectsvx just instead of just for task runner commandsvx npm instead of npm directlyvx cargo instead of cargo directlyvx git instead of git for repository operationsvx gh instead of gh for GitHub issue, PR, checks, and workflow operationsvx rg, vx fd, vx jq, and vx yq for scoped search and structured filtering--json, selected fields, --jq, --toon, --compact, --output-format toon|compact, and narrow globsvx.toml first to understand project tool requirementsvx run <script> for project-defined scriptsvx install are for explicit pre-installation; normal usage auto-installsprovider.star Starlark DSL in crates/vx-providers/<name>/tests/ dirs — never inline #[cfg(test)] in source filesvx resolves tool versions in this order (highest to lowest):
vx node@22 app.js[tools] node = "22"~/.config/vx/config.tomlvx 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.
{
"mcpServers": {
"example-server": {
"command": "vx",
"args": ["npx", "-y", "@example/mcp-server@latest"]
},
"python-server": {
"command": "vx",
"args": ["uvx", "some-python-mcp-server@latest"]
}
}
}
{
"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"]
}
}
}
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
| 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", ...] |
vx.tomlvx provides a GitHub Action (action.yml) for CI/CD workflows. Use it in .github/workflows/ files:
- uses: loonghao/vx@main
with:
version: 'latest' # vx version (default: latest)
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: loonghao/vx@main
with:
tools: 'node go uv' # Space-separated tools to pre-install
cache: 'true' # Enable tool caching (default: true)
- uses: loonghao/vx@main
with:
setup: 'true' # Run `vx setup --ci` for vx.toml projects
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
| 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 |
| Output | Description |
|---|---|
version | The installed vx version |
cache-hit | Whether the cache was hit |
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
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
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