All startup flags for the qodercn command, with defaults and usage examples
This page lists all startup flags of the
With no arguments, an interactive session starts. Passing prompt text or
Beyond the startup flags,
qodercn command. Use qodercn --help to see the full list in your terminal.
Basic invocation:
--print enters non-interactive mode.
General flags
| Flag | Short | Type | Description |
|---|---|---|---|
--version | -v | boolean | Print the version number and exit. |
--help | -h | boolean | Show help and exit. |
--debug | -d | boolean | Enable debug log output. |
--cwd | -w | string | Specify the working directory (defaults to the current directory). |
--config-dir | string | Override the user config directory (default ~/.qoder-cn). | |
--add-dir | string[] | Add extra trusted directories for the current session (repeatable). | |
--attachment | string | Attach a file to the initial prompt (repeatable). | |
--worktree | [name] | Run isolated in a new Git worktree, with results merged back to the main branch; the name is optional and auto-generated when omitted. |
Model and reasoning
| Flag | Short | Type | Description |
|---|---|---|---|
--model | -m | string | Specify the model identifier (such as auto, or a model name from the New tab like Qwen3.8-Max; use the modelID for BYOK). |
--reasoning-effort | string | Override the reasoning effort for this session (such as high). | |
--context-window | number | Override the context window size for this session (in tokens). | |
--list-models | boolean | List available models and exit. | |
--output-style | string | The name of the active output style. |
Session management
| Flag | Short | Type | Description |
|---|---|---|---|
--continue | -c | boolean | Continue the most recent session. |
--resume | -r | [id] | Resume a previous session by identifier; without an id, pick from a list. |
--session-id | string | Continue the session with the given ID. | |
--fork-session | boolean | Fork a new session from a resumed one (with --resume/--session-id). | |
--name | -n | string | Set or override the current session name. |
--list-sessions | boolean | List all historical sessions and exit. | |
--delete-session | <index> | Delete a session by its index number. |
Conflict rule:--continue,--resume,--remote,--remote-session,--teleport, and--remote-controlcannot be used together.
Output and scripting modes
| Flag | Short | Type | Description |
|---|---|---|---|
--print | -p | boolean | Non-interactive mode: print one response and exit (for CI/scripts). |
--output-format | -o | enum | Output format: text (default), json, stream-json. |
--input-format | enum | Input format: text (default), stream-json. | |
--max-turns | number | Limit the maximum conversation turns per query (prevents infinite loops in automation). | |
--max-output-tokens | number | Set the model's maximum tokens per output. | |
--prompt-interactive | -i | string | Execute the given prompt first, then enter interactive mode. |
--no-session-persistence | boolean | Do not write the session to disk; it cannot be resumed (only works with --print). |
Permission control
| Flag | Short | Type | Description |
|---|---|---|---|
--permission-mode | enum | Set the permission mode: default / plan / auto / bypass_permissions / accept_edits / dont_ask. | |
--yolo | boolean | Equivalent to --permission-mode bypass_permissions (dangerous: skips all permission confirmations). | |
--dangerously-skip-permissions | boolean | Same as --permission-mode bypass_permissions (dangerous: skips all permission confirmations). |
Tools and MCP
| Flag | Short | Type | Description |
|---|---|---|---|
--tools | string[] | Restrict available built-in tools; space- or comma-separated ("" disables all, default enables all; use -p or -- to separate from the query). | |
--allowed-tools | string[] | Allowlist of tools that may be used. | |
--disallowed-tools | string[] | Denylist of tools that may not be used. | |
--mcp-config | string | Path to an MCP configuration file (JSON). | |
--strict-mcp-config | boolean | Strict mode: load only the MCP servers specified by --mcp-config. | |
--allowed-mcp-server-names | string[] | Allowlist of MCP server names. | |
--max-model-request-retries | number | Maximum retries for Qoder and external-provider model requests. |
Sandbox
| Flag | Short | Type | Description |
|---|---|---|---|
--sandbox | -s | boolean | Enable the sandbox (a boolean switch; does not accept a backend name). The backend is decided by QODERCN_SANDBOX or tools.sandbox. |
Agent and system prompt
| Flag | Short | Type | Description |
|---|---|---|---|
--agent | string | Specify the Agent used by the main thread. | |
--agents | json | Define custom Agents as a JSON object. | |
--system-prompt | string | Override the system prompt. | |
--append-system-prompt | string | Append content after the default system prompt. |
Configuration overrides
| Flag | Short | Type | Description |
|---|---|---|---|
--settings | string | A JSON file path or inline JSON object (parsed inline when starting with {), applied as the highest-precedence configuration. | |
--setting-sources | string[] | Specify the list of setting sources to load. | |
--plugin-dir | string | Additional plugin search directory. |
Remote and collaboration
| Flag | Short | Type | Description |
|---|---|---|---|
--remote | [task] | Create a cloud remote session and print its access URL (optionally with an initial task). | |
--remote-session | <id> | Cold-load and attach to an existing remote session. | |
--teleport | <id> | Load and attach to a remote session. | |
--remote-control | <id> | Run as a headless remote-control worker. |
Editor integration
| Flag | Short | Type | Description |
|---|---|---|---|
--acp | boolean | Start as an ACP server for clients implementing the ACP protocol (such as Zed) to integrate over standard input/output. |
Subcommands
Beyond the startup flags, qodercn also provides several subcommands of the form qodercn <subcommand>:
| Subcommand | Description |
|---|---|
mcp | Configure and manage MCP servers. |
plugins (alias plugin) | Manage plugins. |
skills (alias skill) | Manage Agent Skills. |
hooks (alias hook) | Manage Hooks. |
agents (alias agent) | Manage Agents. |
login | Sign in to your account. |
commit | Generate a commit message and commit changes. |
rollback | Roll back to a previous version. |
update | Update to the latest version. |
remote-control | Start the remote-control daemon. |
status | Show session status. |
security | Scan source code for security issues (see Security Scanning). |
feedback | Submit feedback. |
config | View and modify CLI configuration (CN-exclusive, includes the vpc_endpoint setting). |
Usage examples
Next steps
- Slash commands in interactive mode: Slash Commands.
- Settings files and environment variables: Settings, Environment Variables, and File Paths.
- The detailed guide to non-interactive execution: Run in Scripts.