Second Opinion
A cross-referencing debate CLI. Two frontier debater models (e.g. Opus 4.8, GPT 5.2) independently answer your question, then debate it — critiquing and rebutting each other with evidence and live web search. A separate, cheaper judge model (e.g. Sonnet 4.6) rules on each round, asks clarifying questions when needed, and synthesizes the final answer with a stated confidence and any unresolved disagreement.
Every question debates by default. For a simple lookup where you don't need a
second opinion, prefix it with ! (or pass --direct) to get a single direct
answer from the judge — one cheap call, no debate.
Agreement is the stop condition, not a correctness proof. Two models can be confidently and identically wrong, and the judge is a single point of bias — so every ruling is rationale-backed and the final answer states its confidence.
Install
Requires Python 3.12+.
uv tool install 2nd-opinion-cli # recommended — isolated, global `2op`
pipx install 2nd-opinion-cli # same idea, via pipx
uvx --from 2nd-opinion-cli 2op # run once without installing
Set your keys (ANTHROPIC_API_KEY / OPENAI_API_KEY) in the environment, or run
2op apikey to store them.
Usage
Run 2op to open an interactive session. Type a question to run a full debate,
prefix it with ! for a direct single-judge answer (no debate), or use a slash
command — type / for an autocompleting palette:
| Command | Description |
|---|---|
/help |
List commands |
/models |
Choose the debater/judge models and save them |
/apikey |
View (masked) and add/update API keys |
/status |
Show current models, keys, and flags |
/clear |
Clear the screen |
/exit |
Leave the session (or Ctrl-D) |
For scripting, 2op -q "your question" runs a single debate and exits (as does
any piped/non-TTY run). Set slots inline:
2op --debater-a opus-4.8 --debater-b gpt-5.2 --judge sonnet-4.6 -v -q "…"
Configuration
Model selection is saved after the first run to ~/.config/secondop/config.json
and reused silently. Re-choose with /models (or -m at launch), or override a
single slot with --debater-a / --debater-b / --judge.
API keys are read from the environment or a .env file first, then from the
config file (set via /apikey). Environment/.env values take precedence.
Develop
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env # then add your keys
pytest
Pricing note
Model rates live in src/secondop/config.py and are verified against the 2026
catalog captured in pricing/*.json. Provider prices change — re-confirm
against the live pricing pages before relying on cost figures.
Metadata
Release files for 2nd-opinion-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| 2nd_opinion_cli-0.1.0.tar.gz | 64.9 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 2nd_opinion_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 106.5 kB
Release files / 2nd_opinion_cli-0.1.0.tar.gz
| Download URL | 2nd_opinion_cli-0.1.0.tar.gz |
|---|---|
| Size | 64.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0ff9b409ada3361d1117b8214e50ab7ac0e6ea3e074248b9b05fc22ae6fd7d4d
|
|
BLAKE2b-256 checksum How to use checksums |
3b4542b2bc770a84e52aa74a2c24530a98cc3f25fe802631100a5e6c4d85944c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 17, 2026.
Transparency logRelease files / 2nd_opinion_cli-0.1.0-py3-none-any.whl
| Download URL | 2nd_opinion_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 41.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64e7e79d9361d7a9343f2aff8cdaa6fc293fb8547306a4ef7f287994c038679d
|
|
BLAKE2b-256 checksum How to use checksums |
fd355f6399d6e8fb8d24bbe165c65ff13a6b81969b9242d63cbff7481f7ff719
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jun 17, 2026.
Transparency logSecurity for 2nd-opinion-cli 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.
Attestation for 2nd_opinion_cli-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 Jun 17, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.