Skip to main content

A universal terminal chat client that auto-detects and connects to any chat API endpoint

Project description

llm-chatifier

Dead simple terminal chat client for LLM APIs.

Features

  • Auto-detection: Automatically detects API type by testing common endpoints
  • Multi-API support: Works with OpenAI, Ollama, Anthropic, and generic chat APIs
  • Rich terminal UI: Beautiful formatting with markdown support
  • Smart defaults: Tries common ports and endpoints automatically
  • Minimal configuration: Just provide an IP and optionally port/token

Install

pipx install llm-chatifier

Or with pip:

pip install llm-chatifier

Usage

# Auto-detect API on localhost
llm-chatifier

# Specify IP
llm-chatifier 192.168.1.100

# With port and token
llm-chatifier 192.168.1.100 --port 8080 --token sk-...

# Force specific API type
llm-chatifier --override openai

# Use specific model
llm-chatifier --model gpt-4

# Verbose output to see detection process
llm-chatifier -v

Supported APIs

  • OpenAI compatible: OpenAI, llama.cpp, vLLM, LocalAI, etc.
  • Ollama: Local Ollama installations
  • Anthropic: Claude API
  • Google Gemini: Gemini Pro and Vision models
  • Cohere: Command and Command-R models
  • Generic: Any chat API with common REST patterns

Commands

Once connected, you can use these commands in the chat:

  • /exit or Ctrl+C - Quit the application
  • /clear - Clear conversation history
  • /help - Show help message
  • Ctrl+Enter - Multi-line input mode

How it Works

  1. Detection: Tests common ports (8080, 8000, 3000, 5000, 11434, 80, 443) if no port specified
  2. Protocol: Tries HTTPS first, falls back to HTTP
  3. Endpoints: Tests API-specific endpoints to identify the service type
  4. Connection: Creates appropriate client and tests authentication
  5. Chat: Starts interactive terminal session

API Detection

The tool automatically detects API types by testing these endpoints:

  • OpenAI: /v1/models, /v1/chat/completions
  • Anthropic: /v1/messages, /v1/models
  • Ollama: /api/tags, /api/generate
  • Gemini: /v1beta/models, /v1beta/models/gemini-pro:generateContent
  • Cohere: /v1/chat
  • Generic: /chat, /api/chat, /message, /api/message

Examples

# Local Ollama (usually on port 11434)
llm-chatifier localhost

# Remote OpenAI-compatible API
llm-chatifier my-server.com --port 8000 --token sk-xxx

# Force Ollama even if detection fails
llm-chatifier --override ollama

# Connect to Anthropic API
llm-chatifier --override anthropic --token your-claude-key

# Connect to Google Gemini
llm-chatifier --override gemini --token your-gemini-key

# Connect to Cohere
llm-chatifier --override cohere --token your-cohere-key

Development

git clone https://github.com/fluffypony/llm-chatifier
cd llm-chatifier
pip install -e .
python -m chatifier --help

License

BSD-3-Clause

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

llm_chatifier-0.1.1.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

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

llm_chatifier-0.1.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file llm_chatifier-0.1.1.tar.gz.

File metadata

  • Download URL: llm_chatifier-0.1.1.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for llm_chatifier-0.1.1.tar.gz
Algorithm Hash digest
SHA256 72ce626a5a9493ea6dcefa3b5ab87750587dbb2fa539525168087a755b623f38
MD5 46d49bceda01842b613724663ea6e42d
BLAKE2b-256 a29f041b54398ecd730948eeac280add53eeec807303ef299e019e4bd7a04f3b

See more details on using hashes here.

File details

Details for the file llm_chatifier-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: llm_chatifier-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for llm_chatifier-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 65f59c01ac845a94d0c3613c96d1a6bb47719c51ef5c3370aabf690ab7cc7131
MD5 ce4dd7c8ed49ef1ed517e32dbef69007
BLAKE2b-256 a107609d6dda8026c8fa845e8196c31ef191aabc4b0e703978b1b1dd208c0e53

See more details on using hashes here.

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