docs: update docs and readme

This commit is contained in:
zhayujie
2026-05-24 18:29:57 +08:00
parent 29af855ecd
commit 91d427c8f9
32 changed files with 618 additions and 264 deletions

61
docs/en/guide/upgrade.mdx Normal file
View File

@@ -0,0 +1,61 @@
---
title: Upgrade
description: How to upgrade CowAgent
---
## Recommended: One-line upgrade
Use `cow update` to pull the latest code and restart the service in one step:
```bash
cow update
```
The command runs the following automatically:
1. Pull the latest code (`git pull`)
2. Stop the running service
3. Update Python dependencies
4. Reinstall the CLI
5. Start the service
<Note>
If the Cow CLI is not installed, `./run.sh update` performs the same operations.
</Note>
## Manual upgrade
Run the following inside the project root:
```bash
git pull
pip3 install -r requirements.txt
pip3 install -e .
```
Then restart the service:
```bash
# Using Cow CLI (recommended)
cow restart
# Or using run.sh
./run.sh restart
# Or restart manually with nohup
kill $(ps -ef | grep app.py | grep -v grep | awk '{print $2}')
nohup python3 app.py & tail -f nohup.out
```
## Docker upgrade
Run the following in the directory containing `docker-compose.yml`:
```bash
sudo docker compose pull
sudo docker compose up -d
```
<Tip>
Back up `config.json` before upgrading. For Docker deployments, mount the workspace directory as a volume to persist data across upgrades.
</Tip>