ChatChain is a lightweight, cross-platform AI chat CLI built with Go.
It supports multiple providers, streaming responses, and an interactive
terminal UI — all in a single binary with zero configuration files.
Multi-provider: OpenAI, Anthropic, and Gemini
Interactive model selection with filtering
Streaming responses with real-time output
Non-interactive mode for scripts and pipes
Full conversation history within a session
Custom API endpoint support
Install
$go install github.com/joyqi/chatchain@latest
Usage
# Interactive chat with model selection
$chatchain openai-ksk-xxx
# Specify a model directly
$chatchain openai-ksk-xxx-mgpt-4o
# Use Anthropic
$chatchain anthropic-mclaude-sonnet-4-20250514
# Non-interactive one-shot
$chatchain openai-mgpt-4o-c"Explain quicksort in one paragraph"