aichat README

The project's README from github.com/sigoden/aichat. As one markdown file: README.md.

AIChat: All-in-one LLM CLI Tool

CI Crates Discord

AIChat is an all-in-one LLM CLI tool featuring Shell Assistant, CMD & REPL Mode, RAG, AI Tools & Agents, and More.

Install

Package Managers

Pre-built Binaries

Download pre-built binaries for macOS, Linux, and Windows from GitHub Releases, extract them, and add the aichat binary to your $PATH.

Features

Multi-Providers

Integrate seamlessly with over 20 leading LLM providers through a unified interface. Supported providers include OpenAI, Claude, Gemini (Google AI Studio), Ollama, Groq, Azure-OpenAI, VertexAI, Bedrock, Github Models, Mistral, Deepseek, AI21, XAI Grok, Cohere, Perplexity, Cloudflare, OpenRouter, Ernie, Qianwen, Moonshot, ZhipuAI, MiniMax, Deepinfra, VoyageAI, any OpenAI-Compatible API provider.

CMD Mode

Explore powerful command-line functionalities with AIChat's CMD mode.

aichat-cmd

REPL Mode

Experience an interactive Chat-REPL with features like tab autocompletion, multi-line input support, history search, configurable keybindings, and custom REPL prompts.

aichat-repl

Shell Assistant

Elevate your command-line efficiency. Describe your tasks in natural language, and let AIChat transform them into precise shell commands. AIChat intelligently adjusts to your OS and shell environment.

aichat-execute

Multi-Form Input

Accept diverse input forms such as stdin, local files and directories, and remote URLs, allowing flexibility in data handling.

Input CMD REPL
CMD aichat hello
STDIN cat data.txt | aichat
Last Reply .file %%
Local files aichat -f image.png -f data.txt .file image.png data.txt
Local directories aichat -f dir/ .file dir/
Remote URLs aichat -f https://example.com .file https://example.com
External commands aichat -f '`git diff`' .file `git diff`
Combine Inputs aichat -f dir/ -f data.txt explain .file dir/ data.txt -- explain

Role

Customize roles to tailor LLM behavior, enhancing interaction efficiency and boosting productivity.

aichat-role

The role consists of a prompt and model configuration.

Session

Maintain context-aware conversations through sessions, ensuring continuity in interactions.

aichat-session

The left side uses a session, while the right side does not use a session.

Macro

Streamline repetitive tasks by combining a series of REPL commands into a custom macro.

aichat-macro

RAG

Integrate external documents into your LLM conversations for more accurate and contextually relevant responses.

aichat-rag

Function Calling

Function calling supercharges LLMs by connecting them to external tools and data sources. This unlocks a world of possibilities, enabling LLMs to go beyond their core capabilities and tackle a wider range of tasks.

We have created a new repository https://github.com/sigoden/llm-functions to help you make the most of this feature.

AI Tools & MCP

Integrate external tools to automate tasks, retrieve information, and perform actions directly within your workflow.

aichat-tool

AI Agents (CLI version of OpenAI GPTs)

AI Agent = Instructions (Prompt) + Tools (Function Callings) + Documents (RAG).

aichat-agent

Local Server Capabilities

AIChat includes a lightweight built-in HTTP server for easy deployment.

$ aichat --serve
Chat Completions API: http://127.0.0.1:8000/v1/chat/completions
Embeddings API:       http://127.0.0.1:8000/v1/embeddings
Rerank API:           http://127.0.0.1:8000/v1/rerank
LLM Playground:       http://127.0.0.1:8000/playground
LLM Arena:            http://127.0.0.1:8000/arena?num=2

Proxy LLM APIs

The LLM Arena is a web-based platform where you can compare different LLMs side-by-side.

Test with curl:

curl -X POST -H "Content-Type: application/json" -d '{
  "model":"claude:claude-3-5-sonnet-20240620",
  "messages":[{"role":"user","content":"hello"}], 
  "stream":true
}' http://127.0.0.1:8000/v1/chat/completions

LLM Playground

A web application to interact with supported LLMs directly from your browser.

aichat-llm-playground

LLM Arena

A web platform to compare different LLMs side-by-side.

aichat-llm-arena

Custom Themes

AIChat supports custom dark and light themes, which highlight response text and code blocks.

aichat-themes

Documentation

License

Copyright (c) 2023-2025 aichat-developers.

AIChat is made available under the terms of either the MIT License or the Apache License 2.0, at your option.

See the LICENSE-APACHE and LICENSE-MIT files for license details.

aichat (sigoden/aichat)

openrouter
Searching Database…

10.5K ·GitHub
What is this?AIChat is an all-in-one LLM command-line tool: a shell assistant, a chat REPL, RAG, AI tools and agents, with access to OpenAI, Claude, Gemini, Ollama, Groq and more.
Is this a GUI app or a terminal tool?A terminal tool. CMD mode runs one-off commands like 'aichat hello'; REPL mode is an interactive chat with tab completion, multi-line input and history search.
Which LLM providers can it connect to?It works with 20+ providers through one unified interface: OpenAI, Claude, Gemini, Groq, Azure-OpenAI, Bedrock, Deepseek and more, using your own provider credentials.
Does it run on Windows and macOS, or just Linux?macOS, Linux and Windows — pre-built binaries are on GitHub Releases. Android is covered too, via Termux ('pkg install aichat').
Can I host it as a web service?Yes. A lightweight built-in HTTP server lets you deploy it as an LLM API proxy, a browser Playground, or the LLM Arena for comparing models side by side.
Can I use it with local models?Yes, via Ollama: it is one of the supported providers, so you can run local models without touching any cloud API.
Is it open source?Dual-licensed under MIT or Apache 2.0, at your option — free to use, including commercially.
What does the Shell Assistant actually do?You describe a task in natural language and AIChat turns it into a precise shell command, adjusting to your OS and shell environment. Handy when you know what you want done but not the exact incantation.
Can I feed it my own files or web pages?Yes — it accepts stdin, local files and whole directories, and remote URLs, all combinable in one prompt. With RAG it can also pull your documents into conversations for more relevant, context-aware answers.
Can I build my own agents with it?Yes. An AI Agent is defined as Instructions (prompt) + Tools (function calling) + Documents (RAG), described as a CLI version of OpenAI GPTs. It also integrates external AI tools and MCP servers.
Can I tune its behavior and keep conversation context?Roles bundle a prompt with model configuration to tailor LLM behavior, and sessions keep conversations context-aware. Macros chain a series of REPL commands into one reusable script for repetitive tasks.
Creator
sigoden
Size
4.1 MB
Stars
10.5K
Age
3y
Commits · 90 Days