Skip to main content

Chat CLI

A comprehensive command-line interface for chatting with various AI language models. This application allows you to interact with different LLM providers through an intuitive terminal-based interface.

Features

  • Interactive terminal UI with Textual library
  • Support for multiple AI models:
    • OpenAI models (GPT-3.5, GPT-4)
    • OpenAI reasoning models (o1, o1-mini, o3, o3-mini, o4-mini)
    • Anthropic models (Claude 3 Opus, Sonnet, Haiku)
  • Conversation history with search functionality
  • Customizable response styles (concise, detailed, technical, friendly)
  • Code syntax highlighting
  • Markdown rendering

Installation

  1. Clone this repository:

    git clone https://github.com/yourusername/chat-cli.git
    cd chat-cli
    
  2. Install the required dependencies:

    pip install -r requirements.txt
    
  3. Set up your API keys:

    Create a .env file in the project root directory with your API keys:

    OPENAI_API_KEY=your_openai_api_key_here
    ANTHROPIC_API_KEY=your_anthropic_api_key_here
    

Usage

Run the application:

chat-cli

Testing Reasoning Models

To test the OpenAI reasoning models implementation, you can use the included test script:

./test_reasoning.py

This script will test both completion and streaming with the available reasoning models.

About OpenAI Reasoning Models

OpenAI's reasoning models (o1, o3, o4-mini, etc.) are LLMs trained with reinforcement learning to perform reasoning. These models:

  • Think before they answer, producing a long internal chain of thought
  • Excel in complex problem solving, coding, scientific reasoning, and multi-step planning
  • Use "reasoning tokens" to work through problems step by step before providing a response
  • Support different reasoning effort levels (low, medium, high)

The implementation in this CLI supports both standard completions and streaming with these models.

Keyboard Shortcuts

  • q - Quit the application
  • n - Start a new conversation
  • s - Toggle sidebar
  • f - Focus search box
  • Escape - Cancel current generation
  • Ctrl+C - Quit the application

Configuration

The application creates a configuration file at ~/.chatcli/config.json on first run. You can edit this file to:

  • Change the default model
  • Modify available models
  • Add or edit response styles
  • Change the theme
  • Adjust other settings

Data Storage

Conversation history is stored in a SQLite database at ~/.chatcli/chat_history.db.

Development

The application is structured as follows:

  • main.py - Main application entry point
  • app/ - Application modules
    • api/ - LLM provider API client implementations
    • ui/ - User interface components
    • config.py - Configuration management
    • database.py - Database operations
    • models.py - Data models
    • utils.py - Utility functions

License

MIT

Metadata

Release files for chat-console 0.5.95

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

Source distribution (sdist)

Source distribution for chat-console 0.5.95
File Size Uploaded Provenance Actions
chat_console-0.5.95.tar.gz 140.0 kB Without provenance Details for chat_console-0.5.95.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for chat-console 0.5.95
File Interpreter ABI Platform Actions
chat_console-0.5.95-py3-none-any.whl Python 3 none any Details for chat_console-0.5.95-py3-none-any.whl

Total release size: 295.5 kB

Release files / chat_console-0.5.95.tar.gz

Download URL chat_console-0.5.95.tar.gz
Size 140.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2d9c2bb20020ee2bf067d1a71bf2e3b579bd26a8206b0a424d6d52ae122f8d9a
BLAKE2b-256 checksum
How to use checksums
2fd6c3768ae707775aabc4947a4c9277b7fd0423b40cd51deb5b71999d75de86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Release files / chat_console-0.5.95-py3-none-any.whl

Download URL chat_console-0.5.95-py3-none-any.whl
Size 155.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a3154c3a47df9e6ea112797c2d1041faa15ff6e708c2bacc2cc222a2f923f46
BLAKE2b-256 checksum
How to use checksums
b482f72f435b42ea951b4556815a3e36b9493066f5240cd3e744226a404d9a70
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.11

Security for chat-console 0.5.95

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.95 This release

2 release files No provenance

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