CLI reference

Global options must appear before the command:

llmswap --provider openai ask "Your question"
llmswap --no-cache --provider anthropic chat

Use llmswap --help and llmswap <command> --help for the authoritative option list installed with your version.

ask

Send a one-off question:

llmswap --provider openai ask "Explain this decision"
llmswap --provider anthropic ask "Explain queues" --audience "new operator"

best

Generate independent candidates and one structured synthesis:

llmswap --provider openai best "Assess this migration plan"

Important options:

Option Purpose
--models PROVIDER:MODEL ... Select two to five candidate targets
--judge PROVIDER:MODEL Choose the synthesis target
--model MODEL Override the automatic primary model
--candidates 2-5 Number of automatic same-model drafts; default 3
--allow-cross-provider-sharing Consent to send candidate output to another provider
--show-candidates Print the independent answers
--format json Return machine-readable output
llmswap --provider openai best "Compare these proposals" \
  --models openai:gpt-5.6 sarvam:sarvam-105b \
  --judge openai:gpt-5.6 \
  --allow-cross-provider-sharing \
  --show-candidates

chat

Start an interactive provider-native conversation:

llmswap --provider openai chat

Session commands include /help, /provider, /switch, /clear, /stats, and /quit.

providers and doctor

llmswap providers
llmswap providers --provider openai --verify
llmswap doctor
llmswap doctor --provider openai --live
llmswap doctor --format json

Live verification makes real provider requests. doctor uses nonzero exit codes for unhealthy reports, which makes JSON mode useful in automation.

web

Start the local comparison Arena:

python -m pip install "llmswap[web]"
llmswap web
llmswap web --host 127.0.0.1 --port 5005 --no-browser

mcp

Start a trusted local stdio MCP server and use its tools through natural language:

llmswap mcp --provider openai --command \
  npx -y @modelcontextprotocol/server-filesystem "$HOME/Documents"

The original llmswap-mcp executable is retained for compatibility. Local stdio is verified; --url is legacy experimental transport support, not modern MCP Streamable HTTP.

Workspaces

llmswap workspace init
llmswap workspace info
llmswap workspace list
llmswap workspace journal
llmswap workspace decisions
llmswap workspace context

Workspace files live under .llmswap/ and may contain sensitive project context.

Focused commands

llmswap review app.py --focus security
llmswap debug --error "IndexError: list index out of range"
llmswap logs --analyze /var/log/app.log --since "2h ago"
llmswap generate "Python function that validates a CSV header" --language python

Usage, estimates, and configuration

llmswap usage --days 7
llmswap compare --input-tokens 1000 --output-tokens 300
llmswap costs

llmswap config show
llmswap config set provider.default anthropic
llmswap config set provider.models.openai gpt-5.6
llmswap config validate

Cost output is an estimate; actual provider billing can differ.


Copyright © 2026 LLMSwap. Distributed under the MIT license.

This site uses Just the Docs, a documentation theme for Jekyll.