feat(onboard): SOUL.md 家族共识写入 09-hermes-config
- ~/Code/ 统一代码目录、nvm/cfg 加载、Git 署名等共识 - 写入 SOUL.md 焊进 system prompt,每次对话自动生效 [小糯]
This commit is contained in:
parent
688411fac8
commit
8610cf6329
@ -90,6 +90,23 @@ hermes-har personality switch <name> --tg
|
||||
|
||||
⚠️ 性格配置因人而异,必须跟主人确认后再设置。
|
||||
|
||||
### 5. SOUL.md 家族共识
|
||||
|
||||
在 `~/.hermes/SOUL.md` 的人设内容末尾追加家族共识:
|
||||
|
||||
```markdown
|
||||
## 家族共识
|
||||
|
||||
- 代码仓库统一 clone 到 `~/Code/`
|
||||
- Skills repo 在 `~/skills/`
|
||||
- Node.js 用 nvm 管理,非交互 shell 需先 `export NVM_DIR="$HOME/.nvm" && . "$NVM_DIR/nvm.sh"`
|
||||
- 配置管理用 cfg CLI,`eval "$(cfg env)"` 加载环境变量
|
||||
- 代码托管在 git.shazhou.work(Gitea),Git 提交末尾署名 `[你的名字]`
|
||||
- Gitea 操作(comment/issue/PR/文档)须署名标识自己
|
||||
```
|
||||
|
||||
⚠️ 署名改成你自己的名字。这段会焊进 system prompt,每次对话自动加载。
|
||||
|
||||
## 验证
|
||||
|
||||
```bash
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
|
||||
```bash
|
||||
cursor-agent --version
|
||||
echo $CURSOR_API_KEY | head -c 10
|
||||
eval "$(cfg env)" && echo $CURSOR_API_KEY | head -c 10
|
||||
```
|
||||
|
||||
✅ 达标:`cursor-agent` 可用,`CURSOR_API_KEY` 已配置
|
||||
@ -19,16 +19,9 @@ echo $CURSOR_API_KEY | head -c 10
|
||||
### 1. 安装 cursor-agent
|
||||
|
||||
```bash
|
||||
# 下载最新版
|
||||
curl -fsSL https://www.cursor.com/agent/install.sh | bash
|
||||
```
|
||||
|
||||
安装后确认:
|
||||
|
||||
```bash
|
||||
cursor-agent --version
|
||||
```
|
||||
|
||||
### 2. 获取 API Key
|
||||
|
||||
向主人 (沙洲) 索取 Cursor API Key。拿到后存入 cfg:
|
||||
@ -47,36 +40,9 @@ cfg set CURSOR_API_KEY '拿到的key' --secret
|
||||
}
|
||||
```
|
||||
|
||||
这样 cursor-agent 执行命令时不需要逐条审批。
|
||||
|
||||
### 4. 环境变量
|
||||
|
||||
确认 `cfg env` 会导出 `CURSOR_API_KEY`:
|
||||
|
||||
```bash
|
||||
eval "$(cfg env)"
|
||||
echo $CURSOR_API_KEY | head -c 10
|
||||
```
|
||||
|
||||
## 使用
|
||||
|
||||
Hermes 通过 delegate_tool 调用 cursor-agent 执行编码任务:
|
||||
|
||||
```bash
|
||||
# 直接使用
|
||||
cursor-agent "实现 xxx 功能"
|
||||
|
||||
# 在指定目录工作
|
||||
cd /path/to/project && cursor-agent "修复 bug"
|
||||
```
|
||||
|
||||
## 验证
|
||||
|
||||
```bash
|
||||
cursor-agent --version
|
||||
# 应显示版本号
|
||||
|
||||
eval "$(cfg env)"
|
||||
echo $CURSOR_API_KEY | head -c 10
|
||||
# 应显示 key 前缀
|
||||
eval "$(cfg env)" && echo $CURSOR_API_KEY | head -c 10
|
||||
```
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user