Skip to main content

Command-line interface for the Dialectus AI debate system

Project description

Dialectus CLI

Dialectus CLI

Command-line interface for the Dialectus AI debate system. Run AI debates locally with Ollama or cloud models via OpenRouter.

CLI

Installation

From PyPI

Using uv (recommended):

uv pip install dialectus-cli

Using pip:

pip install dialectus-cli

From Source

Using uv (recommended, faster):

# Clone the repository
git clone https://github.com/Dialectus-AI/dialectus-cli
cd dialectus-cli

# Install in development mode with all dev dependencies
uv sync

# Or install without dev dependencies
uv pip install -e .

Using pip:

# Clone the repository
git clone https://github.com/Dialectus-AI/dialectus-cli
cd dialectus-cli

# Install in development mode
pip install -e .

# Or install with dev dependencies
pip install -e ".[dev]"

Requirements

  • Python 3.12+
  • uv (recommended): Fast Python package manager - Install uv
  • Ollama (if using local models): Running at http://localhost:11434
  • OpenRouter API key (if using cloud models): Set via environment variable

Environment Variables

# Linux/macOS
export OPENROUTER_API_KEY="your-key-here"

# Windows PowerShell
$env:OPENROUTER_API_KEY="your-key-here"

# Windows CMD
set OPENROUTER_API_KEY=your-key-here

Quick Start

After installation, the dialectus command is available:

# Copy example config
cp debate_config.example.json debate_config.json

# Edit with your preferred models and API keys
nano debate_config.json  # or your favorite editor

# Run a debate
dialectus debate

Configuration

Edit debate_config.json to configure:

  • Models: Debate participants (Ollama or OpenRouter)
  • Judging: AI judge models and evaluation criteria
  • System: Ollama/OpenRouter settings

Commands

All commands work identically across platforms:

Start a Debate

uv run dialectus debate
uv run dialectus debate --topic "Should AI be regulated?"
uv run dialectus debate --format oxford
uv run dialectus debate --interactive

List Available Models

uv run dialectus list-models

View Saved Transcripts

uv run dialectus transcripts
uv run dialectus transcripts --limit 50

Database

Transcripts are saved to SQLite database at ~/.dialectus/debates.db

Architecture

CLI → DebateRunner → DebateEngine → Rich Console
           ↓
    SQLite Database
  • No API layer - Imports engine directly
  • Local-first - Runs completely offline with Ollama
  • SQLite storage - Simple, portable database

Development

Running Tests and Type Checking

Using uv (recommended):

# Run tests
uv run pytest

# Run tests with verbose output
uv run pytest -v

# Run with coverage
uv run pytest --cov=dialectus

# Type check with Pyright
uv run pyright

# Lint with ruff
uv run ruff check .

# Format with ruff
uv run ruff format .

Using pip:

# Ensure dev dependencies are installed
pip install -e ".[dev]"

# Run tests
pytest

# Type check with Pyright
pyright

# Lint and format
ruff check .
ruff format .

Building Distribution

Using uv:

# Build wheel and sdist
uv build

# Install locally from wheel
uv pip install dist/dialectus_cli-*.whl

Using pip:

# Build wheel and sdist
python -m build

# Install locally
pip install dist/dialectus_cli-*.whl

Managing Dependencies

Using uv:

# Add a new dependency
# 1. Edit pyproject.toml [project.dependencies] section
# 2. Update lock file and sync environment:
uv lock && uv sync

# Upgrade all dependencies (within version constraints)
uv lock --upgrade

# Upgrade specific package
uv lock --upgrade-package rich

# Add dev dependency
# 1. Edit pyproject.toml [project.optional-dependencies.dev]
# 2. Run:
uv sync

Using pip:

# Add a new dependency
# 1. Edit pyproject.toml dependencies
# 2. Reinstall:
pip install -e ".[dev]"

Why uv?

  • 10-100x faster than pip for installs and resolution
  • Reproducible builds via uv.lock (cross-platform, includes hashes)
  • Python 3.14 ready - Takes advantage of free-threading for even better performance
  • Single source of truth - Dependencies in pyproject.toml, lock file auto-generated
  • Compatible - pip still works perfectly with pyproject.toml

License

MIT (open source)

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

dialectus_cli-0.2.1.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

dialectus_cli-0.2.1-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file dialectus_cli-0.2.1.tar.gz.

File metadata

  • Download URL: dialectus_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dialectus_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fd4139feb5c2f3b532e49b0641a7a67a4d996b19f3066936c9be2c52f53db58b
MD5 b661ac3349d4f219a24fc2d54f399ff4
BLAKE2b-256 80f4bcb19891a4fc47c462be617544e0d7175812f70e013a801d9276c8be6878

See more details on using hashes here.

Provenance

The following attestation bundles were made for dialectus_cli-0.2.1.tar.gz:

Publisher: publish.yml on Dialectus-AI/dialectus-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dialectus_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: dialectus_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dialectus_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f1ad0116c27a2f84c5640cb4089a00410adc43a3ff357a5cc06ff51462f3dfc
MD5 96435ca8bde9136ac346d2293b295b19
BLAKE2b-256 6684455d090ea137d4ab81d31dd8689b7d28fb6c805c324d7964dc9f1d53c8fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for dialectus_cli-0.2.1-py3-none-any.whl:

Publisher: publish.yml on Dialectus-AI/dialectus-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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