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

# クイックスタート

<div id="install">
  # インストール
</div>

* 対応オペレーティングシステム: macOS、Linux、Windows（Windows Terminal）
* 対応CPUアーキテクチャ: arm64、amd64

> Windows on Arm (arm64) は、まだサポートされていません。

インストール方法:

**MacOS / Linux**

```shell theme={null}
curl -fsSL https://qoder.com/install | bash
```

**Windows PowerShell**

```shell theme={null}
irm https://qoder.com/install.ps1 | iex
```

**Windows CMD**

```shell theme={null}
curl -fsSL https://qoder.com/install.cmd -o install.cmd && install.cmd
```

インストール後、次のコマンドを実行してください。CLI のバージョンが表示されれば、インストールは完了しています。

```shell theme={null}
qodercli --version
```

<div id="sign-in">
  # サインイン
</div>

Qoder を使用する前に認証が必要です。CLI は、最初にコマンドを実行した際に自動的にサインインを求めます。

認証方法は主に次の 2 つです:

* インタラクティブ サインイン（推奨）
* 環境変数（自動化スクリプト向け）

**方法 1: TUI 経由でサインイン**

この方法では、ターミナルのテキストベースのユーザーインターフェース（TUI）から直接サインインできます。

```shell theme={null}
# ターミナルでQoder CLIを起動
qodercli

# 対話型プロンプトで /login を入力
/login
```

必要に応じて、いずれかのログイン方法を選択できます:

* **login with browser**: 既定のウェブブラウザでサインインページが開き、認証を完了します。
* **login with qoder personal access token**: ターミナルに Qoder Personal Access Token を直接貼り付けるよう求められます。

選択後、アプリケーションが最終手順を案内します。

> Personal Access Token は以下のページで取得できます: [https://qoder.com/account/integrations](https://qoder.com/account/integrations)

**方法 2: 環境変数でサインイン**

非対話型セッションや自動化環境（例: CI/CD パイプライン）では、環境変数を設定して認証できます。

```shell theme={null}
# Linux/macOS の例
export QODER_PERSONAL_ACCESS_TOKEN="your_personal_access_token_here"
```

```shell theme={null}
# Windows（コマンドプロンプト）の例
set QODER_PERSONAL_ACCESS_TOKEN="your_personal_access_token_here"
```

> `/login` コマンドとこの環境変数の両方で有効なトークンが設定されている場合は、`/login` で指定したトークンが優先されます。

<div id="use">
  # 使用方法
</div>

サインインが完了したら、[Using CLI](https://docs.qoder.com/ja/cli/using-cli) を参照して、Qoder CLI の使い方を学びましょう。

<div id="upgrade">
  # アップグレード
</div>

自動アップグレードは既定で有効です。以下の方法で手動アップグレードすることもできます：

**MacOS / Linux**

```shell theme={null}
curl -fsSL https://qoder.com/install | bash -s -- --force
```

**Windows PowerShell**

```shell theme={null}
irm https://qoder.com/install.ps1 | iex
```

**Windows CMD**

```shell theme={null}
curl -fsSL https://qoder.com/install.cmd -o install.cmd && install.cmd
```

**内蔵の更新機能を使用する**

```shell theme={null}
qodercli update
```

自動アップデートを無効にするには、`~/.qoder/settings.json` の `general.enableAutoUpdate` を `false` に設定します。

```json theme={null}
{
  "general": {
    "enableAutoUpdate": false
  }
}
```

<div id="sign-out">
  # サインアウト
</div>

必要に応じて `/logout` コマンドでサインアウトできます。

```shell theme={null}
# インタラクティブプロンプトで /logout と入力します
/logout
```

> `QODER_PERSONAL_ACCESS_TOKEN` 環境変数で認証した場合は、`/logout` を実行する前にその変数をアンセットしてください。
