# Release Notes
## Overview
This release marks a major step forward for Hexai, transforming it from a proof-of-concept into a flexible AI tool for both Helix editor integration and general command-line use. Hexai now supports multiple LLM providers (OpenAI, Ollama, and GitHub Copilot), introduces a new command-line interface, and brings significant improvements to configuration, logging, and usability.
---
## Features
### 1. **New Command-Line Tool (`hexai`)**
- **What:** Added a standalone CLI (`hexai`) for interacting with LLMs directly from the terminal.
- **Why:** Enables users to process text, generate explanations, or extract commands without needing the Helix editor. Supports both piped input and prompt arguments, with streaming output for supported providers.
- **How to use:**
- `cat file.txt | hexai 'summarize'`
- `hexai 'install ripgrep on macOS'`
- See updated README for more examples.
### 2. **Multiple LLM Provider Support**
- **What:** Added support for OpenAI, Ollama (local), and GitHub Copilot as interchangeable providers.
- **Why:** Gives users flexibility to choose between cloud and local models, or leverage Copilot if available.
- **How to use:**
- Select provider in `~/.config/hexai/config.json` (`provider: openai|ollama|copilot`).
- Configure API keys via environment variables (`OPENAI_API_KEY`, `COPILOT_API_KEY`).
### 3. **Streaming Output**
- **What:** CLI now streams responses as they are generated (for OpenAI and Ollama).
- **Why:** Provides faster feedback and a more interactive experience, especially for long outputs.
### 4. **GitHub Copilot Integration**
- **What:** Added Copilot as a provider option, including model and endpoint configuration.
- **Why:** Lets users leverage Copilot’s capabilities for code-related tasks.
### 5. **Configurable via JSON File**
- **What:** Centralized configuration in `~/.config/hexai/config.json` with clear precedence for environment variables.
- **Why:** Simplifies setup and makes it easy to switch providers or tweak settings.
### 6. **Enhanced LSP Features**
- **What:**
- Modularized LSP server code for maintainability.
- Added code actions (e.g., rewrite selection with instructions, resolve diagnostics).
- Configurable completion trigger characters.
- **Why:** Improves code quality, extensibility, and user control over LSP behavior.
---
## Improvements
- **Logging Overhaul:**
- Unified and colorized logs for better readability.
- Added per-minute and average LLM usage statistics.
- Configurable log preview limits.
- **Provider Abstraction:**
- Pluggable provider interface for easy future expansion.
- Streaming support abstracted for providers that support it.
- **Documentation:**
- Updated and expanded README with clear CLI and LSP usage instructions.
- Documented configuration options and environment variable overrides.
---
## Bug Fixes
- **Completion Prefix:**
- Fixed duplicate assignment prefix in LSP completions.
- **Prompt Markers:**
- Stripped inline prompt markers from completions.
- **Logging Consistency:**
- Ensured all logs use consistent color and formatting.
---
## Breaking Changes & Migration
- **Binary Renaming:**
- The LSP server binary is now `hexai-lsp`. The CLI tool is `hexai`.
- **Action:** Update any scripts or editor configurations to use the new binary names.
- **Configuration:**
- All settings now reside in `~/.config/hexai/config.json`.
- **Action:** Migrate any old environment-based configs (except API keys) to the JSON file.
- **Provider API Keys:**
- `OPENAI_API_KEY` and `COPILOT_API_KEY` must be set in your environment as needed.
---
## Other Notable Changes
- **Expanded Trigger Characters:**
- Default completion triggers now include `;` and `?`.
- **Disk IO Control:**
- Added `no_disk_io` option to restrict file system access if desired.
- **Improved Error Handling:**
- More informative error messages for missing API keys or misconfiguration.
---
## Summary
Hexai is now a versatile AI assistant for both code and general text, with robust provider support, a powerful CLI, and improved configuration and logging. This release lays the foundation for future enhancements and broader use cases.
**See the README for full usage details and configuration examples.**