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.

v0.30.0发布于 2025-07-06 23:48 UTC10,562star +9 / 7 天753fork同步于 2026-11-10 17:30 UTC

怎么上手

由 README 提炼,执行前请确认
cargo install aichat
brew install aichat
硬件要求按 README 说明

README 未说明,未提及显存或 GPU 要求;作为 CLI 工具可调用云端 API,也可通过 Ollama 等本地后端运行。

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

一站式 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

容易踩的坑

需要自行配置所调用厂商的 API Key 或本地 Ollama 等后端才能使用;Function Calling 与 AI Tools 依赖单独的 llm-functions 仓库;aichat --serve 默认监听 127.0.0.1:8000。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.30.0
  1. 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 -e on MacOS (#1311)
    • openai api omits content field from tool_calls message (#1326)
    • change temperature/top_p reading rules (#1333)
    • .file external commands capture stdout/stderr (#1343)

    New Contributors

    Full Changelog: https://github.com/sigoden/aichat/compare/v0.29.0...v0.30.0

  2. v0.29.02025-03-28 · 2025-03-28 00:57 UTC
    查看更新说明

    New Features

    • add cmd_prelude and remove prelude (#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 --file and 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

    Full Changelog: https://github.com/sigoden/aichat/compare/v0.28.0...v0.29.0

  3. v0.28.02025-02-18 · 2025-02-18 12:04 UTC
    查看更新说明

    New Features

    • display reasoning tokens (#1139)
    • webui support think tag (#1140)
    • strip reasoning contents (#1141)
    • support model alias (#1150)
    • enhance .file for 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: null to 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-high model (#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

    Full Changelog: https://github.com/sigoden/aichat/compare/v0.27.0...v0.28.0

  4. 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 variables
    

    New 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 updates
    

    New Providers

    • minimax
    • hyperbolic
    • novita

    New Features

    • add cli option --rebuild-rag (#1074)
    • .file supports external command execution (#1075)
    • .file supports 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)
    • .agent accept variable key-value pairs (#1090)
    • support minimax client (#1091)
    • no longer support .variable repl command (#1092)
    • .starter accepts index other than text (#1093)
    • add a default base_url to ollama (#1102)
    • support .edit config and .edit agent-config repl commands (#1103)
    • add --sync-models cli 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

  5. 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)
    • .file path 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

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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

    • 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.

    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.

    InputCMDREPL
    CMDaichat hello
    STDINcat data.txt | aichat
    Last Reply.file %%
    Local filesaichat -f image.png -f data.txt.file image.png data.txt
    Local directoriesaichat -f dir/.file dir/
    Remote URLsaichat -f https://example.com.file https://example.com
    External commandsaichat -f '`git diff`'.file `git diff`
    Combine Inputsaichat -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.