| name | vx-commands |
| description | Complete vx CLI command reference. Use when looking up specific vx command syntax, flags, output formats, or token-efficient forwarding. vx-native commands support --json, --toon, --compact, and --output-format; forwarded tools keep native output unless compact mode is explicitly requested. |
VX Command Reference
Quick rule: Prefer semantic reduction first: --json with selected fields, then --jq/vx rg filtering, then --compact for broad logs. Set VX_OUTPUT=json, VX_OUTPUT=toon, or VX_OUTPUT=compact only when you want that default for the whole invocation.
Structured Output Commands (AI-Optimized)
vx-native commands support --json, --toon, --compact, and
--output-format <text|json|toon|compact>. Forwarded tools such as vx git,
vx gh, vx cargo, or vx npm keep their native stdout by default; use the
tool's own structured flags first, or add vx --compact ... when broad
subprocess output must be filtered.
Project Analysis
vx analyze --json
vx check --json
vx ai context --json
Output fields (analyze):
ecosystems[] - Detected ecosystems (nodejs, python, rust, go)
dependencies[] - Project dependencies
scripts[] - Available scripts
required_tools[] - Tools needed
Output fields (check):
requirements[] - Tool requirement status
all_satisfied - Whether all constraints are met
missing_tools[] - Tools that need installation
Output fields (ai context):
project - Project info (name, languages, frameworks)
tools[] - Installed tools with versions
scripts[] - Available scripts
constraints[] - Tool constraints
Tool Management
vx list --json
vx versions node --json
vx which node --json
vx search <query> --json
Output fields (list):
runtimes[] - Available runtimes
total - Total count
installed_count - Installed count
Output fields (versions):
versions[] - Available versions with metadata
latest - Latest version
lts - LTS version (if applicable)
Output fields (which):
path - Executable path
version - Resolved version
source - Source (vx, system, global_package)
Installation
vx install node@22 --json
vx sync --json
Output fields (install):
runtime - Runtime name
version - Installed version
path - Installation path
duration_ms - Installation duration
dependencies_installed[] - Dependencies also installed
Output fields (sync):
installed[] - Successfully installed
skipped[] - Skipped (already installed)
failed[] - Failed installations
duration_ms - Total duration
AI Integration
vx ai context
vx ai context --json
vx ai context --minimal
vx ai session init
vx ai session status
vx ai session cleanup
Environment
vx env --json
vx dev --export
Output Formats
JSON Format
vx list --json
TOON Format (Token-Optimized)
vx list --output-format toon
vx list --toon
TOON format is recommended for AI agents - it saves 40-60% tokens compared to JSON.
Compact Format and Forwarded Logs
vx --compact list node
vx list --output-format compact
vx --compact gh run view 789 --log
vx --compact --filter-level aggressive cargo test
Compact mode is RTK-inspired: it strips ANSI noise, collapses repeated lines,
keeps error-looking lines, and enforces a line budget for subprocess output.
Use it after semantic options like gh --json --jq or vx rg filters.
GitHub and CI Triage
vx gh run view 789 --json status,conclusion,jobs --jq '.jobs[] | {name,conclusion}'
vx gh run view 789 --log | vx rg -n -m 80 "error|failed|panic|Traceback|FAILED|warning"
vx --compact gh run view 789 --log
Do not rely on default vx gh or vx git output to save tokens. Their default
behavior is transparent forwarding; savings come from selected fields, --jq,
search filters, or explicit --compact.
Environment Variable
export VX_OUTPUT=json
export VX_OUTPUT=toon
export VX_OUTPUT=compact
export VX_FILTER_LEVEL=normal
Command Groups
Tool Execution
vx <tool> [args...]
vx npm install
vx cargo build
Advanced Execution Syntax
vx node@22 app.js
vx msvc@14.42::cl main.cpp
vx npm:vite
vx uv:ruff check .
vx npm:typescript@5.0::tsc
vx vite
vx meson
vx --with bun@1.1 --with deno node app.js
Tool Management
vx install <tool>@<version>
vx uninstall <tool>
vx list
vx versions <tool>
vx which <tool>
vx switch <tool>@<version>
Project Management
vx init
vx add <tool>
vx remove <tool>
vx sync
vx lock
vx check
Script Execution
vx run <script>
vx run --list
Cache Management
vx cache dir
vx cache clean
Global Flags
--json
--toon
--compact, -u
--output-format <text|json|toon|compact>
--fields <a,b,c>
--filter-level <light|normal|aggressive>
--verbose
--debug
--use-system-path
--cache-mode <mode>
Exit Codes
0 - Success
1 - General error
2 - Tool not found
3 - Installation failed
4 - Version not found
5 - Network error
6 - Permission error
7 - Configuration error