> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cowagent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# アップデート

> CowAgent のアップグレード方法

## コマンドによるアップグレード（推奨）

`cow update` でコードの更新とサービスの再起動をワンクリックで実行できます：

```bash theme={null}
cow update
```

このコマンドは以下のフローを自動的に実行します：

1. 最新コードをプル（`git pull`）
2. 現在のサービスを停止
3. Python 依存パッケージを更新
4. CLI を再インストール
5. サービスを起動

<Note>
  Cow CLI がインストールされていない場合は、`./run.sh update` でも同様の操作が可能です。
</Note>

## 手動アップグレード

プロジェクトのルートディレクトリで以下を実行します：

```bash theme={null}
git pull
pip3 install -r requirements.txt
pip3 install -e .
```

更新完了後、サービスを再起動します：

```bash theme={null}
# Cow CLI を使用
cow restart

# または run.sh を使用
./run.sh restart

# または nohup で直接実行
kill $(ps -ef | grep app.py | grep -v grep | awk '{print $2}')
nohup python3 app.py & tail -f nohup.out
```

## Docker アップグレード

`docker-compose.yml` があるディレクトリで以下を実行します：

```bash theme={null}
sudo docker compose pull
sudo docker compose up -d
```

<Tip>
  アップグレード前に `config.json` 設定ファイルのバックアップを推奨します。Docker 環境でデータを保持する場合は、volume マウントでワークスペースディレクトリを永続化できます。
</Tip>

## デスクトップクライアントのアップグレード

[デスクトップクライアント](/ja/guide/desktop)は自動アップデート機能を内蔵しており、新しいバージョンを自動的に確認して通知します。ワンクリックでダウンロードして再起動し、アップグレードを完了できます。

最新バージョンは [ダウンロードページ](https://cowagent.ai/download/) からいつでも手動で入手することもできます。
