Skip to main content
The Veto CLI provides both interactive and headless workflows for managing AI agent safety policies.

Installation Methods

Install globally to use the veto command from anywhere:
npm install -g veto-cli
Verify installation:
veto version

Run Without Installing

Use npx to run the latest version without installing:
npx veto-cli@latest
This is useful for:
  • Trying Veto without committing to an install
  • CI/CD pipelines that need the latest version
  • One-off commands on different machines

Project-Local Install

Install as a dev dependency in your project:
npm install --save-dev veto-cli
Add scripts to your package.json:
{
  "scripts": {
    "veto": "veto",
    "veto:studio": "veto studio",
    "veto:scan": "veto scan --fail-uncovered"
  }
}
Run via npm scripts:
npm run veto:studio

System Requirements

Node.js Version

Node.js 20 or higher is required. Check your Node.js version:
node --version
If you need to upgrade, use nvm or download from nodejs.org.

Terminal Requirements

For the best experience with Veto Studio (interactive TUI):
  • Terminal emulator with 256-color support
  • Minimum dimensions: 80 columns × 24 rows
  • Recommended: 120 columns × 40 rows or larger

Supported Platforms

  • ✅ macOS (Intel & Apple Silicon)
  • ✅ Linux (x64, arm64)
  • ✅ Windows (via WSL2 or Git Bash)
  • ⚠️ Windows CMD/PowerShell (limited - ANSI fallback renderer)

Verify Installation

Run the doctor command to check your setup:
veto doctor
Expected output:
Veto Doctor
===========

 Runtime: Node.js v20.11.0
 Veto directory: /path/to/project/veto
 Config file: veto.config.yaml
 Rules loaded: 12 rules from 3 files

First Run

After installation, initialize Veto in your project:
veto init
This creates:
veto/
  veto.config.yaml    # Main configuration
  rules/
    defaults.yaml     # Default rules
  .env.example        # Example environment variables
Launch the interactive Studio:
veto studio

Configuration

Environment Variables

Veto reads configuration from environment variables:
# Cloud mode (optional)
VETO_API_KEY=your-api-key-here
VETO_API_URL=https://api.veto.so

# Local mode (default)
# No environment variables needed
Create a .env file in your project:
cp veto/.env.example .env

Renderer Selection

Veto Studio supports multiple renderers:
# Auto-detect (default)
veto studio

# Force Ink renderer (best for most terminals)
veto studio --renderer ink

# Force ANSI renderer (fallback for limited terminals)
veto studio --renderer ansi

# Force OpenTUI renderer (experimental)
veto studio --renderer opentui

Theme Selection

# Default Veto theme
veto studio

# Claude theme
veto studio --theme claude

# High contrast theme
veto studio --theme high-contrast

Updating

Global Install

npm update -g veto-cli

Project-Local Install

npm update veto-cli

Check for Updates

veto version
npm view veto-cli version

Troubleshooting

Command Not Found

If veto is not found after global install:
# Check npm global bin directory
npm bin -g

# Add to PATH (bash/zsh)
export PATH="$(npm bin -g):$PATH"

# Add to PATH (fish)
set -gx PATH (npm bin -g) $PATH

Permission Errors

If you get EACCES errors during global install:
# Option 1: Use nvm (recommended)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash
nvm install 20
nvm use 20

# Option 2: Fix npm permissions
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH

Studio Rendering Issues

If Veto Studio doesn’t render correctly:
# Try ANSI renderer
veto studio --renderer ansi

# Check terminal size
tput cols  # Should be >= 80
tput lines # Should be >= 24

Node Version Issues

# Check Node version
node --version

# Should be >= 20.0.0
# Install/upgrade with nvm:
nvm install 20
nvm use 20

Uninstall

Global Install

npm uninstall -g veto-cli

Project-Local Install

npm uninstall veto-cli
Remove Veto files:
rm -rf veto/
rm ~/.veto/cloud-session.json  # If using cloud

Next Steps

Build docs developers (and LLMs) love