Find your next open-source project

Search by name, purpose, or keyword — or paste a GitHub repository URL

A terminal LLM client that unifies 20+ providers with shell command generation, chat REPL, RAG, tools and agents.

10,548
751
Rust
Apache-2.0
3 years old

What it does

AIChat is a command-line client for working with large language models from one tool. A single interface covers more than 20 providers, including OpenAI, Claude, Gemini, Ollama, Groq, Azure-OpenAI, Bedrock, OpenRouter, Deepseek and any OpenAI-compatible endpoint. It runs as a one-shot command (aichat hello) or as an interactive chat REPL.

Beyond chatting, it translates natural-language requests into shell commands and adapts them to the host OS and shell. It also supports multi-form input: stdin, local files or directories, remote URLs and external command output can be combined and passed to the model. Roles bundle a prompt with a model configuration, sessions keep conversational context, and macros replay a sequence of REPL commands.

For larger setups, AIChat provides RAG over external documents, function calling for tools, and agents defined as instructions + tools + documents. A built-in HTTP server exposes Chat Completions, Embeddings and Rerank endpoints, along with a browser playground and an arena for comparing models side by side.

Getting started

Install with the package manager for your platform: cargo install aichat, brew install aichat, pacman -S aichat, scoop install aichat on Windows, or pkg install aichat on Android Termux. Pre-built macOS, Linux and Windows binaries are also available from GitHub Releases; extract the binary and put aichat on your $PATH.

After installation, configure at least one provider credential, then try a one-shot request:

aichat hello

For an interactive session, launch aichat without arguments to enter the REPL.

To start the local server and its web tools:

aichat --serve

This exposes http://127.0.0.1:8000/v1/chat/completions, /v1/embeddings, /v1/rerank, the playground at /playground and the arena at /arena?num=2 (source:38). For example, you can test the chat endpoint with curl using a model identifier such as claude:claude-3-5-sonnet-20240620 in the JSON body.

Constraints

Using any hosted provider requires an account and credential for that provider; local models require a compatible runtime such as Ollama. Shell Assistant turns descriptions into commands, so review generated commands before executing them. The built-in server listens on localhost by default and is intended for local use or deployment behind your own controls. The project is written in Rust and distributed under MIT or Apache-2.0, at your option.

Documentation

Separate wiki guides cover the Chat-REPL, command-line usage, roles, macros and RAG, plus environment variables, configuration, themes and an FAQ.

HotRepo's take

HotRepo has no daily-rank or star-snapshot records for this repository, so there is no trend data to report. HN discussion is thin: the most visible threads are a 2024-12-26 post with 4 points and a 2023-12-26 post with 3 points, the rest drawing 1–3 points and almost no comments. One reply under the 2024 thread simply restates the project's feature summary, so the threads offer no first-hand comparison with alternatives. What the repository does show concretely is a broad provider list, a built-in server with a playground and arena, and a published release channel — enough to evaluate the tool on capabilities rather than on community buzz.

Written by AI from the project's README, updated . The project's own docs are the source of truth.

Hacker News

AIChat: All-in-One LLM CLI Tool
▲ 4 · 1 comment · December 26, 2024
AIChat: All-in-One AI CLI Tool
▲ 2 · 0 comments · June 11, 2024