需要自行配置所调用厂商的 API Key 或本地 Ollama 等后端才能使用;Function Calling 与 AI Tools 依赖单独的 llm-functions 仓库;aichat --serve 默认监听 127.0.0.1:8000。
aichat
sigodenApache-2.0更新放缓一个 Rust 写的全能 LLM 命令行工具,集成 Shell 助手、对话 REPL、RAG 和 AI Agent,统一接入 OpenAI、Claude、Gemini、Ollama 等多家模型。
All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI Tools & Agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more.
cargo install aichat
brew install aichatREADME 未说明,未提及显存或 GPU 要求;作为 CLI 工具可调用云端 API,也可通过 Ollama 等本地后端运行。
一站式 LLM 命令行工具,统一接入 20+ 模型厂商,覆盖对话、Shell 助手、RAG 与 Agent
一个 Rust 写的全能 LLM 命令行工具,集成 Shell 助手、对话 REPL、RAG 和 AI Agent,统一接入 OpenAI、Claude、Gemini、Ollama 等多家模型。
核心能力
- 用统一接口接入 OpenAI、Claude、Gemini、Ollama 等 20+ 厂商
- 把自然语言转成适配当前 OS 和 Shell 的命令
- 支持 stdin、本地文件目录、远程 URL 和外部命令作为输入
- 用 Role、Session、Macro 定制角色、保持上下文、复用命令序列
- 内置 HTTP 服务提供 Chat、Embeddings、Rerank 接口和 Playground
容易踩的坑
- v0.30.0最新正式版2025-07-06 · 2025-07-06 23:48 UTC
New Features
- add support for OSC52 clipboard codes (#1280)
- abandon support for lingyiwanwu client (#1327)
- support autodetecting dark/light theme (#1335)
- enhence
.regenerate(#1340) - ctrl+j for newline (#1342)
Bug Fixes
- use_tools in agent mode (#1252)
- visual indication of Vi insert/normal model (#1279)
- better error handling for
aichat -eon MacOS (#1311) - openai api omits content field from tool_calls message (#1326)
- change temperature/top_p reading rules (#1333)
.fileexternal commands capture stdout/stderr (#1343)
New Contributors
- @laktak made their first contribution in https://github.com/sigoden/aichat/pull/1279
- @gcv made their first contribution in https://github.com/sigoden/aichat/pull/1280
Full Changelog: https://github.com/sigoden/aichat/compare/v0.29.0...v0.30.0
- v0.29.02025-03-28 · 2025-03-28 00:57 UTC
查看更新说明
New Features
- add
cmd_preludeand removeprelude(#1197) - support claude-3-7-sonnet (#1201)
- bumping Azure OpenAI API Version to 2024-12-01-preview (#1205)
--code(tty) strips<think>tag (#1227)- enhence glob for
--fileand rag docs (#1230) - support HISTFILE to specify the bash/zsh history file (#1236)
Bug Fixes
- incorrect model when switching role in session context (#1192)
- bedrock handles empty tool call arguments (#1213)
- openai-compatible handles empty tool call arguments (#1217)
- miss
</think>tag while tool calling (#1226)
New Contributors
- @dbroeglin made their first contribution in https://github.com/sigoden/aichat/pull/1205
- @blankjul made their first contribution in https://github.com/sigoden/aichat/pull/1213
- @cramosc made their first contribution in https://github.com/sigoden/aichat/pull/1236
Full Changelog: https://github.com/sigoden/aichat/compare/v0.28.0...v0.29.0
- add
- v0.28.02025-02-18 · 2025-02-18 12:04 UTC
查看更新说明
New Features
- display reasoning tokens (#1139)
- webui support
thinktag (#1140) - strip reasoning contents (#1141)
- support model alias (#1150)
- enhance
.filefor loading resources from diverse sources (#1155) - supports selecting LLM during configuration initialization (#1158)
- supports fetching models during configuration initialization (#1161)
- new model field
system_prompt_prefix(#1163) - remove predefined models for ollama (#1165)
- add model field
patch(#1169) - add patch
max_tokens: nullto openai/github o* serial models (#1174) - remove supports for hyperbolic and novita (#1176)
- remove supports for fireworks/siliconflow/together (#1181)
- openai/github providers add
o3-mini-highmodel (#1182)
Bug Fixes
- messages with tool_calls have not been saved to messages.md (#1156)
- webui sessions do not persist system prompt (#1162)
- webui settings do not work (#1175)
- better handle OpenAI-Compatible streaming responses (#1184)
New Contributors
- @mtul0729 made their first contribution in https://github.com/sigoden/aichat/pull/1138
- @wwsheng009 made their first contribution in https://github.com/sigoden/aichat/pull/1184
Full Changelog: https://github.com/sigoden/aichat/compare/v0.27.0...v0.28.0
- v0.27.02025-01-28 · 2025-01-28 01:39 UTC
查看更新说明
REPL Changes
.file %% # Include last reply with `%%` .file `git diff` # Include command execution with `<cmd>` .macro <macro> [arg]... # Execute macro .edit config # Modify configuration file .edit agent-config # Modify agent configuration file .agent <agent> <variable:key=value>... # Accept agent variablesNew CLI Options
--rebuild-rag Rebuild the RAG to sync document changes --macro <MACRO> Execute a macro --list-macros List all macros --sync-models Sync models updatesNew Providers
- minimax
- hyperbolic
- novita
New Features
- add cli option
--rebuild-rag(#1074) .filesupports external command execution (#1075).filesupports including last reply with%%(#1079)- discontinue
rag_min_score_*config items (#1081) - support default terminal editor (#1082)
- no longer support
.set agent_prelude <value>(#1086) - support macro (#1087)
.agentaccept variable key-value pairs (#1090)- support minimax client (#1091)
- no longer support
.variablerepl command (#1092) .starteraccepts index other than text (#1093)- add a default base_url to ollama (#1102)
- support
.edit configand.edit agent-configrepl commands (#1103) - add
--sync-modelscli option (#1114) - support hyperbolic client (#1115)
- ernie migrates to v2 api (#1130)
- add novita client (#1132)
Full Changelog: https://github.com/sigoden/aichat/compare/v0.26.0...v0.27.0
- v0.26.02024-12-30 · 2024-12-30 10:57 UTC
查看更新说明
New Features
- supports override agent instructions via agent config (#1057)
- support gemini-2.0-flash-thinking-exp (#1067)
Bug Fixes
- invalid schema that array schema missing items (#1049)
.filepath args do not need double backslash on Windows (#1053)- agent variables don't initialized if start session with last message (#1054)
- don't trim the input text (#1056)
Full Changelog: https://github.com/sigoden/aichat/compare/v0.25.0...v0.26.0
用户点评
登录用户的真实使用记录,可按版本和硬件筛选还没有人点评。第一个说出真实体验的人最有价值。
AIChat: All-in-one LLM CLI Tool
AIChat is an all-in-one LLM CLI tool featuring Shell Assistant, CMD & REPL Mode, RAG, AI Tools & Agents, and More.
Install
Package Managers
- Rust Developers:
cargo install aichat - Homebrew/Linuxbrew Users:
brew install aichat - Pacman Users:
pacman -S aichat - Windows Scoop Users:
scoop install aichat - Android Termux Users:
pkg install aichat
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.
REPL Mode
Experience an interactive Chat-REPL with features like tab autocompletion, multi-line input support, history search, configurable keybindings, and custom REPL prompts.
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.
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.
The role consists of a prompt and model configuration.
Session
Maintain context-aware conversations through sessions, ensuring continuity in interactions.
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.
RAG
Integrate external documents into your LLM conversations for more accurate and contextually relevant responses.
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.
AI Agents (CLI version of OpenAI GPTs)
AI Agent = Instructions (Prompt) + Tools (Function Callings) + Documents (RAG).
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.
LLM Arena
A web platform to compare different LLMs side-by-side.
Custom Themes
AIChat supports custom dark and light themes, which highlight response text and code blocks.
Documentation
- Chat-REPL Guide
- Command-Line Guide
- Role Guide
- Macro Guide
- RAG Guide
- Environment Variables
- Configuration Guide
- Custom Theme
- Custom REPL Prompt
- FAQ
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.