# 安装 Hope Agent

网页来源: https://www.hopeagent.ai/zh/install

当前正式版为 v0.72.0，已提供 Apple Silicon arm64 与 Intel x64 两种原生 DMG。Windows x64 与 Linux x64 / arm64 为实验性支持。按芯片与版本选择实际 Release 资产。

## macOS

### Homebrew

```bash
brew tap shiwenwen/hope-agent
brew install --cask hope-agent
```

> 已经手动装过 `Hope Agent.app`？在 `brew install` 后面加 `--adopt`（接管同版本现有应用，不重新下载）或 `--force`（强制重下覆盖）。

### 手动安装（DMG）

下载 [v0.72.0 Apple Silicon DMG](https://github.com/shiwenwen/hope-agent/releases/download/v0.72.0/Hope.Agent_0.72.0_aarch64.dmg)，拖到「应用程序」即可。镜像直链：[Apple Silicon](https://repo.hopeagent.ai/download/latest/Hope.Agent_aarch64.dmg)。

> 若启动时提示"已损坏"或"无法验证开发者"，请在终端执行：
>
> ```bash
> sudo xattr -cr /Applications/Hope\ Agent.app
> sudo codesign --force --deep --sign - /Applications/Hope\ Agent.app
> ```

Intel Mac 可下载 [v0.72.0 x64 DMG](https://github.com/shiwenwen/hope-agent/releases/download/v0.72.0/Hope.Agent_0.72.0_x64.dmg)。Apple Silicon（arm64）安装包不能在 Intel Mac 上运行；Apple Silicon 选 arm64，Intel Mac 选 x64。其他版本的芯片支持请检查 [Release 资产](https://github.com/shiwenwen/hope-agent/releases)。

## Windows

### Scoop

```powershell
scoop bucket add hope-agent https://github.com/shiwenwen/scoop-hope-agent
scoop install hope-agent
```

### 手动安装（installer）

到 [Releases](https://github.com/shiwenwen/hope-agent/releases) 下载 `Hope.Agent_*-setup.exe` 双击安装。镜像直链：[x64 installer](https://repo.hopeagent.ai/download/latest/Hope.Agent_x64-setup.exe)。**Windows 端尚未完成充分测试**，欢迎反馈问题。

> 若启动时提示"由于找不到 MSVCP140_1.dll，无法继续执行代码"或类似缺失 `VCRUNTIME140.dll` / `MSVCP140.dll`，请安装 [Microsoft Visual C++ 2015–2022 运行库（x64）](https://aka.ms/vs/17/release/vc_redist.x64.exe)后重启应用。

当前仅 x64。

## Linux

### Arch Linux / Manjaro（AUR）

```bash
yay -S hope-agent-bin   # 或 paru / 任意 AUR helper
```

预编译二进制版（沿用 GitHub Release 的 `.deb`），不从源码编译。

### Debian / Ubuntu（apt）

```bash
curl -fsSL https://repo.hopeagent.ai/pubkey.gpg | \
  sudo gpg --dearmor -o /usr/share/keyrings/hope-agent.gpg
echo "deb [signed-by=/usr/share/keyrings/hope-agent.gpg] https://repo.hopeagent.ai/apt stable main" | \
  sudo tee /etc/apt/sources.list.d/hope-agent.list
sudo apt update
sudo apt install hope-agent
```

### Fedora / RHEL / CentOS（dnf / yum）

```bash
sudo curl -fsSL https://repo.hopeagent.ai/rpm/hope-agent.repo \
  -o /etc/yum.repos.d/hope-agent.repo
sudo dnf install hope-agent     # 或 sudo yum install hope-agent
```

> 历史命令 `sudo dnf config-manager --add-repo …` 在 dnf5（Fedora 41+）已经废弃，用上面的 `curl` 写法对 dnf4 / dnf5 / yum / zypper 都兼容。

openSUSE 用户：

```bash
sudo zypper addrepo https://repo.hopeagent.ai/rpm/hope-agent.repo
sudo zypper install hope-agent
```

### 手动安装（AppImage / deb / rpm）

到 [Releases](https://github.com/shiwenwen/hope-agent/releases) 下载（包名含架构后缀，按你的机器选 `_amd64` / `_arm64` 或 `.x86_64` / `.aarch64`）：

- AppImage：`Hope.Agent_*.AppImage` —— `chmod +x` 后直接运行。镜像：[amd64](https://repo.hopeagent.ai/download/latest/Hope.Agent_amd64.AppImage) · [aarch64](https://repo.hopeagent.ai/download/latest/Hope.Agent_aarch64.AppImage)
- Debian / Ubuntu：`Hope.Agent_*.deb` —— `sudo dpkg -i Hope.Agent_*.deb`。镜像：[amd64](https://repo.hopeagent.ai/download/latest/Hope.Agent_amd64.deb) · [arm64](https://repo.hopeagent.ai/download/latest/Hope.Agent_arm64.deb)
- Fedora / RHEL：`Hope.Agent_*.rpm` —— `sudo rpm -i Hope.Agent_*.rpm`。镜像：[x86_64](https://repo.hopeagent.ai/download/latest/Hope.Agent.x86_64.rpm) · [aarch64](https://repo.hopeagent.ai/download/latest/Hope.Agent.aarch64.rpm)

提供 amd64 (x86_64) 与 arm64 (aarch64) 两种原生构建，覆盖普通 PC、树莓派 4/5、Apple Silicon 跑 Asahi Linux、Graviton / Ampere 云主机。apt 与 dnf 都会按 `dpkg --print-architecture` / `$basearch` 自动选对版本。

## 首次启动与更新

1. 首次启动向导：**选 Provider 模板 → 填 API Key / Codex OAuth 登录 → 开聊**。
2. 桌面更新器优先读取 `repo.hopeagent.ai` 镜像，GitHub Releases 兜底；在 **设置 → 关于** 检查更新，或在对话中说「升级」。更新器下载的安装包使用内置公钥验签。
3. Homebrew / AUR / Scoop 安装的版本同样可走应用内更新，包管理器记录的版本可能仍为初装版本。
4. 使用本地模型时，先从 [Ollama 官网](https://ollama.com/download) 手动安装运行时，再回到设置中下载模型并切换。

> 远程访问前先在 **设置 → 服务器** 配置 Owner Token，再监听 `0.0.0.0:8420`。浏览器通过登录页换取受保护会话；不要把 Root Token 放进 URL。公网使用 HTTPS 反向代理。

## 相关文档与源码

- [Hope Agent — 会记忆、能行动的开源 AI 助手](https://www.hopeagent.ai/zh)

- [Hope Agent 使用手册](https://www.hopeagent.ai/zh/guide)

- [运行模式](https://www.hopeagent.ai/zh/running-modes)

- [功能](https://www.hopeagent.ai/zh/features)

- [自托管](https://www.hopeagent.ai/zh/self-host)

- [常见问题](https://www.hopeagent.ai/zh/faq)

- [更新内容](https://www.hopeagent.ai/zh/changelog)

- [GitHub](https://github.com/shiwenwen/hope-agent)

- [Releases](https://github.com/shiwenwen/hope-agent/releases)

- [MIT](https://github.com/shiwenwen/hope-agent/blob/main/LICENSE)

