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 | bashWindows PowerShell
irm https://qoder.com.cn/install.ps1 | iexWindows CMD
curl -fsSL https://qoder.com.cn/install.cmd -o install.cmd && install.cmdAfter installation, run the following command. If the CLI version number is displayed, the installation was successful.
qoderclicn --versionSign 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
/loginChoose 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 -- --forceNPM
npm install -g @qodercn-ai/qoderclicnUse the built-in update feature
qoderclicn updateTo 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
/logoutIf you authenticated using the QODERCN_PERSONAL_ACCESS_TOKEN environment variable, you must unset it before running the /logout command.