1 unstable release
Uses new Rust 2024
0.0.1-alpha1 | Apr 8, 2025 |
---|
#253 in Machine learning
110 downloads per month
330KB
9K
SLoC
ChaTTY
ChaTTY is a Terminal User Interface (TUI) for chatting with AI models (OpenAI, Gemini), written in Rust. It brings the power of ChatGPT and Gemini to your terminal, with features like conversation management, multiple model support, and intelligent context compression.
Features
- Multiple AI Models: Support for OpenAI and Gemini
- Conversation Management: Save and restore chat histories
- Smart Context Compression: Automatically manages long conversations (experimental)
- Syntax Highlighting: Beautiful code block colorization
- Fast and Efficient: Written in Rust for optimal performance
Quick Start
Installation
# Download from Git
# or
# Build from source
git clone https://github.com/vietanhduong/chatty && cd chatty
# The output will be in ./builds/usr/bin/chatty
make DESTDIR=builds install
Configuration
ChaTTY requires minimal configuration before first use. You'll need to provide at least one backend connection.
Create a config file in one of these locations:
$XDG_CONFIG_HOME/chatty/config.toml
$HOME/.config/chatty/config.toml
$HOME/.chatty.toml
Basic Configuration Example:
[[backend.connections]]
enabled = true
alias = "OpenAI"
kind = "openai"
endpoint = "https://api.openai.com"
api_key = "<your_api_key>"
View the complete configuration options in our default config file.
Command Usage
$ chatty --help
A Terminal UI to interact OpenAI models
Default configuration file location looks up in the following order:
* $XDG_CONFIG_HOME/chatty/config.toml
* $HOME/.config/chatty/config.toml
* $HOME/.chatty.toml
Usage: chatty [OPTIONS]
Options:
-c, --config <PATH>
Configuration file path
-v, --version
Show the version
-h, --help
Print help (see a summary with '-h')
Contributing
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built with ratatui
- Inspired by ChatGPT and other terminal-based tools
Dependencies
~48–70MB
~1M SLoC