Skip to main content

Multi-LLM debate CLI for confident answers

Project description

verd

Five minds enter. They argue, challenge, cross-examine. Only the truth walks out.

verd spawns multiple AI models from different families, has them debate your question across rounds, then a stronger judge delivers the final verdict — with strengths, issues, and actionable fixes.

Use it everywhere: CLI for code reviews, MCP inside Claude Code and Cursor, Slack as @verd in any conversation, or pipe anything into it.

Install

pip install verd

Setup

verd works with any OpenAI-compatible API. Pick one:

Option 1: OpenRouter (easiest, all models, one key)

Sign up at openrouter.ai, get an API key, then:

export OPENAI_API_KEY=sk-or-...
export OPENAI_BASE_URL=https://openrouter.ai/api/v1

Option 2: Direct OpenAI

export OPENAI_API_KEY=sk-...
export OPENAI_BASE_URL=https://api.openai.com/v1

Note: only OpenAI models will work. Edit verd/models.py to use only OpenAI models.

Option 3: LiteLLM proxy (use native keys from any provider)

If you have API keys from multiple providers (Anthropic, Google, OpenAI, etc.):

pip install litellm
litellm --config litellm_config.yaml  # starts local proxy on port 4000

Example litellm_config.yaml:

model_list:
  - model_name: claude-sonnet-4-6
    litellm_params:
      model: anthropic/claude-sonnet-4-20250514
      api_key: sk-ant-...
  - model_name: gpt-5-mini
    litellm_params:
      model: openai/gpt-5-mini
      api_key: sk-...
  - model_name: gemini-2.5-flash
    litellm_params:
      model: gemini/gemini-2.5-flash
      api_key: AIza...

Then point verd at it:

export OPENAI_API_KEY=sk-anything
export OPENAI_BASE_URL=http://localhost:4000/v1

Option 4: Any OpenAI-compatible provider

Azure OpenAI, Together, Groq, Fireworks, etc. — just set the base URL and API key.

Save to .env

Or create a .env file in your working directory:

cp .env.example .env
# edit with your keys

Custom models

Edit verd/models.py to match whatever models your provider supports. The default config uses models available through LiteLLM proxies and OpenRouter.

Usage

# Auto-scan current directory
cd backend && verd "is this production-ready?"

# Single file
verd "is this JWT implementation secure?" -f auth.py

# Multiple files
verd "any issues?" -f auth.py middleware.py routes.py

# Directory
verd "is this codebase sound?" -d src/ --ext .py

# Inline question
verdl "is O(n^2) acceptable for n=1000?"

# Git diffs
verd "are these changes safe?" -g              # unstaged
verd "ready to commit?" -gs                    # staged
verdh "should we merge this?" -gb main         # branch diff

# Pipe
cat auth.py | verd "is this secure?"

# Quiet mode (verdict only, no transcript)
verd "any bugs?" -f app.py -q

# JSON output
verd "any bugs?" -f app.py --json

Modes

Command Models Rounds Speed Cost
verdl 2 1 ~10s ~$0.01
verd 4 2 ~30s ~$0.05
verdh 5 + web search 3 ~70s ~$0.30

Flags

claim                  the question to evaluate (required)

Content input (pick one, or auto-scans current dir):
  -c, --context TEXT     inline content string
  -f FILE [FILE ...]     one or more files
  -d [DIR]               directory (default: current dir)
  -g, --git              unstaged git diff
  -gs, --git-staged      staged git diff
  -gb, --git-branch REF  git diff REF...HEAD

Directory filters:
  --ext EXT [EXT ...]    filter by extension (.py .ts)
  --exclude PATTERN      glob pattern to exclude (test_*)

Output:
  -q, --quiet            hide debate transcript, show only verdict
  --json                 raw JSON output
  --timeout SECONDS      override timeout per model call
  --version              show version

Exit Codes

  • 0 — PASS
  • 1 — FAIL
  • 2 — UNCERTAIN

Useful for scripting: verd "are tests passing?" -f test.py && deploy

MCP — Claude Code / Cursor

Add to ~/.claude.json or ~/.cursor/mcp.json:

{
  "mcpServers": {
    "verd": {
      "command": "verd-mcp",
      "env": {
        "OPENAI_API_KEY": "your-key",
        "OPENAI_BASE_URL": "https://openrouter.ai/api/v1"
      }
    }
  }
}

Then use verd, verdl, or verdh as tools directly in chat.

Slack

Install with Slack dependencies:

pip install verd[slack]

Create a Slack app with Socket Mode, add bot scopes (app_mentions:read, channels:history, chat:write, reactions:write, im:history, im:write, users:read), then:

export SLACK_BOT_TOKEN=xoxb-...
export SLACK_APP_TOKEN=xapp-...
export SLACK_SIGNING_SECRET=...
verd-slack

Usage in Slack:

  • @verd what do you think? — reads thread/channel context, debates, replies
  • @verd deep is this secure? — uses verdh (5 models + web search)
  • @verd quick is this right? — uses verdl (fast)
  • @verd last 50 what's the consensus? — reads last 50 messages
  • /verd should we use Kafka? — slash command with progress updates
  • /verdl is this correct? — quick slash command
  • /verdh any security issues? — deep slash command

How it works

  1. Your question + content gets sent to multiple AI models in parallel
  2. Each model gives its independent assessment (PASS/FAIL/UNCERTAIN)
  3. Models see each other's responses and cross-examine for 1-3 rounds
  4. A stronger judge model synthesizes the debate into a final verdict
  5. You get: verdict, confidence %, strengths, issues, and actionable fixes

The key insight: different models catch different things. Claude spots security issues GPT misses. Gemini catches logic errors DeepSeek overlooks. The debate format forces them to challenge each other rather than just agreeing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

verd-0.1.2.tar.gz (28.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

verd-0.1.2-py3-none-any.whl (29.8 kB view details)

Uploaded Python 3

File details

Details for the file verd-0.1.2.tar.gz.

File metadata

  • Download URL: verd-0.1.2.tar.gz
  • Upload date:
  • Size: 28.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for verd-0.1.2.tar.gz
Algorithm Hash digest
SHA256 40b99dd43a8cadf61abcdbfc89111617f3a9b953a7516493a7420ace9ea5a4dc
MD5 ae160a2b2db5aa0d81861c4cf6101db5
BLAKE2b-256 965259ae528cf8bb985e85b2883beb461eba5c1aa3cb4ae8d7fcc6c67028c6af

See more details on using hashes here.

File details

Details for the file verd-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: verd-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 29.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for verd-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 04a18ad765f83513656f2c46452950d129b250b962417560744c51ebac804571
MD5 ee0dbc88c7b8f6f9823ee4667094d4bc
BLAKE2b-256 da2d7646c5ccb3299935e6eb8ddb2187a45f69ac2ffb761d553f984fd477fca9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page