Skip to main content

debatr

Run AI debates from your terminal, and give AI agents a debate tool over MCP.

debatr is the command-line client for Debatr, the AI debate studio: pick a question and the models, watch them argue live in your terminal and get the judge's verdict. The same package is an MCP server, so Claude, Cursor and other agents can stage a debate to stress-test a decision or see both sides of a question.

$ debatr run "Should cities ban cars from their centres?" -d anthropic/claude-sonnet-4.5 -d openai/gpt-5

● The Host  HOST · openrouter/free
Welcome! Today two models take on car-free city centres…

● Nova  PRO · anthropic/claude-sonnet-4.5
Cities belong to people, not parked metal…

● Atlas  CON · openai/gpt-5
A ban hits the people with the fewest alternatives first…

╭─ ⚖ The judge's verdict ─────────────────────────────╮
│ Winner: Nova                                        │
│ Nova grounded every claim in what cities measured.  │
╰─────────────────────────────────────────────────────╯
✓ Completed  ·  7 turns  ·  provider cost $0.0213

Install

uv tool install debatr        # or: pipx install debatr
debatr --help

No install needed for a one-off: uvx debatr run "Tabs or spaces?". Python 3.10+ is required (uv fetches one if you have none).

Sign in

debatr login

This opens Debatr in your browser and asks you to confirm a code (like gh auth login). You can give this computer a spending limit there. The token is saved in ~/.config/debatr/config.json (readable only by you) and can be revoked at any time under Account → API tokens on the website, or with debatr logout.

For CI and scripts, create a token under Account → API tokens and pass it in the environment:

export DEBATR_TOKEN=debatr_…
debatr whoami

A token acts as you for debates and spending, but can never change your password, keys or payments, or create other tokens.

Run a debate

debatr run "Is remote work better for juniors?"                 # two free models
debatr run "Nuclear or renewables?" \
  -d anthropic/claude-sonnet-4.5 -n Ada -s "A nuclear engineer" \
  -d google/gemini-2.5-pro -n Ben -s "A grid operator who favours renewables" \
  --rounds 3 --length medium
debatr run "Should we rewrite it in Rust?" --context "A 40k-line Go service, team of 4" --json
Option What it does
-d, --debater MODEL A debater's model; repeat for each (1–7). Default: openrouter/free twice.
-n, --name / -s, --stance Names and personas, in the order of -d. By default the first argues for, the second against.
--host MODEL / --no-host The host opens each round and judges (default openrouter/free).
-r, --rounds, -l, --length 1–10 rounds; turns very_short, short, medium or long.
--language, --intensity, --style Debate language, 1 calm … 10 fierce, markdown or spoken.
-c, --context TEXT Background the speakers should know.
--scenes, --fact-check Design charts and schemes for the web page; web fact-check of the figures (paid).
--audio, --voices Voice it when done (free edge voices or premium elevenlabs).
--public Publish to the gallery when finished (after an automatic content check). Private by default.
-y, --yes, --max-cost USD Start paid runs without a prompt; refuse runs estimated above a limit.
--detach, --json Print the id and return at once; or no live output, a JSON result at the end.
--config FILE, --print-config Use a full request body; print the one the options make.

Every run is estimated first. Free models cost nothing; paid models are charged to your Debatr credits (or to your own OpenRouter key: set DEBATR_OPENROUTER_KEY). Without a terminal (CI, agents), a paid run needs --yes or --max-cost. Press Ctrl+C to stop following a debate: you are asked whether to stop it on the server too.

More commands

Command What it does
debatr models [WORDS] [--free] Models you can cast, newest first, with prices per million tokens.
debatr watch DEBATE Follow a running debate live, or replay a finished one.
debatr show DEBATE [-f text|markdown|json] [-o FILE] Transcript and verdict; export as Markdown or JSON.
debatr list [WORDS] [--status S] Your debates.
debatr stop / delete / publish / unpublish DEBATE Manage a debate.
debatr open DEBATE Open it in the browser: player, audience vote, video export.
debatr audio DEBATE [--build] [-o FILE] Download the voiced debate as MP3 (--build voices it first).
debatr gallery [WORDS] [--sort trending|new|top] Browse public debates.
debatr leaderboard [--free] Models ranked by audience votes.
debatr whoami / logout The account, balance and token; sign out and revoke the token.

DEBATE is an id, a link (…/debate/<id>, …/d/<slug>) or a share slug. Commands that print data accept --json. Exit codes: 0 success, 1 an error or a debate that did not complete, 130 interrupted.

For AI agents (MCP)

debatr mcp runs an MCP server on stdio. Sign in once with debatr login (or pass DEBATR_TOKEN), then add it to your agent:

Claude Code

claude mcp add debatr --scope user -- uvx debatr mcp

Claude Desktop, Cursor, Windsurf and other clients (mcpServers in their config file):

{
  "mcpServers": {
    "debatr": {
      "command": "uvx",
      "args": ["debatr", "mcp"],
      "env": { "DEBATR_MAX_COST_USD": "0.50" }
    }
  }
}

Desktop apps do not always see your shell's PATH: if uvx is not found, use its full path (which uvx). Add "DEBATR_TOKEN": "debatr_…" to env to use a dedicated token instead of your debatr login.

Tool What it does
start_debate Starts a debate and returns its id at once (a debate takes 1–5 minutes).
get_debate Status, progress, verdict and transcript; wait_seconds waits for the end and reports progress per turn.
estimate_debate Price and length before starting.
list_models, get_leaderboard Models to cast, and how audiences rank them.
list_my_debates, search_gallery The user's debates; public debates to read.
stop_debate, publish_debate, get_account Manage a debate; balance and the token's limit.

Agents spend your credits only within two limits: the token's own spending limit (set it when you approve debatr login or create the token) and DEBATR_MAX_COST_USD, the most one debate may cost through this server (default 1.00). Debates started by agents are private unless they ask to publish them.

Configuration

Variable Meaning
DEBATR_URL Server to use (default: the one you signed in to, else https://ai-debates.net). Same as --url.
DEBATR_TOKEN API token; takes precedence over debatr login.
DEBATR_OPENROUTER_KEY Your OpenRouter key: models run on your account instead of your credits. Never stored by Debatr.
DEBATR_ELEVENLABS_KEY Your ElevenLabs key for --voices elevenlabs.
DEBATR_MAX_COST_USD MCP server: the most one debate may cost (default 1.00).
DEBATR_CONFIG_DIR Where logins are saved (default ~/.config/debatr, %APPDATA%\debatr on Windows).

Self-hosted Debatr: point the CLI at your server with --url (or DEBATR_URL), e.g. debatr --url http://localhost login. Logins are kept per server.

Development

The package lives in the cli/ folder of the Debatr repository and only uses the public REST API (/api/docs on any Debatr server).

cd cli
uv sync
uv run debatr --url http://localhost --help
uv run pytest -q && uv run ruff check . && uv run pyright

Releases are published to PyPI by GitHub Actions when a cli-vX.Y.Z tag is pushed (the version lives in src/debatr/__init__.py).

License

MIT

Metadata

Release files for debatr 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for debatr 0.1.0
File Size Uploaded Provenance
debatr-0.1.0.tar.gz 47.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for debatr 0.1.0
File Interpreter ABI Platform
debatr-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 88.5 kB

Release files / debatr-0.1.0.tar.gz

Download URL debatr-0.1.0.tar.gz
Size 47.4 kB
Tags Source
SHA-256 checksum
How to use checksums
96e489d2e9ad18c710f7ef295a3b2a0de691295e12b8b8877f6d7b04aac392e4
BLAKE2b-256 checksum
How to use checksums
5a05bd29d808a92b2b2cdf5a89656cf48410871f6959ae2c2cac664852d5337b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Release files / debatr-0.1.0-py3-none-any.whl

Download URL debatr-0.1.0-py3-none-any.whl
Size 41.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c32a16d2a41a77c44c092db3c200a79792e0b5dc3b4eaced80eade27ddce5d1
BLAKE2b-256 checksum
How to use checksums
7900638eab71f99b122f648985cb19338fe511a35e9273c3c502d93b8cc87ced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

Security for debatr 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for debatr-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 17, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page