Go CLI
Command-line tool for Verity with single binary distribution
The Verity CLI is a powerful command-line tool for interacting with the Verity API. Perfect for DevOps workflows, automation scripts, and quick lookups from the terminal.
Installation
Download Binary (Recommended)
Download the latest binary for your platform from GitHub Releases:
# macOS (Apple Silicon)
curl -L https://github.com/Tylerbryy/verity-cli/releases/latest/download/verity-darwin-arm64 -o verity
chmod +x verity
sudo mv verity /usr/local/bin/
# macOS (Intel)
curl -L https://github.com/Tylerbryy/verity-cli/releases/latest/download/verity-darwin-amd64 -o verity
chmod +x verity
sudo mv verity /usr/local/bin/
# Linux
curl -L https://github.com/Tylerbryy/verity-cli/releases/latest/download/verity-linux-amd64 -o verity
chmod +x verity
sudo mv verity /usr/local/bin/
# Windows
# Download verity-windows-amd64.exe from releasesInstall from Source
go install github.com/tylerbryy/verity-cli@latestQuick Start
Set your API key as an environment variable:
export VERITY_API_KEY=vrt_live_YOUR_API_KEYOr pass it with each command:
verity --api-key vrt_live_YOUR_API_KEY check 76942Get your API key from the Developer Console.
Common Use Cases
Check if a Procedure Needs Prior Authorization
# Basic prior auth check
verity prior-auth 27447 --state TX
# With diagnosis codes
verity prior-auth 27447 --diagnosis M17.11 --state TX
# Multiple procedure codes
verity prior-auth 27447 76942 --state CA
# JSON output for scripting
verity prior-auth 27447 --state TX --output json | jq '.data.pa_required'Output:
Prior Authorization Required: true
Confidence: high
Reason: Procedure requires prior authorization in Texas
Matched Policies:
• L33831: Ultrasound Guidance for Needle Placement
• L38942: Diagnostic Ultrasound
Documentation Checklist:
• Medical necessity documentation
• Prior imaging results
• Conservative treatment historyLook Up Procedure Code with Coverage Info
# Basic code lookup
verity check 76942
# With RVU reimbursement data
verity check 76942 --rvu
# With coverage policies
verity check 76942 --policies
# Everything (RVU + policies)
verity check 76942 --rvu --policies
# Filter by jurisdiction
verity check 76942 --jurisdiction JMOutput:
Code: 76942
System: HCPCS
Found: true
Description: Echo guide for biopsy
RVU Data (2026):
Work RVU: 0.65
Facility Price: $64.13
Non-Facility Price: $64.13
Coverage Policies (16 found):
• [covered] Billing and Coding: Varicose Veins
• [covered] Billing and Coding: Nerve Blockade
• [not_covered] Ultrasound Guidance for Trigger Point InjectionsSearch Coverage Policies
# Keyword search
verity policies list --query "ultrasound guidance"
# Filter by policy type
verity policies list --query "diabetes" --type LCD
# Filter by jurisdiction
verity policies list --query "CGM" --jurisdiction JM
# Active policies only
verity policies list --query "surgery" --status active
# JSON output
verity policies list --query "ultrasound" --output json | jq '.data[].policy_id'Output:
Found 50 policies:
ID: A57305
Title: Billing and Coding: Varicose Veins of the Lower Extremity
Type: Article
Jurisdiction: JM
Status: active
---
ID: L33831
Title: Ultrasound Guidance for Needle Placement
Type: LCD
Jurisdiction: J06
Status: active
---Get Detailed Policy Information
# Get policy by ID
verity policies get L33831
# JSON output for parsing
verity policies get L33831 --output json | jq '.data.title'Output:
Policy: L33831
Title: Ultrasound Guidance for Needle Placement
Type: LCD
Status: active
Jurisdiction: J06
Effective Date: 2024-01-01
Description:
This LCD outlines coverage requirements for ultrasound guidance
used during needle placement procedures...
Covered Codes (12):
• 76942 (HCPCS): covered
• 76998 (HCPCS): coveredList MAC Jurisdictions
# List all jurisdictions
verity jurisdictions
# JSON output
verity jurisdictions --output jsonOutput:
Medicare Administrative Contractors (MACs):
JM: Palmetto GBA
States: TX, OK, NM, CO, LA, AR, MS
J05: Novitas Solutions
States: PA, NJ, DE, MD, DC, WV
J06: National Government Services
States: IL, MN, WIResearch Prior Auth with AI Web Search
# Async mode - returns research ID for polling
verity prior-auth research 27447 --payer "UnitedHealthcare" --state TX
# Output:
# Research ID: res_abc123
# Status: pending
# Poll URL: /api/v1/prior-auth/research/res_abc123
#
# Use 'verity prior-auth research-status <research-id>' to check progress
# Check research status
verity prior-auth research-status res_abc123
# Sync mode - waits for completion
verity prior-auth research 27447 --payer "Aetna" --state CA --sync
# JSON output
verity prior-auth research 27447 --payer "UnitedHealthcare" --sync --output json | jq '.data.result.determination'Get Medicaid Spending Data
# Single code
verity spending T1019
# Multiple codes
verity spending T1019 T1020
# Filter by year
verity spending T1019 --year 2023
# JSON output for scripting
verity spending T1019 --output json | jq '.data.T1019.total_paid'Check API Health
verity health
# Output:
# Status: healthy
# Version: 1.0.0
# Timestamp: 2026-02-17T12:00:00Z
#
# Checks:
# database: healthy
# redis: healthySearch Coverage Criteria
# Search criteria text
verity coverage search "BMI greater than 40"
# Filter by section and policy type
verity coverage search "conservative treatment" --section indications --type LCD
# Filter by jurisdiction
verity coverage search "frequency limits" --jurisdiction JM
# JSON output
verity coverage search "BMI" --output json | jq '.data[].text'Compare Policies Across Jurisdictions
# Compare coverage for a procedure
verity policies compare 76942
# Compare specific jurisdictions
verity policies compare 76942 --jurisdictions J05,J06,JM
# Multiple codes with policy type filter
verity policies compare 27447 76942 --type LCD
# JSON output
verity policies compare 76942 --output json | jq '.data.comparison'Scripting & Automation
Check Multiple Codes in a Loop
#!/bin/bash
CODES=("76942" "27447" "99213" "J0585")
for code in "${CODES[@]}"; do
echo "Checking $code..."
verity check "$code" --output json | jq -r '.data.description'
doneMonitor for Policy Changes
#!/bin/bash
# Get changes from the last 24 hours
SINCE=$(date -u -v-24H +"%Y-%m-%dT%H:%M:%SZ") # macOS
# SINCE=$(date -u -d '24 hours ago' +"%Y-%m-%dT%H:%M:%SZ") # Linux
verity policies changes --since "$SINCE" --output json | \
jq -r '.data[] | "\(.policy_id): \(.change_type) - \(.change_summary)"'Pre-submission Prior Auth Check
#!/bin/bash
# Check if procedures need PA before submitting claim
PROCEDURES=("27447" "76942")
DIAGNOSES=("M17.11" "M79.3")
STATE="TX"
result=$(verity prior-auth "${PROCEDURES[@]}" \
--diagnosis "${DIAGNOSES[@]}" \
--state "$STATE" \
--output json)
pa_required=$(echo "$result" | jq -r '.data.pa_required')
if [ "$pa_required" = "true" ]; then
echo "Warning: Prior authorization required!"
echo "$result" | jq -r '.data.documentation_checklist[]'
exit 1
else
echo "No prior authorization needed"
exit 0
fiExport Policy Data to CSV
#!/bin/bash
# Search and export to CSV
verity policies list --query "diabetes" --output json | \
jq -r '.data[] | [.policy_id, .title, .policy_type, .status] | @csv' > policies.csvOutput Formats
The CLI supports multiple output formats:
# Table (default) - human-readable
verity check 76942
# JSON - for scripting
verity check 76942 --output json
# YAML - for configuration
verity check 76942 --output yamlConfiguration File
Save your API key and preferences in a config file:
# Create config file
mkdir -p ~/.verity
cat > ~/.verity/config.yaml << EOF
api-key: vrt_live_YOUR_API_KEY
base-url: https://verity.backworkai.com/api/v1
output: table
EOF
# Now you can use the CLI without --api-key
verity check 76942Global Flags
Available for all commands:
--api-key string # Verity API key (or set VERITY_API_KEY env var)
--base-url string # API base URL (default: https://verity.backworkai.com/api/v1)
--output string # Output format: table, json, yaml (default: table)
--config string # Config file (default: $HOME/.verity/config.yaml)All Commands
verity check <code>
Look up a medical code.
Flags:
--jurisdiction <code>- Filter by MAC jurisdiction--rvu- Include RVU data--policies- Include policy information
Example:
verity check 76942 --rvu --policies --jurisdiction JMverity health
Check API health status.
Example:
verity healthverity prior-auth <codes...>
Check prior authorization requirements.
Flags:
--diagnosis <codes>- Diagnosis codes (ICD-10)--state <state>- Two-letter state code--payer <payer>- Payer (medicare, aetna, uhc, all)
Example:
verity prior-auth 27447 76942 --diagnosis M17.11 --state TXverity prior-auth research <codes...>
Research prior auth requirements via AI web search.
Flags:
--payer <name>- Payer name (e.g., UnitedHealthcare, Aetna)--state <state>- Two-letter state code--diagnosis <codes>- Diagnosis codes (ICD-10)--context <text>- Additional clinical context--sync- Wait for completion
Example:
verity prior-auth research 27447 --payer "UnitedHealthcare" --state TX --syncverity prior-auth research-status <research-id>
Poll the status of a prior auth research task.
Example:
verity prior-auth research-status res_abc123verity policies list
Search and list policies.
Flags:
--query <query>- Search query--type <type>- Policy type (LCD, Article, NCD)--jurisdiction <code>- MAC jurisdiction--status <status>- Status (active, retired, all)--mode <mode>- Search mode (keyword, semantic)
Example:
verity policies list --query "ultrasound" --type LCD --status activeverity policies get <policy-id>
Get detailed policy information.
Example:
verity policies get L33831verity policies changes
Get policy change feed.
Flags:
--since <timestamp>- ISO 8601 timestamp--policy-id <id>- Filter by policy ID--change-type <type>- Change type filter
Example:
verity policies changes --since 2026-01-01T00:00:00Zverity policies compare <codes...>
Compare policies across jurisdictions.
Flags:
--type <type>- Policy type (LCD, Article, NCD)--jurisdictions <codes>- Specific jurisdictions to compare
Example:
verity policies compare 76942 --jurisdictions J05,J06,JMverity jurisdictions
List all MAC jurisdictions.
Example:
verity jurisdictionsverity coverage search <query>
Search coverage criteria text across policies.
Flags:
--section <section>- Filter by section (indications, limitations, documentation)--type <type>- Policy type (LCD, Article, NCD)--jurisdiction <code>- MAC jurisdiction--limit <n>- Results per page (1-100)
Example:
verity coverage search "BMI greater than 40" --section indications --type LCDverity spending <codes...>
Get Medicaid spending data by HCPCS code.
Flags:
--year <year>- Filter to a specific year
Example:
verity spending T1019 T1020 --year 2023Shell Completion
Generate shell completion scripts:
# Bash
verity completion bash > /usr/local/etc/bash_completion.d/verity
# Zsh
verity completion zsh > /usr/local/share/zsh/site-functions/_verity
# Fish
verity completion fish > ~/.config/fish/completions/verity.fish
# PowerShell
verity completion powershell | Out-String | Invoke-ExpressionBuilding from Source
git clone https://github.com/Tylerbryy/verity-cli.git
cd verity-cli
go build -o verity .
./verity --helpBuild for all platforms:
make build-all
# Creates binaries in dist/ for:
# - darwin/amd64, darwin/arm64
# - linux/amd64, linux/arm64
# - windows/amd64Resources
- GitHub: Tylerbryy/verity-cli
- Releases: Download Binaries
- API Reference: All Endpoints
- Issues: Report a bug