docs: add one-line update guide (#71)

- New docs/update.md for AI agents to follow
- README: add update one-liner next to install one-liner
- Same pattern: copy one line to your agent, it handles the rest

Co-authored-by: Panniantong <panniantong@users.noreply.github.com>
This commit is contained in:
Pnant 2026-03-04 18:25:17 +08:00 committed by GitHub
parent ca29c4fee5
commit 27d3d545e6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 76 additions and 0 deletions

65
docs/update.md Normal file
View file

@ -0,0 +1,65 @@
# Agent Reach — Update Guide
## For Humans
Copy this to your AI Agent:
```
帮我更新 Agent Reachhttps://raw.githubusercontent.com/Panniantong/agent-reach/main/docs/update.md
```
---
## For AI Agents
### Goal
Update Agent Reach to the latest version, then verify everything still works.
### Step 1: Check current version
```bash
agent-reach check-update
```
If it says "已是最新版本", you're done — tell the user.
### Step 2: Update
```bash
pip install --upgrade https://github.com/Panniantong/agent-reach/archive/main.zip
```
### Step 3: Verify
```bash
agent-reach version
agent-reach doctor
```
Report the new version and channel status to the user. If any channel changed status (was ✅ now ❌), investigate and fix.
### Step 4: Update SKILL.md (if installed)
If the user has the Agent Reach skill installed, update it too:
```bash
agent-reach install --skill-only
```
If the `--skill-only` flag is not available, manually copy the latest SKILL.md:
```bash
python3 -c "
import importlib.resources, shutil, os
skill = importlib.resources.files('agent_reach').joinpath('skill', 'SKILL.md').read_text()
for d in [os.path.expanduser('~/.openclaw/skills/agent-reach'),
os.path.expanduser('~/.claude/skills/agent-reach')]:
if os.path.isdir(d):
with open(os.path.join(d, 'SKILL.md'), 'w') as f:
f.write(skill)
print(f'✅ Updated: {d}')
"
```
Done. Tell the user what version they're now on and how many channels are available.