> For the complete documentation index, see [llms.txt](https://help.diarkis.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.diarkis.io/diarkis-tool/diarkis-cli/how-to-switch-diarkis-cli-v3.md).

# Diarkis CLI v3 への切り替え手順

## 概要 <a href="#gai-yao" id="gai-yao"></a>

Diarkis CLI の v1 及び v2 バージョンは廃止していく方針のため、最新の Diarkis CLI v3 への切り替えをお願いしております。以前から Diarkis をご利用いただいている場合、v1/v2 を利用している可能性があるため、Diarkis CLI のバージョンアップが必要となります。

最新バージョンを利用いただくことによって、ビルドの高速化ができますので、お手数をおかけしますが、よろしくお願いいたします。

## 利用中のバージョンの確認方法

サーバーのソースコードに `builder.diarkis.io` があるか検索します。

検索結果が `v3.builder.diarkis.io` であれば切り替える必要はありません。

検索結果が `builder.diarkis.io` / `v2.builder.diarkis.io` の場合は切り替える必要があるので、以降の手順を実施してください。

## 手順 <a href="#shou-shun" id="shou-shun"></a>

1. 新しい diarkis-cli のダウンロード
   * <https://github.com/Diarkis/diarkis-server-template/tree/develop/src/diarkis-cli/os> よりバイナリをダウンロードできますので、既存の diarkis-cli のバイナリと置き換えます。
2. diarkis ビルドサーバーのエンドポイントの変更
   * ソースコード内の`builder.diarkis.io` / `v2.builder.diarkis.io` で記載されている箇所を **`v3.builder.diarkis.io`** に書き換えます
3. (Optional) `.buildignore` を利用することで更にビルドを速くすることができます。
   * `.buildignore` はビルドサーバーにアップロードしない対象を指定するもので、アップロードサイズを減らしてビルド全体にかかる時間を削減できます。
   * <https://github.com/Diarkis/diarkis-server-template/blob/develop/src/.buildignore> を参考にリポジトリに配置します。基本的にデフォルトで問題ありせんが、他に不要なファイルやフォルダ、特に大きなサイズのバイナリファイルがある場合は追記することをおすすめします。
4. 実際に `diarkis-cli` を実行するスクリプトやタスクを実行して、問題がないことを確認します。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.diarkis.io/diarkis-tool/diarkis-cli/how-to-switch-diarkis-cli-v3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
