Direct Execution
The simplest way to use vx is direct execution — just prefix any command with vx.
Basic Usage
# Language runtimes
vx node --version
vx python --version
vx go version
vx cargo --version
# Package managers
vx npm install
vx uvx ruff check .
vx pnpm dev
# DevOps tools
vx terraform plan
vx kubectl get pods
vx dagu server
# Build tools
vx just build
vx cmake --build buildIf the tool isn't installed, vx will install it automatically.
Specifying Versions
Use @ to specify a version:
# Specific major version
vx node@18 --version
# Exact version
vx node@18.19.0 --version
# Latest
vx node@latest --versionRunning Language Runtimes
Node.js
# Run Node.js scripts
vx node app.js
vx node --eval "console.log('Hello from vx!')"
# Interactive REPL
vx nodePython
# Run Python scripts
vx python main.py
vx python -c "import sys; print(sys.version)"
# Run modules directly
vx python -m http.server 8000
vx python -m json.tool data.jsonGo
# Build and run
vx go build -o myapp ./cmd/server
vx go run main.go
vx go test ./...
# Install Go tools
vx go install golang.org/x/tools/gopls@latestRust / Cargo
# Build projects
vx cargo build --release
vx cargo test
vx cargo run -- --port 8080
# Create new projects
vx cargo new my-cli
vx cargo init .
# Install tools via cargo
vx cargo install ripgrepRunning Package Managers
npm / npx
# Project setup
vx npm init -y
vx npm install express typescript
vx npm run dev
# One-off commands with npx
vx npx create-react-app my-app
vx npx create-next-app@latest my-next-app
vx npx eslint --fix .
vx npx prettier --write .
vx npx tsx script.tspnpm
# Project setup
vx pnpm init
vx pnpm add express
vx pnpm install
vx pnpm dev
# Workspace management
vx pnpm -r build # Build all packages
vx pnpm --filter api dev # Run dev in specific packageyarn
vx yarn init
vx yarn add react react-dom
vx yarn devbun
vx bun init
vx bun add express
vx bun run dev
vx bunx create-next-app my-appuv / uvx (Python)
# Project lifecycle
vx uv init my-project
vx uv add requests flask pytest
vx uv sync
vx uv run python main.py
vx uv run pytest
# Virtual environment management
vx uv venv
vx uv pip install -r requirements.txt
# Run CLI tools without installing (uvx)
vx uvx ruff check . # Lint Python code
vx uvx ruff format . # Format Python code
vx uvx black . # Code formatter
vx uvx mypy src/ # Type checking
vx uvx pytest # Run tests
vx uvx jupyter notebook # Start Jupyter
vx uvx cookiecutter gh:user/repo # Project scaffolding
vx uvx pre-commit run --all-filesRunning DevOps Tools
Terraform
vx terraform init
vx terraform plan
vx terraform apply -auto-approve
vx terraform destroykubectl & Helm
vx kubectl get pods -A
vx kubectl apply -f deployment.yaml
vx helm install my-release ./chart
vx helm upgrade my-release ./chartDagu (Workflow Engine)
# Start the web UI dashboard
vx dagu server
# Run workflows
vx dagu start my-workflow
vx dagu status my-workflow
# Dagu + vx: use vx-managed tools inside DAG definitions
# my-workflow.yaml:
# steps:
# - name: lint
# command: vx uvx ruff check .
# - name: test
# command: vx uv run pytest
# - name: build
# command: vx cargo build --releaseGitHub CLI
vx gh repo clone owner/repo
vx gh pr create --fill
vx gh issue list
vx gh release create v1.0.0Running Build Tools
Just (Modern Make)
# Run tasks
vx just build
vx just test
vx just --list
# Just + vx subprocess PATH: tools available without vx prefix
# justfile:
# lint:
# uvx ruff check . # Works! vx tools in subprocess PATH
# npm run lintCMake & Ninja
vx cmake -B build -G Ninja
vx cmake --build build --config Release
vx ninja -C buildTask (go-task)
vx task build
vx task test
vx task --listRunning Data & Media Tools
# JSON processing
vx jq '.name' package.json
vx jq -r '.dependencies | keys[]' package.json
# Video/audio processing
vx ffmpeg -i input.mp4 -c:v libx264 output.mp4
vx ffprobe -show_format video.mp4
# Image processing
vx magick input.png -resize 50% output.pngPassing Arguments
All arguments after the tool name are passed through:
# These are equivalent
vx node script.js --port 3000
node script.js --port 3000 # (if node is in PATH)
# Complex arguments work too
vx npm run build -- --mode production
vx go build -ldflags "-s -w" -o app
vx cargo build --release --target x86_64-unknown-linux-muslEnvironment Variables
Set environment variables before the command:
# Unix
NODE_ENV=production vx node server.js
RUST_LOG=debug vx cargo run
# Or use env
env DATABASE_URL=postgres://localhost/mydb vx uv run main.pyWorking Directory
vx runs commands in the current directory:
cd my-project
vx npm install # Runs in my-project/Using System Tools
If you want to use a system-installed tool instead of vx-managed:
vx --use-system-path node --versionSubprocess PATH Inheritance
When running a tool via vx, any subprocess spawned by that tool will automatically have access to all vx-managed tools in PATH. This means build tools, task runners, and scripts can use vx-managed tools directly without the vx prefix.
Example: justfile
# justfile — all tools available without vx prefix!
lint:
uvx ruff check .
uvx mypy src/
test:
uv run pytest
build:
npm run build
cargo build --releaseRun with:
vx just lint # justfile recipes can use vx tools directly
vx just test
vx just buildExample: Dagu Workflow
# workflow.yaml — vx tools available in DAG steps
steps:
- name: lint
command: uvx ruff check .
- name: test
command: uv run pytest
depends:
- lint
- name: build
command: cargo build --release
depends:
- testRun with:
vx dagu start workflowExample: Makefile
# Makefile
lint:
uvx ruff check .
test:
npm test
build:
go build -o appRun with:
vx make lint # Make targets can use vx tools directlyDisabling PATH Inheritance
If you need to disable subprocess PATH inheritance (e.g., for isolation), you can configure it in your project's vx.toml:
[settings]
inherit_vx_path = falseVerbose Output
For debugging, use verbose mode:
vx --verbose node --versionThis shows:
- Version resolution
- Installation steps
- Execution details
Real-World Examples
Full-Stack Web App
# Frontend
vx npx create-next-app@latest my-app
cd my-app
vx npm install
vx npm run dev
# Backend API (Python)
vx uv init api && cd api
vx uv add fastapi uvicorn
vx uv run uvicorn main:app --reloadPython Data Science
vx uv init analysis && cd analysis
vx uv add pandas numpy matplotlib scikit-learn
vx uvx jupyter notebook
vx python -c "import pandas; print(pandas.__version__)"Go Microservice
mkdir my-service && cd my-service
vx go mod init github.com/user/my-service
vx go get github.com/gin-gonic/gin
vx go run main.go
vx go build -o server .Rust CLI Tool
vx cargo new my-cli
cd my-cli
vx cargo add clap --features derive
vx cargo build --releaseCross-Language Project with Dagu
# Define a workflow that uses multiple tools
# build-pipeline.yaml:
# steps:
# - name: frontend
# command: npm run build
# dir: frontend/
# - name: backend
# command: cargo build --release
# dir: backend/
# - name: deploy
# command: terraform apply -auto-approve
# depends: [frontend, backend]
vx dagu start build-pipeline
vx dagu server # Monitor via web UI at http://localhost:8080DevOps Automation
# Infrastructure
vx terraform init && vx terraform plan
vx kubectl apply -f k8s/
# CI-like local workflow
vx just ci # Run all CI checks locallyTips
First Run
The first run is slower because tools need to be downloaded and installed. Subsequent runs use cached versions and are much faster.
Version Pinning
Always specify versions for reproducibility in team projects.
Subprocess PATH
When using task runners like just, dagu, or make via vx, all vx-managed tools are automatically available in subprocesses — no vx prefix needed inside recipes/steps.
Next Steps
- Project Environments - Set up project-specific configurations
- Real-World Use Cases - More practical examples
- CLI Reference - Complete command reference