> ## 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.

# Installation and Upgrade

<div id="requirements">
  # Requirements
</div>

Before installing Qoder CLI, ensure your environment meets the following requirements:

* **Operating System**: macOS, Linux, Windows (Windows Terminal is recommended).
* **CPU Architecture**: arm64, amd64.
* **Node.js**: Node.js >= 20.0.0 is required when installing via npm.

> Windows (arm64) is not currently supported.

<div id="install">
  # Installation
</div>

Qoder CLI offers multiple installation methods. Choose the one that best fits your environment and preferences.

## Using the Installation Script (Recommended)

The installation script automatically downloads the version matching your current system and configures the executable.

**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
```

## Installing via npm

If you already have Node.js (>= 20.0.0) installed, you can install it globally via npm:

```shell theme={null}
npm install -g @qoder-ai/qodercli
```

Specify a release channel:

```shell theme={null}
# Stable version
npm install -g @qoder-ai/qodercli@latest

# Node native compatible version (beta)
npm install -g @qoder-ai/qodercli@beta
```

> `beta` is the preview channel for the Node native-compatible version, and its version number may be lower than the Stable Release. Unless you have specific needs, it is recommended to install the Stable Release.

<div id="verify">
  # Verifying the Installation
</div>

After installation, run the following command. If the CLI version number is printed, the installation was successful:

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

If you receive a "command not found" error, check whether the installation directory has been added to the system `PATH`. For troubleshooting steps, see Installation and Upgrade issues.

<div id="first-run">
  # First Run
</div>

Run the following command in any project root directory to enter the default interactive (TUI) mode:

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

On the first run, Qoder CLI will guide you through the sign-in process. For details on sign-in methods, see [Sign-in and Authentication](/en/cli/01-getting-started/auth).

<div id="upgrade">
  # Upgrade
</div>

Qoder CLI has Auto-Upgrade enabled by default. You can also manually upgrade to the latest version at any time.

## Upgrading via the Installation Script

**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
```

## Using the Built-in Update Command

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

## Upgrading via npm

```shell theme={null}
npm install -g @qoder-ai/qodercli@latest
```

<div id="auto-update">
  # Auto-Upgrade Settings
</div>

Auto-Upgrade is enabled by default. To disable it, set `general.enableAutoUpdate` to `false` in `~/.qoder/settings.json`:

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

For the scope and application order of configuration files, see Configuration files and application order.

<div id="uninstall">
  # Uninstallation
</div>

The uninstallation method depends on how you installed it:

* **Installed via npm**: Run `npm uninstall -g @qoder-ai/qodercli`.
* **Installed via the installation script**: Delete the executable placed by the installation script and remove the corresponding directory from `PATH`.

If you also want to clean up configuration and local data, you can delete the configuration directory (default: `~/.qoder`). Before deleting, ensure there are no sessions, memories, or settings you need to keep.

> The configuration directory location can be customized via the `QODER_CONFIG_DIR` Environment Variable, with the default being `~/.qoder`. If you have set this variable, delete the corresponding directory.
