# 使用 Homebrew, MacPorts, Nix, pacman, scoop, winget 安装 aichat

查看 aichat 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:aichat
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install aichat
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install aichat
```

  证据: MacPorts ports tree: textproc/aichat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- Nix (92%):

```sh
nix profile install nixpkgs#aichat
```

  证据: nixpkgs package indexes: pkgs/by-name/ai/aichat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

- pacman (92%):

```sh
sudo pacman -S aichat
```

  证据: Arch Linux sync databases: aichat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

### Windows

- Scoop (92%):

```sh
scoop install main/aichat
```

  证据: Scoop official bucket manifest trees: bucket/aichat.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

- winget (92%):

```sh
winget install --id sigoden.AIChat -e
```

  证据: Windows Package Manager source index: sigoden.AIChat from https://cdn.winget.microsoft.com/cache/source.msix

## 软件包事实

- **软件包键:** brew:aichat
- **软件包管理器:** Homebrew
- **版本:** 0.30.0
- **来源摘要:** All-in-one AI-Powered CLI Chat & Copilot
- **主页:** <https://github.com/sigoden/aichat>
- **仓库:** <https://github.com/sigoden/aichat>
- **最后更新:** 2026-07-10T16:49:54-04:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- aichat (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 0.30.0
## 项目历史与用法

AIChat is a Rust-based all-in-one LLM command-line tool. It combines a chat REPL, command mode, shell assistant, roles, sessions, macros, RAG, tool and agent support, and a local HTTP server under one CLI.

### 项目历史

The GitHub repository was created in March 2023, and the first listed release, v0.1.0, was published the same day. Early positioning was simple CLI chat, but the current README describes a much broader terminal copilot with multi-provider model access.

By the current documentation, AIChat supports more than 20 LLM providers through a unified interface, including OpenAI, Claude, Gemini, Ollama, Groq, Azure OpenAI, Vertex AI, Bedrock, GitHub Models, Mistral, Deepseek, OpenRouter, and OpenAI-compatible APIs. Later features include RAG, custom roles, function calling, MCP-style tools, agents, shell integration, completions, and a local server exposing chat, embeddings, rerank, playground, and arena endpoints.

### 采用历史

Official installation instructions cover cargo install, Homebrew/Linuxbrew, pacman, Scoop, Termux, and prebuilt binaries for macOS, Linux, and Windows. The supplied package facts also list MacPorts, Nix, winget, and additional package-manager entries.

The repository's GitHub metadata shows five-figure stars by this run, and official releases continued through at least v0.30.0 in July 2025. Its adoption profile is broader than a single provider wrapper: it is used as a terminal frontend for many commercial, hosted, and local models.

### 使用方式

AIChat can be run with a plain prompt, as an interactive REPL, as a shell assistant with natural-language command execution, as a code-output filter, with files or URLs as inputs, with named roles or sessions, with RAG collections, with agents, or as a local API server.

Configuration lives in a per-user config directory as config.yaml, and secrets may be stored in the config directory's .env file or supplied with provider-specific environment variables such as OPENAI_API_KEY. The wiki documents AICHAT_CONFIG_DIR, AICHAT_ENV_FILE, AICHAT_CONFIG_FILE, and related overrides.

### 为什么软件包爱好者会关心

AIChat is significant because it packages much of the post-2023 LLM terminal workflow into one distributable binary: chat, shell command generation, file ingestion, provider abstraction, local serving, RAG, and agents.

For package maintainers, it is also a good example of modern CLI packaging pressure: rapid upstream releases, many optional provider integrations, cross-platform binaries, shell completions, and config paths that differ by OS.

### 时间线

- 2023: GitHub repository created and v0.1.0 released.
- 2024: Releases expanded through v0.20+ while multi-provider and workflow features matured.
- 2025: v0.30.0 released in July.
- 2026: Official repository metadata and input package facts show broad cross-platform package-manager availability.

### Related projects

- AIChat is related to provider-specific CLIs and SDKs for OpenAI, Anthropic Claude, Gemini, Ollama, Bedrock, Mistral, and other model services.
- The README points to sigoden/llm-functions for external tool/function-calling support.

### 来源

- <https://api.github.com/repos/sigoden/aichat>
- <https://api.github.com/repos/sigoden/aichat/releases?per_page=100>
- <https://github.com/sigoden/aichat#readme>
- <https://github.com/sigoden/aichat/wiki/Command-Line-Guide>
- <https://github.com/sigoden/aichat/wiki/Configuration-Guide>
- <https://github.com/sigoden/aichat/wiki/Environment-Variables>
- source_facts.package-manager


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Linux: /home/alice/.config/aichat/config.yaml
- macOS: /Users/Alice/Library/Application Support/aichat/config.yaml
- Windows: C:\Users\Alice\AppData\Roaming\aichat\config.yaml

## Credential files

- Linux: /home/alice/.config/aichat/.env
- macOS: /Users/Alice/Library/Application Support/aichat/.env
- Windows: C:\Users\Alice\AppData\Roaming\aichat\.env
## 其他软件包管理器记录

- Nix - aichat: normalized package name match | nixpkgs package indexes: pkgs/by-name/ai/aichat/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
- pacman - aichat - 0.30.0-3: normalized package name match | Arch Linux sync databases: aichat from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz | All-in-one AI CLI tool featuring Chat-REPL, Shell Assistant, RAG, AI tools & agents | https://github.com/sigoden/aichat
- MacPorts - aichat: normalized package name match | MacPorts ports tree: textproc/aichat/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Scoop - main/aichat: normalized package name match | Scoop official bucket manifest trees: bucket/aichat.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1
- winget - sigoden.AIChat: normalized package name match | Windows Package Manager source index: sigoden.AIChat from https://cdn.winget.microsoft.com/cache/source.msix


## Combined YAML source

View the package source record on GitHub. [combined/aichat.yml](https://github.com/mxcl/pkgdb/blob/main/combined/aichat.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
