Quick start

更新时间:
复制 MD 格式

This topic describes how to install, sign in to, and use Qoder CLI CN.

Install

Supported operating systems: macOS, Linux, and Windows

You can install Qoder CLI CN using one of the following methods:

macOS / Linux

curl -fsSL https://qoder.com.cn/install | bash

Windows PowerShell

irm https://qoder.com.cn/install.ps1 | iex

Windows CMD

curl -fsSL https://qoder.com.cn/install.cmd -o install.cmd && install.cmd

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

qoderclicn --version

Sign in

You must authenticate before using Qoder CLI CN. The CLI automatically prompts you to sign in the first time you run a command.

There are two primary authentication methods:

  • Interactive sign-in (recommended)

  • Environment variables (for automated scripts)

Method 1: Interactive sign-in

Use this method to sign in directly from the terminal's text-based user interface (TUI).

# Start Qoder CLI CN in the terminal
qoderclicn

# In the interactive prompt, enter /login
/login

Choose a sign-in method:

  • Sign in with browser: This opens a sign-in page in your default browser to complete authentication.

  • Sign in with Qoder CN Personal Access Token: Paste your Qoder CN Personal Access Token directly into the terminal when prompted.

After you make a selection, the application guides you through the remaining steps.

You can obtain your Qoder CN Personal Access Token from this page: https://qoder.com.cn/account/integrations

Method 2: Sign in using an environment variable

For non-interactive sessions or automated environments, such as CI/CD pipelines, you can authenticate by setting an environment variable.

# Linux/macOS example
export QODERCN_PERSONAL_ACCESS_TOKEN="your_personal_access_token_here"
# Windows example (Command Prompt)
set QODERCN_PERSONAL_ACCESS_TOKEN="your_personal_access_token_here"

If you set a valid token using both the /login command and an environment variable, the token from the /login command takes precedence.

Usage

Now that you're signed in, see Using the CLI to learn how to use Qoder CLI CN.

Update

Automatic updates are on by default. You can also manually update the CLI using one of the following methods:

cURL

curl -fsSL https://qoder.com.cn/install | bash -s -- --force

NPM

npm install -g @qodercn-ai/qoderclicn

Use the built-in update feature

qoderclicn update

To disable automatic updates, in the ~/.qoder-cn.json file, set autoUpdates to false.

{
  "autoUpdates": false,
  "...": "..."
}

Sign out

To sign out of Qoder CLI CN, run the /logout command.

# In the interactive prompt, enter /logout
/logout

If you authenticated using the QODERCN_PERSONAL_ACCESS_TOKEN environment variable, you must unset it before running the /logout command.