QwenCloud management CLI for managing model catalog, accounts, usage, billing, subscriptions, and support tickets
Version 1.3.0QwenCloud CLI is open source -- browse the code, file issues, or contribute: GitHub
Quick start
Requires Node.js 18 or later. The npm package name and installable versions are subject to the actual release page.
- Install and verify:
- Interactive login:
- Run your first query:
qwencloud without arguments to enter interactive mode; with a command it executes once and exits.
No environment variables needed; the login flow saves management credentials. A successful models list response confirms installation, network, and login are all working. Agents can run qwencloud config set output.format json to lock JSON output; run qwencloud doctor --format json if verification fails.
Models and docs
Filter available models, check model details, or find onboarding docs? Start here.
models list
List available models, filtered by input/output modality.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--input <modality> | enum | No | unset | Input modality: text, image, video, audio, vector |
--output <modality> | enum | No | unset | Output modality: text, image, video, audio, vector |
--page <integer> | integer | No | 1 | Page number; values below 1 are normalized to 1 |
--per-page <integer> | integer | No | 20 | Models per page; values below 1 are normalized to 1 |
--all | boolean | No | false | Return all models and disable pagination; forces JSON |
--verbose | boolean | No | false | Include detail fields; forces JSON |
qwencloud models info <id> to view full pricing, context, and rate-limit details.
models info
View full details for a single model; provide at least one of the positional argument or --model.
| Flag / Arg | Type | Required | Default | Description |
|---|---|---|---|---|
[id] | string | conditional | none | Model ID |
--model [id] | string | conditional | none | Model ID; alternative to the positional argument |
qwencloud models search <query> to narrow results.
models search
Search models by keyword or modality.
| Flag / Arg | Type | Required | Default | Description |
|---|---|---|---|---|
<query> | string | Yes | none | Search term |
--page <integer> | integer | No | 1 | Page number |
--per-page <integer> | integer | No | 20 | Models per page |
--all | boolean | No | false | Return all matches; forces JSON |
docs search
Search official documentation; optionally view the Nth result inline.
| Flag / Arg | Type | Required | Default | Description |
|---|---|---|---|---|
<query> | string | Yes | none | Search term |
--limit <integer> | integer | No | 20 | JSON/text: 1-100 per page; table mode: max 5 |
--page <integer> | integer | No | 1 | Page number |
--language <en|zh> | string (en/zh) | No | en | Document language; other values silently fall back to en |
--view <integer> | integer | No | unset | View the 1-based index from the current results |
qwencloud docs view <path-or-url> to read the full content.
docs view
View page content by document path or URL.
| Arg | Type | Required | Default | Description |
|---|---|---|---|---|
<path-or-url> | string | Yes | none | Document path or URL |
Authentication, account, and workspace
Log in, check credential validity, or see which workspaces your account can access? Use these commands.
auth login
Log in and save credentials; interactive terminals prefer PKCE, non-interactive environments use Device Flow.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--init-only | boolean | No | false | Output authorization info and exit immediately |
--complete | boolean | No | false | Continue and complete a pending login session |
--timeout <seconds> | integer | No | 120 | Polling timeout in seconds for --complete |
--init-only/--complete, the command automatically returns in init-only mode. Credentials are preferentially stored in the system keychain, falling back to an encrypted file. You can also run qwencloud login directly.
After successful login, run qwencloud auth status --format json to check credentials, then qwencloud models list to verify query permissions.
auth status
Check local credentials and server-side verification status.
server_verified is false and may include a warning; exit code is 2 when not logged in or credentials have expired.
If authenticated is false, re-run qwencloud auth login.
auth logout
Log out and delete local credentials. You can also run qwencloud logout directly.
workspace list
List workspaces accessible to the current account.
qwencloud workspace limit to check whether the account can create more.
workspace limit
View used workspace count and account hard limit.
Usage, billing, and subscriptions
Want to know how much you've used this month, how much you've spent, which model or API Key costs the most, or how much subscription quota remains? Use these commands.Date options vary by command:
usage summary dates only affect PAYG, usage free-tier currently returns a snapshot only; other queries resolve in order: --from/--to > --days > --period > month-to-date. Common --period values include today, yesterday, week, month, last-month, quarter, year, and YYYY-MM.
usage summary
Summarize free quota, Coding Plan, Token Plan, and pay-as-you-go usage.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--from <date> | date | No | first day of current month | PAYG start date, YYYY-MM-DD |
--to <date> | date | No | today | PAYG end date, YYYY-MM-DD |
--period <preset> | string | No | month | PAYG preset range or YYYY-MM |
period only scope pay_as_you_go; free_tier, coding_plan, and token_plan are current snapshots at query time.
Full JSON structure example (sample values for field illustration only):
qwencloud usage breakdown --model <id>; for request-level details, use qwencloud usage logs.
usage breakdown
View pay-as-you-go usage for a specific model, broken down by day, month, or quarter.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--model <id> | string | Yes | none | Model ID; validated at runtime |
--granularity <g> | enum | No | day | day, month, quarter |
--from <date> | date | No | unset | Start date |
--to <date> | date | No | unset | End date |
--period <preset> | string | No | month | Preset range |
--days <number> | number | No | unset | Lookback days; pass a positive integer -- CLI does not strictly validate integer type |
usage free-tier
Browse current free quota status for all models.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--from <date> | date | No | unset | Registered; does not currently affect the returned quota snapshot |
--to <date> | date | No | unset | Registered; does not currently affect the returned quota snapshot |
--period <preset> | string | No | unset | Registered; does not currently affect the returned quota snapshot |
usage payg
Browse pay-as-you-go usage for all models.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--from <date> | date | No | unset | Start date |
--to <date> | date | No | unset | End date |
--period <preset> | string | No | month | Preset range |
--days <number> | number | No | unset | Lookback days; pass a positive integer -- CLI does not strictly validate integer type |
usage logs
Query call logs by time, model, status, or request ID.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--from <value> | date/time | No | 7 days ago 00:00 | YYYY-MM-DD or RFC3339 |
--to <value> | date/time | No | current time | YYYY-MM-DD or RFC3339 |
--period <preset> | string | No | unset | Supports Nh, Nd, and date presets |
--model <id> | repeatable string | No | unset | Model filter, repeatable |
--status <type> | repeatable string | No | unset | Supports 0/cancel, 2xx/success, 4xx/client-error, 5xx/server-error and aliases; unknown values are ignored |
--request-id <id> | string | No | unset | Exact request ID; when set, other filters are ignored |
--page <integer> | integer | No | 1 | Page number |
--page-size <integer> | integer | No | 20 | 1-100 per page |
billing summary
Summarize pre-tax, tax, and post-tax billing amounts by settlement month.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--from <yyyy-mm> | month | No | current month | Start settlement month |
--to <yyyy-mm> | month | No | current month | End settlement month, inclusive |
--charge-type <type> | enum | No | all | all, subscription, payg |
qwencloud billing breakdown --group-by model or --group-by api-key.
billing breakdown
Break down spending by model or API Key.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--granularity <g> | enum | No | month | day or month |
--group-by <dim> | enum | No | model | model or api-key |
--from <date> | date/month | No | current month | day uses YYYY-MM-DD; month accepts YYYY-MM |
--to <date> | date/month | No | current month | End date or month |
--period <preset> | string | No | unset | Preset range; periods shorter than 31 days may auto-adopt day |
--charge-type <type> | enum | No | all | all, subscription, payg |
--top <integer> | integer | No | 10 | Return top N items, max 100 |
billing limit
View spending cap and alert configuration.
billing payment-method bind
Open the payment method management page to bind or manage payment methods.
--format json explicitly.
billing payment-method list
List payment methods bound to the account.
qwencloud billing payment-method bind.
subscription status
Summarize Token Plan and Coding Plan subscription status.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--plan <kind> | string | No | all supported plans | Accepts token, coding; other values are treated as unset without error |
qwencloud subscription tokenplan seats --format json to view seat instances.
subscription orders
List subscription purchase, renewal, and upgrade orders.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--from <date> | date | No | unset | Start date, YYYY-MM-DD |
--to <date> | date | No | unset | End date, YYYY-MM-DD |
--type <kind> | string | No | unset | Accepts purchase, renew, upgrade; other values are treated as unset without error |
--page <integer> | integer | No | 1 | Page number |
--page-size <integer> | integer | No | 20 | 1-100 per page |
subscription tokenplan status
View Token Plan seat type, cycle, renewal status, and diagnostic info.
subscription tokenplan seats
List Token Plan seat instances with pagination.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--spec-type <type> | enum | No | unset | pro or standard |
--page <integer> | integer | No | 1 | Page number |
--page-size <integer> | integer | No | 20 | Max 100 per page |
--format json explicitly.
Configuration, diagnostics, and completion
Want to lock machine-readable output, troubleshoot the local environment, enable shell completion, or confirm the version? Use these commands.
config list
List user-configurable keys; in 1.3.0, the only public key is output.format.
config get
Read a configuration value.
config set
Set a configuration value.
output.format accepts auto, table, json, text.
After setting, run qwencloud config get output.format to confirm.
config unset
Delete a configuration value and restore default behavior.
doctor
Check version, authentication, token, network, shell completion, and global configuration.
qwencloud doctor until all failures are resolved.
completion install
Install command completion for the current or specified shell.
completion generate
Output the completion script for the current or specified shell.
--shell is omitted, the shell is auto-detected. Supported: bash, zsh, fish.
version
Output version; --check also checks for new versions.
Support and updates
Submit and track issues, close or rate tickets, or check for CLI updates? Choose your action here.
support list
List support tickets with pagination.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--page <integer> | integer | No | 1 | Page number |
--page-size <integer> | integer | No | 10 | 1-10 per page |
support view
View ticket details and message history.
support create
Create a ticket interactively, or non-interactively with paired parameters.
| Flag | Type | Required | Default | Description |
|---|---|---|---|---|
--list-categories | boolean | No | false | List categories and exit |
--category-id <id> | string | conditional (non-interactive) | none | Must be provided with --description |
--description <text> | string | conditional (non-interactive) | none | Max 2000 characters, truncated if exceeded |
qwencloud support view <ticket-id> to track progress.
support reply
Reply to a ticket; non-interactive environments must provide the message body.
| Flag / Arg | Type | Required | Default | Description |
|---|---|---|---|---|
<ticket-id> | string | Yes | none | Ticket ID |
--message <text> | string | required (non-interactive) | none | Max 2000 characters, truncated if exceeded |
support close
Close a ticket; scripts should use --yes to skip confirmation.
| Flag / Arg | Type | Required | Default | Description |
|---|---|---|---|---|
<ticket-id> | string | Yes | none | Ticket ID |
--yes | boolean | No | false | Skip confirmation; non-TTY without this flag treats as cancel |
support rate
Rate a resolved ticket; rating range is 1-5.
| Flag / Arg | Type | Required | Default | Description |
|---|---|---|---|---|
<ticket-id> | string | Yes | none | Ticket ID |
--rating <n> | integer | required (non-interactive) | none | 1-5 stars |
--comment <text> | string | No | unset | Max 500 characters, truncated if exceeded |
update
Check version and output upgrade prompt; does not install directly.
Global conventions
| Global Flag | Type | Default | Description |
|---|---|---|---|
--format <fmt> | enum | auto | Explicit format takes priority over config output.format |
-q, --quiet | boolean | false | Suppress stdout/stderr; result conveyed via exit code only |
-v, --version | boolean | false | Top-level version shortcut |
-h, --help | boolean | false | Top-level and per-command help |
auto uses table in TTY, JSON in pipe/redirect; non-TTY explicit table request degrades to text with stderr warning. Success data goes to stdout, errors and diagnostics go to stderr. JSON preserves per-command and server-side fields with no unified envelope; the error object exit code field is exitCode.
In paginated queries, JSON typically preserves the requested page and returns an empty array for out-of-bounds; interactive tables typically adjust to a valid page. Agents should always specify --format json, page number, and page size explicitly.
| Exit Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error; Commander argument parse errors also use 1 |
| 2 | Authentication failure |
| 3 | Network error |
| 4 | Parameter or configuration error |
| 8 | Reserved for incomplete operations |
| 10 | docs view document not found |
| 130 | User interrupt |
code field in the JSON error object.
Appendix
Command cheat sheet
| Command | Purpose |
|---|---|
qwencloud auth login | Obtain and save management credentials |
qwencloud auth logout | Delete local credentials and log out |
qwencloud auth status | Check credential and server verification status |
qwencloud models list | Filter available models |
qwencloud models info | View full details for a single model |
qwencloud models search | Find models by keyword or modality |
qwencloud usage summary | Summarize usage across billing methods |
qwencloud usage breakdown | Break down usage for a specific model |
qwencloud usage free-tier | Check free quota balance |
qwencloud usage payg | View pay-as-you-go usage and cost |
qwencloud usage logs | Query call logs by request or status |
qwencloud config list | View public configuration keys |
qwencloud config get | Read a single configuration value |
qwencloud config set | Set default output format |
qwencloud config unset | Restore configuration defaults |
qwencloud doctor | Diagnose version, auth, or network issues |
qwencloud completion install | Enable shell completion |
qwencloud completion generate | Export shell completion script |
qwencloud version | View version and check for updates |
qwencloud update | Get upgrade prompt |
qwencloud docs search | Search official docs by keyword |
qwencloud docs view | Open document content |
qwencloud workspace list | List accessible workspaces |
qwencloud workspace limit | Check workspace count limit |
qwencloud billing summary | View monthly settlement totals with tax |
qwencloud billing breakdown | Break down costs by model or API Key |
qwencloud billing limit | Check spending cap and alerts |
qwencloud billing payment-method bind | Open payment method management page |
qwencloud billing payment-method list | View bound payment methods |
qwencloud subscription status | Confirm Token/Coding Plan status |
qwencloud subscription orders | View purchase, renewal, and upgrade orders |
qwencloud subscription tokenplan status | View cycle and renewal status |
qwencloud subscription tokenplan seats | Browse seat instances with pagination |
qwencloud support list | List tickets with pagination |
qwencloud support view | View ticket and message history |
qwencloud support create | Submit a new ticket |
qwencloud support reply | Add a message to a ticket |
qwencloud support close | Close a ticket |
qwencloud support rate | Rate a resolved ticket |