Releases: Dialectus-AI/dialectus-cli
Release list
Add Anthropic/OpenAI Provider Support
Added
-
OpenAI Provider Support: Full integration with OpenAI API through dialectus-engine 0.4.0
- Configure debates using OpenAI models (GPT-4, GPT-3.5, etc.)
- Automatic API key validation at startup
- Support for
OPENAI_API_KEYenvironment variable
-
Anthropic Provider Support: Full integration with Anthropic Claude models through dialectus-engine 0.4.0
- Configure debates using Claude models (Claude 3.5 Sonnet, Claude 3 Opus, etc.)
- Automatic API key validation at startup
- Support for
ANTHROPIC_API_KEYenvironment variable - Added example configuration for Anthropic debates
-
Provider Key Validation: Enhanced startup checks to validate API keys before running debates
- Clear error messages when required API keys are missing
- Prevents debates from failing midway due to authentication issues
Changed
-
Updated Engine Dependency: Now requires dialectus-engine >= 0.4.0
- Benefits from improved provider architecture
- Access to new OpenAI and Anthropic providers
- Enhanced cost tracking and rate limiting
-
Configuration Improvements: Better handling of provider-specific configuration
- More robust config validation
- Clearer error messages for misconfigured providers
-
Documentation: Significantly expanded README with provider setup instructions
- Detailed setup guides for all supported providers (Ollama, OpenRouter, OpenAI, Anthropic)
-
Virtual Environment: Switched to
.venvas the standard virtual environment directory- Aligns with modern Python tooling conventions (uv, etc.)
Fixed
- Character Encoding: Fixed cp1252 encoding issues on Windows systems
- Improved handling of Rich library output on different platforms
Testing
- Enhanced Test Coverage: Added new tests for provider validation
- Tests for API key validation logic
- Tests for provider-specific configuration handling
v0.2.1
Overview
This release focuses on improving type safety, code quality, and maintainability through comprehensive refactoring. The CLI now uses Pydantic models throughout for better validation and type checking, with enhanced database interactions and improved presentation layer.
Breaking Changes
None - this is a backwards-compatible patch release.
New Features
Type-Safe Database Models
- New
db_types.pymodule with comprehensive Pydantic models for all database interactions - Type-safe row models:
DebateRow,DebateMessageRow,JudgeDecisionRow,CriterionScoreRow,EnsembleSummaryRow - Enhanced models:
DebateWithMessages,JudgeDecisionWithScores,TranscriptData - Custom exceptions:
DatabaseError,DebateNotFoundError,JudgeDecisionNotFoundError,EnsembleSummaryNotFoundError
Improved Provider Detection
- Auto-detection of model providers in
list-modelscommand - No longer requires manual provider specification for common models
Improvements
Type Safety
- Migrated TypedDict classes to Pydantic models throughout codebase
- Added strict type checking for all database operations
- Improved type annotations across all modules
- Better handling of optional fields with proper
Nonechecks
Database Layer (database.py)
- Refactored to return Pydantic models instead of dictionaries
- Type-safe constructors for all database operations
- Improved error handling with specific exception types
- Better separation of concerns with dedicated row types
Presentation Layer (presentation.py)
- Refactored to work with Pydantic models
- Improved dot-notation access for cleaner code
- Enhanced serialization/deserialization for display
- Better handling of ensemble summary data
Runner (runner.py)
- Type-safe model handling throughout debate execution
- Improved EnsembleResult integration from engine v0.3.1
- Better error handling and validation
- Cleaner async context management
Code Quality
- Extracted magic numbers to named constants
- Improved Click parameter naming for clarity
- Simplified context managers
- Better exception specificity
- Consistent code formatting with Ruff
Testing
Enhanced Test Coverage
- Updated all tests for Pydantic model assertions
- Better test isolation with improved fixtures
- More specific exception testing
- Refactored test utilities for maintainability
Dependencies
Updated
- dialectus-engine upgraded to
>=0.3.1- Includes EnsembleResult improvements
- Enhanced Pydantic type support
- Better type safety across engine API
Developer Experience
Improved IDE Support
- Better autocomplete with Pydantic models
- Clearer type errors from Pyright
- Enhanced documentation through type hints
- More discoverable API surface
Code Organization
- Clearer separation between data models and business logic
- Better module organization with dedicated types file
- More consistent naming conventions
- Improved code documentation
Migration Notes
No migration required - existing databases continue to work unchanged. The new Pydantic models provide a type-safe layer over the existing SQLite schema.
Known Issues
None
For complete installation and usage instructions, see README.md.
For engine changes, see dialectus-engine v0.3.1 release notes.
Support the new type-safe event system
Updated for Type-Safe Engine API
This release updates the CLI to support the new type-safe event system introduced in dialectus-engine v0.3.0.
Changes
Engine Compatibility
- Updated to require
dialectus-engine>=0.3.0 - Adopted new type-safe event callback system with enum-based event types
- Migrated from string-based event types to
PhaseEventTypeandMessageEventTypeenums
Internal Improvements
- Type-Safe Callbacks: Event handlers now use strongly-typed enum values instead of string literals
- Enhanced Type Checking: Full support for Pyright/mypy type validation
- Better IDE Support: Improved autocomplete and inline documentation for event handling
Code Example
The CLI now uses the new type-safe API internally:
from dialectus.engine.debate_engine.types import (
MessageEventType,
PhaseEventType,
PhaseStartedEventData,
MessageCompleteEventData,
)
async def phase_callback(
event: PhaseEventType,
data: PhaseStartedEventData
):
if event == PhaseEventType.PHASE_STARTED:
# Handle phase start
...
async def message_callback(
event: MessageEventType,
data: MessageStartEventData | MessageCompleteEventData,
):
if event == MessageEventType.MESSAGE_COMPLETE:
# Handle message completion
...User-Facing Features
No changes to CLI commands or user interface - all updates are internal improvements that maintain full backward compatibility with existing debate configurations and usage patterns.
Requirements
- Python >= 3.12
- dialectus-engine >= 0.3.0 (breaking change in engine)
Upgrade Notes
If you're upgrading from v0.1.x:
- The CLI will automatically use the new engine when you update
- No changes needed to your
debate_config.jsonfiles - All CLI commands work exactly as before
# Upgrade to latest versions
pip install --upgrade dialectus-cli
# Or with uv
uv pip install --upgrade dialectus-cliThis release maintains CLI functionality while adopting the improved type safety of the underlying engine, providing a more robust foundation for future development.
Initial Release
Dialectus CLI v0.1.0 - Initial Release
First public release of the Dialectus command-line interface for running AI debates locally.
Overview
Dialectus CLI is a lightweight, local-first terminal application that brings AI-powered debates to your command line. Run debates between language models, judge them with AI critics, and save transcripts to a local database - all without needing a backend API.
Key Features
Core Functionality
- Local AI debates - Run debates completely offline using Ollama models
- Cloud model support - Use OpenRouter for access to GPT-4, Claude, and other cloud models
- Multiple debate formats - Oxford, Parliamentary, Socratic, and Public Forum styles
- AI judging - Evaluate debates with configurable judge models and criteria
- Rich terminal UI - Beautiful formatted output with tables, panels, and progress indicators
- SQLite storage - Save and review debate transcripts locally
Commands
dialectus debate- Start a debate between AI modelsdialectus list-models- Show available models from Ollama and OpenRouterdialectus transcripts- View saved debate history
Configuration
- JSON-based configuration with full validation
- Supports both Ollama (local) and OpenRouter (cloud) providers
- Flexible judging criteria and model selection
- Environment variable support for API keys
Technical Highlights
- Python 3.13 with modern type annotations
- Direct engine integration - Imports
dialectus-enginelibrary directly - Type-safe - Pydantic validation for all configuration
- Cross-platform - Works on Linux, macOS, and Windows
- Zero network dependencies - Runs completely offline with Ollama
- Modern async - Built with async/await throughout
Requirements
- Python 3.13 or higher
- Ollama (for local models) or OpenRouter API key (for cloud models)
Installation
pip install dialectus-cliQuick Start
# Copy example config
cp debate_config.example.json debate_config.json
# Edit configuration
nano debate_config.json
# Run a debate
dialectus debateLinks
- GitHub: https://github.com/Dialectus-AI/dialectus-cli
- PyPI: https://pypi.org/project/dialectus-cli
- Engine: https://github.com/Dialectus-AI/dialectus-engine
- Issues: https://github.com/Dialectus-AI/dialectus-cli/issues
MIT License - Open source and free to use