ChatChain

Talk to any LLM from your terminal.

Download GitHub
chatchain

About

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.

Install

$ go install github.com/joyqi/chatchain@latest

Usage

# Interactive chat with model selection
$ chatchain openai -k sk-xxx
# Specify a model directly
$ chatchain openai -k sk-xxx -m gpt-4o
# Use Anthropic
$ chatchain anthropic -m claude-sonnet-4-20250514
# Non-interactive one-shot
$ chatchain openai -m gpt-4o -c "Explain quicksort in one paragraph"
# Custom API endpoint
$ chatchain openai -u https://your-proxy.com/v1 -k sk-xxx