# Procedures to Switch to Diarkis CLI v3

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

Since the Diarkis CLI versions v1 and v2 are set to be discontinued, we request you to switch to the latest Diarkis CLI v3. If you have been using Diarkis for a while, you may be using v1/v2, and therefore, an upgrade to the Diarkis CLI is necessary.

By using the latest version, you can achieve faster builds. We apologize for the inconvenience and appreciate your understanding and cooperation.

## How to Check Your Current Version

Search for `builder.diarkis.io` in your server's source code.

If your search result is `v3.builder.diarkis.io`, there is no need to switch.

If your search results in `builder.diarkis.io` or `v2.builder.diarkis.io`, you need to switch, so please follow the steps outlined below.

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

1. Download the new diarkis-cli
   * You can download the binary from <https://github.com/Diarkis/diarkis-server-template/tree/develop/src/diarkis-cli/os> and replace your existing diarkis-cli binary.
2. Change the endpoint of the diarkis build server
   * Replace occurrences of `builder.diarkis.io` / `v2.builder.diarkis.io` in the source code with **`v3.builder.diarkis.io`**.
3. (Optional) Use `.buildignore` to speed up the build process further.
   * `.buildignore` specifies the items not to be uploaded to the build server, reducing the upload size and overall build time.
   * Refer to <https://github.com/Diarkis/diarkis-server-template/blob/develop/src/.buildignore> and place it in your repository. The default settings are generally sufficient, but if there are additional unnecessary files or folders, particularly large binary files, it is recommended to add them to the list.
4. Run the script or task that executes `diarkis-cli` to ensure there are no issues.


---

# Agent Instructions: 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:

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

The question should be specific, self-contained, and written in natural language.
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.
