README.md

  1# TermAI
  2
  3> **⚠️ Early Development Notice:** This project is in early development and is not yet ready for production use. Features may change, break, or be incomplete. Use at your own risk.
  4
  5A powerful terminal-based AI assistant for developers, providing intelligent coding assistance directly in your terminal.
  6
  7[![TermAI Demo](https://asciinema.org/a/dtc4nJyGSZX79HRUmFLY3gmoy.svg)](https://asciinema.org/a/dtc4nJyGSZX79HRUmFLY3gmoy)
  8
  9## Overview
 10
 11TermAI 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.
 12
 13## Features
 14
 15- **Interactive TUI**: Built with [Bubble Tea](https://github.com/charmbracelet/bubbletea) for a smooth terminal experience
 16- **Multiple AI Providers**: Support for OpenAI, Anthropic Claude, and Google Gemini models
 17- **Session Management**: Save and manage multiple conversation sessions
 18- **Tool Integration**: AI can execute commands, search files, and modify code
 19- **Vim-like Editor**: Integrated editor with Vim keybindings for text input
 20- **Persistent Storage**: SQLite database for storing conversations and sessions
 21
 22## Installation
 23
 24```bash
 25# Coming soon
 26go install github.com/kujtimiihoxha/termai@latest
 27```
 28
 29## Configuration
 30
 31TermAI looks for configuration in the following locations:
 32
 33- `$HOME/.termai.json`
 34- `$XDG_CONFIG_HOME/termai/.termai.json`
 35- `./.termai.json` (local directory)
 36
 37You can also use environment variables:
 38
 39- `ANTHROPIC_API_KEY`: For Claude models
 40- `OPENAI_API_KEY`: For OpenAI models
 41- `GEMINI_API_KEY`: For Google Gemini models
 42
 43## Usage
 44
 45```bash
 46# Start TermAI
 47termai
 48
 49# Start with debug logging
 50termai -d
 51```
 52
 53### Keyboard Shortcuts
 54
 55#### Global Shortcuts
 56- `?`: Toggle help panel
 57- `Ctrl+C` or `q`: Quit application
 58- `L`: View logs
 59- `Backspace`: Go back to previous page
 60- `Esc`: Close current view/dialog or return to normal mode
 61
 62#### Session Management
 63- `N`: Create new session
 64- `Enter` or `Space`: Select session (in sessions list)
 65
 66#### Editor Shortcuts (Vim-like)
 67- `i`: Enter insert mode
 68- `Esc`: Enter normal mode
 69- `v`: Enter visual mode
 70- `V`: Enter visual line mode
 71- `Enter`: Send message (in normal mode)
 72- `Ctrl+S`: Send message (in insert mode)
 73
 74#### Navigation
 75- Arrow keys: Navigate through lists and content
 76- Page Up/Down: Scroll through content
 77
 78## Architecture
 79
 80TermAI is built with a modular architecture:
 81
 82- **cmd**: Command-line interface using Cobra
 83- **internal/app**: Core application services
 84- **internal/config**: Configuration management
 85- **internal/db**: Database operations and migrations
 86- **internal/llm**: LLM providers and tools integration
 87- **internal/tui**: Terminal UI components and layouts
 88- **internal/logging**: Logging infrastructure
 89- **internal/message**: Message handling
 90- **internal/session**: Session management
 91
 92## Development
 93
 94### Prerequisites
 95
 96- Go 1.23.5 or higher
 97
 98### Building from Source
 99
100```bash
101# Clone the repository
102git clone https://github.com/kujtimiihoxha/termai.git
103cd termai
104
105# Build
106go build -o termai
107
108# Run
109./termai
110```
111
112## Acknowledgments
113
114TermAI builds upon the work of several open source projects and developers:
115
116- [@isaacphi](https://github.com/isaacphi) - LSP client implementation
117
118## License
119
120[License information coming soon]
121
122## Contributing
123
124[Contribution guidelines coming soon]