A minimal terminal chat client for OpenAI-compatible APIs written in Go. Launch instantly, stream responses in real-time, and stay in flow without opening a browser. No Electron, no bloat—just a single binary that gets you chatting in milliseconds.
Note: chaTTY is functional and usable, but under active development. Many features are still being added and refined.
Opening a browser, navigating to ChatGPT or Claude, waiting for the page to load—it all takes time. When you just need a quick answer or want to iterate on an idea, that friction adds up.
chaTTY eliminates that friction. It launches instantly, streams responses token-by-token, and keeps you in your terminal. No Electron, no browser—just a minimal Go binary focused on speed and productivity.
Compiled Go binary with minimal dependencies. Launches in milliseconds and stays out of your way.
Beautiful formatted output with syntax highlighting for code blocks. Toggle with /markdown.
Detects and dims thinking tags (<think>, <thinking>) for clearer reasoning output.
Works with PromptShield, OpenAI, Anthropic, xAI (Grok), and local engines like Ollama via OpenAI-compatible APIs.
Save and reload conversations with /list, /sessions, and /load <id>. Stay organized across chats.
Interactive terminal controls with arrow-key history, multi-line editing, and smooth REPL-style input.
go install github.com/PromptShieldLabs/chatty/cmd/chatty@latestOr clone and build locally from the GitHub repository.
chaTTY works with any OpenAI-compatible API. Create config.yaml in the project root (or pass --config) and fill in your provider details:
api:
url: "https://api.promptshield.io/v1"
key: "${CHATTY_API_KEY}"
model:
name: "openai/gpt-4o-mini"
temperature: 0.7
stream: trueapi:
url: "https://api.openai.com/v1"
key: "${CHATTY_API_KEY}"
model:
name: "gpt-4o-mini"
temperature: 0.7
stream: trueapi:
url: "https://api.anthropic.com/v1"
key: "${ANTHROPIC_API_KEY}"
model:
name: "claude-3-5-sonnet-20241022"
temperature: 0.7
stream: trueapi:
url: "https://api.x.ai/v1"
key: "${CHATTY_API_KEY}"
model:
name: "grok-beta"
temperature: 0.7
stream: trueapi:
url: "http://localhost:11434/v1"
key: "not-needed"
model:
name: "llama3.2"
temperature: 0.7
stream: trueEnvironment variables override config file values: CHATTY_API_URL, CHATTY_API_KEY, or provider-specific keys like OPENAI_API_KEY and ANTHROPIC_API_KEY.
make build
./chatty
# Or build and run directly
make run/helpShow available commands/exitExit the chat (also /quit)/resetClear conversation history (also /clear)/historyShow conversation history/markdownToggle markdown rendering on/off/listList saved conversations (also /sessions)/load <id>Load a saved conversation by numeric identifierchaTTY keeps the codebase lean and approachable. The entire project is ~1,650 lines of Go (tests included), organized for easy hacking and customization.
chatty/ ├── cmd/chatty/ │ └── main.go # CLI entrypoint & bootstrap (~70 lines) ├── internal/ │ ├── chat.go # Chat loop, commands, streaming (~670 lines) │ ├── client.go # OpenAI-compatible HTTP client (~230 lines) │ ├── storage/ │ │ └── storage.go # SQLite persistence layer (~320 lines) │ └── config/ │ └── config.go # Config loading & validation (~140 lines) ├── config.yaml # Sample configuration └── go.mod # Module definition
Development conveniences are built in: make test, make build, make install, and go fmt ./... keep iteration fast.
MIT Licensed - chaTTY is free and open source software. You're welcome to use, modify, and distribute it for any purpose.