Coding

Vx Commands

Try it

Complete vx CLI command reference. Use when looking up specific vx command syntax, flags, output formats, or token-efficient forwarding. vx-native commands s...

What it does

**Quick rule**: Prefer semantic reduction first: with selected fields, then / filtering, then for broad logs. Set , , or only when you want that default for the whole invocation.

The skill document

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 . 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           # Analyze project structure
vx check --json             # Verify tool constraints
vx ai context --json        # Generate AI-friendly project context

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              # List installed tools
vx versions node --json     # List available versions
vx which node --json        # Find tool location
vx search  --json    # Search for tools

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   # Install tool
vx sync --json              # Sync from vx.toml

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               # Generate AI-friendly context (Markdown)
vx ai context --json        # JSON format
vx ai context --minimal     # Minimal output
vx ai session init          # Initialize session state
vx ai session status        # Show session status
vx ai session cleanup       # Clean up session

Environment

vx env --json               # Show environment variables
vx dev --export             # Export shell environment

Output Formats

JSON Format

vx list --json
# Output: {"runtimes": [...], "total": 50, "installed_count": 5}

TOON Format (Token-Optimized)

vx list --output-format toon
vx list --toon
# Output:
# runtimes[50]{name,installed,description}:
#   node,true,Node.js runtime
#   python,false,Python runtime
#   ...

TOON format is recommended for AI agents - it saves 40-60% tokens compared to JSON.

Compact Format and Forwarded Logs

# vx-native compact summary
vx --compact list node
vx list --output-format compact

# Forwarded subprocess filtering
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

# Smallest useful status view
vx gh run view 789 --json status,conclusion,jobs --jq '.jobs[] | {name,conclusion}'

# Failure search with capped matches
vx gh run view 789 --log | vx rg -n -m 80 "error|failed|panic|Traceback|FAILED|warning"

# Broad fallback without raw-log token cost
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       # Default to JSON output
export VX_OUTPUT=toon       # Default to TOON output
export VX_OUTPUT=compact    # Default to compact output/filtering
export VX_FILTER_LEVEL=normal  # light, normal, aggressive

Command Groups

Tool Execution

vx  [args...]         # Run any tool
vx npm install              # Run npm
vx cargo build              # Run cargo

Advanced Execution Syntax

# Runtime with version
vx node@22 app.js                     # Use specific Node.js version

# Runtime executable override
vx msvc@14.42::cl main.cpp            # Run cl from MSVC runtime

# Package execution (ecosystem:package pattern)
vx npm:vite                            # Run vite via npm
vx uv:ruff check .                    # Run ruff via uv
vx npm:typescript@5.0::tsc            # Run tsc from specific typescript version

# Package aliases (shortcuts)
vx vite                                # Same as: vx npm:vite
vx meson                              # Same as: vx uv:meson

# Multi-runtime composition
vx --with bun@1.1 --with deno node app.js   # Multiple runtimes in PATH

Tool Management

vx install @ # Install tool
vx uninstall          # Uninstall tool
vx list                     # List tools
vx versions           # Show versions
vx which              # Find tool path
vx switch @  # Switch version

Project Management

vx init                     # Initialize vx.toml
vx add                # Add tool to project
vx remove             # Remove tool from project
vx sync                     # Sync tools from vx.toml
vx lock                     # Generate vx.lock
vx check                    # Check constraints

Script Execution

vx run              # Run script from vx.toml
vx run --list               # List available scripts

Cache Management

vx cache dir                # Show cache directory
vx cache clean              # Clean cache

Global Flags

--json                      # JSON output
--toon                      # TOON output
--compact, -u               # Compact RTK-style output / subprocess filter
--output-format    # Output format
--fields             # Field mask for JSON-capable vx commands
--filter-level    # Compact subprocess filter level
--verbose                   # Verbose output
--debug                     # Debug output
--use-system-path           # Use system PATH
--cache-mode          # Cache mode (normal, refresh, offline, no-cache)

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

Related skills

Fetch raw ad creative, app, ranking, and revenue data from AdMapix as structured JSON.

by fly0pants

Stores durable facts in a categorized, plain-markdown vault on disk, alongside your agent's built-in memory.

by Iván1 installs

Find why your productivity system keeps failing, then apply the smallest fix — capacity math, bottleneck routing, durable local notes.

by Iván1 installs

Read and write Excel workbooks, worksheets, ranges, tables, and charts in OneDrive through Microsoft Graph with managed OAuth.

by byungkyu800 installs42 stars

More from loonghao

Browse all skills

Build and modernize DCC-MCP adapters and standalone internal MCP services for Nuke, Blender, Maya, and other DCC hosts.

by loonghao52 installs

Scaffold, validate, and review DCC-MCP skill packages with agent-facing authoring guidance.

by loonghao53 installs

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 managem...

by loonghao33 installs

This skill should be used when OpenClaw needs to install, configure, inspect, or operate `fpt-cli` for Autodesk Flow Production Tracking / ShotGrid workflows...

by loonghao25 installs

Best practices for using vx effectively. Use when following recommended patterns for tool management, project setup, and team workflows with vx.

by loonghao22 installs

Project management guide for vx. Use when setting up a new project, configuring vx.toml, or managing project-level tool versions and scripts.

by loonghao19 installs