{"id":13407954,"url":"https://github.com/sigoden/aichat","last_synced_at":"2025-05-14T07:01:45.158Z","repository":{"id":99962785,"uuid":"608896930","full_name":"sigoden/aichat","owner":"sigoden","description":"All-in-one LLM CLI tool featuring Shell Assistant, Chat-REPL, RAG, AI Tools \u0026 Agents, with access to OpenAI, Claude, Gemini, Ollama, Groq, and more.","archived":false,"fork":false,"pushed_at":"2025-05-07T00:50:18.000Z","size":4225,"stargazers_count":6631,"open_issues_count":1,"forks_count":430,"subscribers_count":54,"default_branch":"main","last_synced_at":"2025-05-07T06:17:34.959Z","etag":null,"topics":["ai","ai-agents","chatbot","claude","cli","function-calling","gemini","llm","ollama","openai","rag","rust","shell","webui"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigoden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-03T00:29:39.000Z","updated_at":"2025-05-07T06:01:54.000Z","dependencies_parsed_at":"2023-10-24T09:32:24.749Z","dependency_job_id":"62b8ce78-fecb-4f74-8b9f-bd71d31ae6b1","html_url":"https://github.com/sigoden/aichat","commit_stats":{"total_commits":843,"total_committers":22,"mean_commits":38.31818181818182,"dds":0.0260972716488731,"last_synced_commit":"90475d3e7cf1710b137320dc95f23a5d035fa665"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Faichat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Faichat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Faichat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Faichat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigoden","download_url":"https://codeload.github.com/sigoden/aichat/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253504769,"owners_count":21918859,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","ai-agents","chatbot","claude","cli","function-calling","gemini","llm","ollama","openai","rag","rust","shell","webui"],"created_at":"2024-07-30T20:00:49.768Z","updated_at":"2025-05-14T07:01:45.048Z","avatar_url":"https://github.com/sigoden.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"ai\"\u003e\u003c/a\u003eAI / ChatGPT","Projects","Rust","CLIs","Applications","\u003cimg src=\"./assets/satellite.svg\" width=\"16\" height=\"16\" style=\"vertical-align: middle;\"\u003e Satellites","Chat UIs","UIs","精选开源项目合集","A01_文本生成_文本对话","Frameworks","Machine Learning","Recently Updated","HarmonyOS","cli","General Purpose Chat \u0026 Shell Utilities","webui","Table of Contents","Vim (text editor)","命令行工具","13. Developer Tools \u0026 Integrations","Linux 🐧","2. Libraries \u0026 Frameworks","CLI and TUI Tools","ai","Code \u0026 Developer Tools","CLI \u0026 Terminal Tools","Task Automation \u0026 Workflow Orchestration","Chatbots \u0026 Virtual Companions"],"sub_categories":["提示语（魔法）","CLI","GPT镜像平替","大语言对话模型及数据","Productivity","[Who Wants to Be a Millionare](https://www.boardgamecapital.com/who-wants-to-be-a-millionaire-rules.htm)","Windows Manager","All In One","Offline usage \u003ca href=\"https://github.com/chubin/cheat.sh#installation\"\u003einstall\u003c/a\u003e cheat script manually\u003cbr\u003e","AI","Rust","Codex Resources","AI Coding CLIs","Inventory Automation Agents"],"readme":"# AIChat: All-in-one LLM CLI Tool\n\n[![CI](https://github.com/sigoden/aichat/actions/workflows/ci.yaml/badge.svg)](https://github.com/sigoden/aichat/actions/workflows/ci.yaml)\n[![Crates](https://img.shields.io/crates/v/aichat.svg)](https://crates.io/crates/aichat)\n[![Discord](https://img.shields.io/discord/1226737085453701222?label=Discord)](https://discord.gg/mr3ZZUB9hG)\n\nAIChat is an all-in-one LLM CLI tool featuring Shell Assistant, CMD \u0026 REPL Mode, RAG, AI Tools \u0026 Agents, and More. \n\n## Install\n\n### Package Managers\n\n- **Rust Developers:** `cargo install aichat`\n- **Homebrew/Linuxbrew Users:** `brew install aichat`\n- **Pacman Users**: `pacman -S aichat`\n- **Windows Scoop Users:** `scoop install aichat`\n- **Android Termux Users:** `pkg install aichat`\n\n### Pre-built Binaries\n\nDownload pre-built binaries for macOS, Linux, and Windows from [GitHub Releases](https://github.com/sigoden/aichat/releases), extract them, and add the `aichat` binary to your `$PATH`.\n\n## Features\n\n### Multi-Providers\n\nIntegrate 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, Lingyiwanwu, MiniMax, Deepinfra, VoyageAI, any OpenAI-Compatible API provider.\n\n### CMD Mode\n\nExplore powerful command-line functionalities with AIChat's CMD mode.\n\n![aichat-cmd](https://github.com/user-attachments/assets/6c58c549-1564-43cf-b772-e1c9fe91d19c)\n\n### REPL Mode\n\nExperience an interactive Chat-REPL with features like tab autocompletion, multi-line input support, history search, configurable keybindings, and custom REPL prompts.\n\n![aichat-repl](https://github.com/user-attachments/assets/218fab08-cdae-4c3b-bcf8-39b6651f1362)\n\n### Shell Assistant\n\nElevate 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.\n\n![aichat-execute](https://github.com/user-attachments/assets/0c77e901-0da2-4151-aefc-a2af96bbb004)\n\n### Multi-Form Input\n\nAccept diverse input forms such as stdin, local files and directories, and remote URLs, allowing flexibility in data handling.\n\n| Input             | CMD                                  | REPL                             |\n| ----------------- | ------------------------------------ | -------------------------------- |\n| CMD               | `aichat hello`                       |                                  |\n| STDIN             | `cat data.txt \\| aichat`             |                                  |\n| Last Reply        |                                      | `.file %%`                       |\n| Local files       | `aichat -f image.png -f data.txt`    | `.file image.png data.txt`       |\n| Local directories | `aichat -f dir/`                     | `.file dir/`                     |\n| Remote URLs       | `aichat -f https://example.com`      | `.file https://example.com`      |\n| External commands | ```aichat -f '`git diff`'```         | ```.file `git diff` ```          |\n| Combine Inputs    | `aichat -f dir/ -f data.txt explain` | `.file dir/ data.txt -- explain` |\n\n### Role\n\nCustomize roles to tailor LLM behavior, enhancing interaction efficiency and boosting productivity.\n\n![aichat-role](https://github.com/user-attachments/assets/023df6d2-409c-40bd-ac93-4174fd72f030)\n\n\u003e The role consists of a prompt and model configuration.\n\n### Session\n\nMaintain context-aware conversations through sessions, ensuring continuity in interactions.\n\n![aichat-session](https://github.com/user-attachments/assets/56583566-0f43-435f-95b3-730ae55df031)\n\n\u003e The left side uses a session, while the right side does not use a session.\n\n### Macro\n\nStreamline repetitive tasks by combining a series of REPL commands into a custom macro.\n\n![aichat-macro](https://github.com/user-attachments/assets/23c2a08f-5bd7-4bf3-817c-c484aa74a651)\n\n### RAG\n\nIntegrate external documents into your LLM conversations for more accurate and contextually relevant responses.\n\n![aichat-rag](https://github.com/user-attachments/assets/359f0cb8-ee37-432f-a89f-96a2ebab01f6)\n\n### Function Calling\n\nFunction 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.\n\nWe have created a new repository [https://github.com/sigoden/llm-functions](https://github.com/sigoden/llm-functions) to help you make the most of this feature.\n\n#### AI Tools\n\nIntegrate external tools to automate tasks, retrieve information, and perform actions directly within your workflow.\n\n![aichat-tool](https://github.com/user-attachments/assets/7459a111-7258-4ef0-a2dd-624d0f1b4f92)\n\n#### AI Agents (CLI version of OpenAI GPTs)\n\nAI Agent = Instructions (Prompt) + Tools (Function Callings) + Documents (RAG).\n\n![aichat-agent](https://github.com/user-attachments/assets/0b7e687d-e642-4e8a-b1c1-d2d9b2da2b6b)\n\n### Local Server Capabilities\n\nAIChat includes a lightweight built-in HTTP server for easy deployment.\n\n```\n$ aichat --serve\nChat Completions API: http://127.0.0.1:8000/v1/chat/completions\nEmbeddings API:       http://127.0.0.1:8000/v1/embeddings\nRerank API:           http://127.0.0.1:8000/v1/rerank\nLLM Playground:       http://127.0.0.1:8000/playground\nLLM Arena:            http://127.0.0.1:8000/arena?num=2\n```\n\n#### Proxy LLM APIs\n\nThe LLM Arena is a web-based platform where you can compare different LLMs side-by-side. \n\nTest with curl:\n\n```sh\ncurl -X POST -H \"Content-Type: application/json\" -d '{\n  \"model\":\"claude:claude-3-5-sonnet-20240620\",\n  \"messages\":[{\"role\":\"user\",\"content\":\"hello\"}], \n  \"stream\":true\n}' http://127.0.0.1:8000/v1/chat/completions\n```\n\n#### LLM Playground\n\nA web application to interact with supported LLMs directly from your browser.\n\n![aichat-llm-playground](https://github.com/user-attachments/assets/aab1e124-1274-4452-b703-ef15cda55439)\n\n#### LLM Arena\n\nA web platform to compare different LLMs side-by-side.\n\n![aichat-llm-arena](https://github.com/user-attachments/assets/edabba53-a1ef-4817-9153-38542ffbfec6)\n\n## Custom Themes\n\nAIChat supports custom dark and light themes, which highlight response text and code blocks.\n\n![aichat-themes](https://github.com/sigoden/aichat/assets/4012553/29fa8b79-031e-405d-9caa-70d24fa0acf8)\n\n## Documentation\n\n- [Chat-REPL Guide](https://github.com/sigoden/aichat/wiki/Chat-REPL-Guide)\n- [Command-Line Guide](https://github.com/sigoden/aichat/wiki/Command-Line-Guide)\n- [Role Guide](https://github.com/sigoden/aichat/wiki/Role-Guide)\n- [Macro Guide](https://github.com/sigoden/aichat/wiki/Macro-Guide)\n- [RAG Guide](https://github.com/sigoden/aichat/wiki/RAG-Guide)\n- [Environment Variables](https://github.com/sigoden/aichat/wiki/Environment-Variables)\n- [Configuration Guide](https://github.com/sigoden/aichat/wiki/Configuration-Guide)\n- [Custom Theme](https://github.com/sigoden/aichat/wiki/Custom-Theme)\n- [Custom REPL Prompt](https://github.com/sigoden/aichat/wiki/Custom-REPL-Prompt)\n- [FAQ](https://github.com/sigoden/aichat/wiki/FAQ)\n\n## License\n\nCopyright (c) 2023-2025 aichat-developers.\n\nAIChat is made available under the terms of either the MIT License or the Apache License 2.0, at your option.\n\nSee the LICENSE-APACHE and LICENSE-MIT files for license details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Faichat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigoden%2Faichat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Faichat/lists"}