Install hermit-update / hermit-service from make install and bootstrap; keep cst-agent-* as compat symlinks. Co-authored-by: Cursor <cursoragent@cursor.com>
93 lines
3.2 KiB
Markdown
93 lines
3.2 KiB
Markdown
# Hermit
|
||
|
||
> **仓库已更名。** 规范地址:[WHC/Hermit](https://git.whcself.xyz/WHC/Hermit)。
|
||
> 本仓库 `CST-agent` 仅作迁移兼容入口。换远程:`./scripts/migrate_remote_to_hermit.sh`
|
||
> 完整步骤:[MIGRATION.md](MIGRATION.md)。
|
||
|
||
本地 coding agent(原 CST-Agent):终端 TUI、可选 WebUI / 桌面 GUI,在工作区里读改文件、跑命令、管会话。
|
||
C11 实现,OpenAI 兼容网关(DeepSeek / Kimi / MiniMax / OpenAI 等)。
|
||
|
||
**适合**:有监督的本地改动与仓库探索(权限确认、diff、`/undo`、沙箱)。
|
||
**慎用**:完全无人值守的长任务;headless 默认自动批准。
|
||
|
||
文档索引:[docs/README.md](docs/README.md)。
|
||
|
||
兼容:安装后提供 `cst-agent` → `hermit` 软链;环境变量 `HERMIT_*` 优先,仍接受 `CST_*`;配置目录优先 `~/.config/hermit`,若无则回退 `~/.config/cst-agent`。
|
||
|
||
---
|
||
|
||
## 安装
|
||
|
||
### Linux / WSL / macOS
|
||
|
||
```bash
|
||
# 预编译包(快;失败则回退源码)— 规范仓库 Hermit
|
||
curl -fsSL https://git.whcself.xyz/WHC/Hermit/raw/branch/main/scripts/bootstrap_linux.sh | bash -s -- --release
|
||
|
||
# 源码增量编译 → ~/.local/bin/hermit(+ cst-agent 软链)
|
||
curl -fsSL https://git.whcself.xyz/WHC/Hermit/raw/branch/main/scripts/bootstrap_linux.sh | bash
|
||
```
|
||
|
||
```bash
|
||
./scripts/bootstrap_linux.sh .
|
||
hermit --version # hermit 1.0.x
|
||
hermit-update # 升级(源码或 --release);兼容 cst-agent-update
|
||
./scripts/migrate_remote_to_hermit.sh # 已有 CST-agent 检出时改 origin
|
||
```
|
||
|
||
[Release](https://git.whcself.xyz/WHC/Hermit/releases)(旧 [CST-agent releases](https://git.whcself.xyz/WHC/CST-agent/releases) 过渡期可能仍有镜像):`hermit-VERSION-linux-{x86_64,x86,aarch64}.tar.gz`。
|
||
|
||
### Windows
|
||
|
||
见 [docs/README-windows.md](docs/README-windows.md)(产物名逐步改为 `hermit-…`;旧 `cst-agent-…` 包过渡期可能仍有)。
|
||
|
||
### 第一次用
|
||
|
||
```bash
|
||
cd ~/my-project && hermit
|
||
```
|
||
|
||
---
|
||
|
||
## 构建
|
||
|
||
```bash
|
||
make -j$(nproc) # 产出 hermit(并链 cst-agent)
|
||
make -j$(nproc) check
|
||
make hermit-font # 烘焙 PNG 帧 + hermit-icons.ttf(Pillow + fonttools)
|
||
make install PREFIX=$HOME/.local # 同时安装字体到 share/fonts/hermit 与 ~/.local/share/fonts
|
||
```
|
||
|
||
TUI 图标:`HERMIT_ICONS=auto|mini|font`(默认色块动画帧,状态与 `icons/agent-motion` HTML 套件一致;`font` 输出 PUA `U+E700+`,需终端加载已安装的 Hermit Icons)。
|
||
|
||
---
|
||
|
||
## 用法速览
|
||
|
||
```bash
|
||
hermit # TUI
|
||
hermit --web # http://127.0.0.1:8787/
|
||
hermit --headless --prompt '…'
|
||
```
|
||
|
||
首页品牌 **HERMIT** + 寄居蟹色块动效;色板:brand `#277F94`、crab `#F68042`、eye `#9957AD`。
|
||
|
||
更多:Provider / 工具 / 议会 / WebUI 见 [docs/](docs/)。
|
||
|
||
---
|
||
|
||
## CI 与发布
|
||
|
||
`.gitea/workflows/ci.yml`:TinyCC check → 打 Linux/Windows 包 → `scripts/ci_publish.sh`。
|
||
共用逻辑:[scripts/lib_release.sh](scripts/lib_release.sh)。
|
||
|
||
## 开发者
|
||
|
||
```bash
|
||
make check
|
||
scripts/prompt_smoke.sh
|
||
scripts/e2e_webui.sh
|
||
```
|
||
|
||
`icons/agent-motion/` 为 SVG 资产;`make hermit-font` 生成 `res/hermit-icons.ttf`(sbix 彩色位图,96 帧)与 `res/hermit-frames/`。安装脚本会把字体装进系统字体目录。
|