Skip to content

mipsel64/chatty

Repository files navigation

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.

ChaTTY Demo

Rust License

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

💡 Tips

  • Copy most recent message Ctrl + e >> c
  • Press y to copy selected message.

Quick Start

Installation

# Download from GitHub https://github.com/x00real/chatty/releases
# or
# Install from Crate.io
$ cargo install --locked chatty-rs

# Build from source
$ git clone https://github.com/x00real/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

About

Terminal User Interface for chatting with AI models

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages