CLI Tool
The TruthVouch CLI provides command-line access to verification APIs, MCP server configuration, and governance workflows. Perfect for developers, security teams, and DevOps engineers.
Installation
npm
npm install -g @truthvouch/cliHomebrew (macOS/Linux)
brew install truthvouch/tap/truthvouchChocolatey (Windows)
choco install truthvouchStandalone Binary
Download prebuilt binaries for your platform from GitHub Releases:
- Linux: x64, arm64
- macOS: x64, arm64
- Windows: x64
Extract to your PATH and run truthvouch --version to verify.
Authentication
Interactive Login
truthvouch loginFollow the prompts to enter your API key. Credentials are stored securely in ~/.truthvouch/config.json.
Environment Variable
Set your API key via environment variable (takes precedence):
export TRUTHVOUCH_API_KEY=vt_live_...truthvouch verify-claim "Paris is the capital of France"Key Commands
Login
truthvouch loginAuthenticate with your TruthVouch API key. Stores credentials for subsequent commands.
MCP Setup
truthvouch mcp setup \ --api-key vt_live_... \ --client claude-codeConfigure MCP server for AI clients. Supported clients:
claude-code(Claude Code)claude-desktop(Claude Desktop)cursor(Cursor IDE)generic(Other MCP-compatible clients)
Examples:
# Claude Code with custom API keytruthvouch mcp setup --api-key vt_live_abc123 --client claude-code
# Cursor IDE (uses TRUTHVOUCH_API_KEY env var)truthvouch mcp setup --client cursor
# Generic MCP clienttruthvouch mcp setup --client genericMCP Remove
truthvouch mcp remove --client claude-codeRemove MCP configuration for one or all clients.
Examples:
# Remove Claude Code configtruthvouch mcp remove --client claude-code
# Remove all MCP configurationstruthvouch mcp removeVerify Data Grounding
truthvouch verify-data \ --query "What country had the highest uplift?" \ --response "Germany had the highest uplift at 23%." \ --sql "SELECT country, uplift FROM sales ORDER BY uplift DESC" \ --raw-results '[{"country": "France", "uplift": 0.181}]'Verify an LLM response against raw query data. Returns per-claim verdicts with evidence.
Output:
{ "overallScore": 0.15, "verdict": "contradicted", "claims": [ { "text": "Germany had the highest uplift", "verdict": "contradicted", "score": 0.15, "evidence": "Data shows France had the highest uplift at 0.181" } ]}Self-Update
truthvouch updateCheck npm registry and update to latest version if available. Cached for 24 hours.
Disable auto-update checks with:
export TRUTHVOUCH_NO_UPDATE_CHECK=1Shell Completions
# Basheval "$(truthvouch completions bash)"
# Add to ~/.bashrc for persistent completions:echo 'eval "$(truthvouch completions bash)"' >> ~/.bashrc
# Zsheval "$(truthvouch completions zsh)"
# Add to ~/.zshrc for persistent completions:echo 'eval "$(truthvouch completions zsh)"' >> ~/.zshrc
# Fishtruthvouch completions fish | source
# Add to ~/.config/fish/config.fish for persistent completions:truthvouch completions fish >> ~/.config/fish/config.fishGlobal Flags
--verbose, -v Show detailed output--quiet, -q Suppress output (except errors)--json Output as JSON (where applicable)--api-key <key> Override TRUTHVOUCH_API_KEY env var--help, -h Show command help--version, -V Show CLI versionExamples
Verify a Claim from the Terminal
truthvouch verify-claim \ "Paris is the capital of France" \ --mode thoroughSet Up MCP for Claude Code
# Step 1: Authenticatetruthvouch login
# Step 2: Configure MCPtruthvouch mcp setup --client claude-code
# Step 3: Restart Claude Code# Restart Claude to load the new MCP configurationBatch Verify Data from a File
# Create a JSON file with queries, responses, and datacat > verify.json << 'EOF'{ "verifications": [ { "query": "What was Q3 revenue?", "response": "Q3 revenue was $50M.", "sql": "SELECT quarter, revenue FROM financials WHERE year = 2025", "rawResults": "[{\"quarter\": \"Q3\", \"revenue\": 45000000}]" } ]}EOF
# Process with jq and CLIcat verify.json | jq -r '.verifications[] | "truthvouch verify-data --query \(.query | @json) --response \(.response | @json)"' | bashTroubleshooting
Command Not Found
Ensure the installation directory is in your PATH:
# npmnpm config get prefix # Verify npm global prefixwhich truthvouch # Should return path like /usr/local/bin/truthvouch
# Homebrewbrew list truthvouch # List files installed
# Add to PATH manuallyexport PATH="/usr/local/bin:$PATH"Authentication Errors
# Clear stored credentialsrm ~/.truthvouch/config.json
# Log in againtruthvouch login
# Or use environment variableexport TRUTHVOUCH_API_KEY=vt_live_...MCP Setup Issues
# Verify MCP configurationcat ~/.truthvouch/mcp-config.json
# Enable verbose loggingtruthvouch mcp setup --client claude-code --verbose
# Reset all MCP configsrm ~/.truthvouch/mcp-config.json