README.md

  1# TermAI
  2
  3A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal.
  4
  5[![TermAI Demo](https://asciinema.org/a/dtc4nJyGSZX79HRUmFLY3gmoy.svg)](https://asciinema.org/a/dtc4nJyGSZX79HRUmFLY3gmoy)
  6
  7## Overview
  8
  9TermAI is a Go-based CLI application that brings AI assistance to your terminal. It provides a TUI (Terminal User Interface) for interacting with various AI models to help with coding tasks, debugging, and more.
 10
 11## Features
 12
 13- **Interactive TUI**: Built with [Bubble Tea](https://github.com/charmbracelet/bubbletea) for a smooth terminal experience
 14- **Multiple AI Providers**: Support for OpenAI, Anthropic Claude, and Google Gemini models
 15- **Session Management**: Save and manage multiple conversation sessions
 16- **Tool Integration**: AI can execute commands, search files, and modify code
 17- **Vim-like Editor**: Integrated editor with Vim keybindings for text input
 18- **Persistent Storage**: SQLite database for storing conversations and sessions
 19
 20## Installation
 21
 22```bash
 23# Coming soon
 24go install github.com/kujtimiihoxha/termai@latest
 25```
 26
 27## Configuration
 28
 29TermAI looks for configuration in the following locations:
 30
 31- `$HOME/.termai.json`
 32- `$XDG_CONFIG_HOME/termai/.termai.json`
 33- `./.termai.json` (local directory)
 34
 35You can also use environment variables:
 36
 37- `ANTHROPIC_API_KEY`: For Claude models
 38- `OPENAI_API_KEY`: For OpenAI models
 39- `GEMINI_API_KEY`: For Google Gemini models
 40
 41## Usage
 42
 43```bash
 44# Start TermAI
 45termai
 46
 47# Start with debug logging
 48termai -d
 49```
 50
 51### Keyboard Shortcuts
 52
 53- `L`: View logs
 54- `N`: Create new session
 55- `Esc`: Close current view
 56- `Backspace`: Go back
 57- `Ctrl+C` or `q`: Quit
 58- `?`: Toggle help
 59
 60## Architecture
 61
 62TermAI is built with a modular architecture:
 63
 64- **cmd**: Command-line interface using Cobra
 65- **internal/app**: Core application services
 66- **internal/config**: Configuration management
 67- **internal/db**: Database operations and migrations
 68- **internal/llm**: LLM providers and tools integration
 69- **internal/tui**: Terminal UI components and layouts
 70- **internal/logging**: Logging infrastructure
 71- **internal/message**: Message handling
 72- **internal/session**: Session management
 73
 74## Development
 75
 76### Prerequisites
 77
 78- Go 1.23.5 or higher
 79
 80### Building from Source
 81
 82```bash
 83# Clone the repository
 84git clone https://github.com/kujtimiihoxha/termai.git
 85cd termai
 86
 87# Build
 88go build -o termai
 89
 90# Run
 91./termai
 92```
 93
 94## Acknowledgments
 95
 96TermAI builds upon the work of several open source projects and developers:
 97
 98- [@isaacphi](https://github.com/isaacphi) - LSP client implementation
 99
100## License
101
102[License information coming soon]
103
104## Contributing
105
106[Contribution guidelines coming soon]