Skip to main content
Reference

CLI Commands and Parameters

Complete reference for all qodercli command-line startup parameters, flags, default values, and usage examples.

This page lists all startup parameters and flags for the qodercli command. Use qodercli --help in the terminal to view the complete list. Basic invocation:
qodercli [options] [prompt text]
When no arguments are passed, it enters an interactive session. Passing a text prompt or --print switches to Non-Interactive Mode.

General Flags

FlagShortTypeDescription
--version-vbooleanPrint the version number and exit.
--help-hbooleanDisplay help information and exit.
--debug-dbooleanEnable debug log output.
--cwd-wstringSpecify the Working Directory (defaults to the current directory).
--config-dirstringOverride the User Configuration Directory (default ~/.qoder).
--add-dirstring[]Add Additional trusted directories for the current session (can be used multiple times).
--attachmentstringAttach files to the initial prompt (can be used multiple times).
--worktree[name]Execute in isolation within a new Git Worktree, merging results back to the main branch; the name is optional and auto-generated if omitted.

Models and Reasoning

FlagShortTypeDescription
--model-mstringSpecify the Model Identifier (e.g., auto, lite, performance, or a BYOK key).
--reasoning-effortstringOverride the reasoning effort for this session (e.g., high).
--context-windownumberOverride the Context Window size (in tokens) for this session.
--list-modelsbooleanList available models and exit.
--output-stylestringName of the active Output Style.

Session Management

FlagShortTypeDescription
--continue-cbooleanResume the most recent session.
--resume-r[id]Restore a Historical session by identifier; if no ID is provided, select from a list.
--session-idstringResume the session with the specified ID.
--fork-sessionbooleanFork a new session from a restored session (use with --resume/--session-id).
--name-nstringSet or override the current session name.
--list-sessionsbooleanList all historical sessions and exit.
--delete-session<index>Delete a specific session by its index number.
Conflict Rules: --continue, --resume, --remote, --remote-session, --teleport, and --remote-control cannot be used simultaneously.

Output and Script Mode

FlagShortTypeDescription
--print-pbooleanNon-Interactive Mode: output a single response and exit (ideal for CI/scripts).
--output-format-oenumOutput format: text (default), json, stream-json.
--input-formatenumInput format: text (default), stream-json.
--max-turnsnumberLimit the maximum Conversation Turns per query (used in automation scenarios to prevent infinite loops).
--max-output-tokensnumberSet the maximum number of tokens for a single model output.
--prompt-interactive-istringExecute the given prompt first, then enter interactive mode.
--no-session-persistencebooleanDo not write the session to disk; it cannot be restored (only valid under --print).

Permission Control

FlagShortTypeDescription
--permission-modeenumSet the Permission Mode: default / plan / auto / bypass_permissions / accept_edits / dont_ask.
--yolobooleanEquivalent to --permission-mode bypass_permissions (dangerous: skips all permission confirmations).
--dangerously-skip-permissionsbooleanSame as --permission-mode bypass_permissions (dangerous: skips all permission confirmations).

Tools and MCP

FlagShortTypeDescription
--toolsstring[]Restrict available Built-in tools, separated by spaces or commas ("" disables all, default enables all; use -p or -- to separate from the query).
--allowed-toolsstring[]Allowlist of tools permitted for use.
--disallowed-toolsstring[]Blocklist of tools prohibited from use.
--mcp-configstringPath to the MCP configuration file (JSON).
--strict-mcp-configbooleanStrict mode: only load MCP servers specified by --mcp-config.
--allowed-mcp-server-namesstring[]Allowlist of permitted MCP server names.
--max-model-request-retriesnumberMaximum number of retries for Qoder and external provider model requests.

Sandbox

FlagShortTypeDescription
--sandbox-sbooleanEnable the Sandbox (boolean switch, does not accept backend names). The backend is specified by QODER_SANDBOX or tools.sandbox, see Sandbox.

Agent and System Prompt

FlagShortTypeDescription
--agentstringSpecify the Agent name used by the main thread.
--agentsjsonDefine a custom Agent using a JSON object.
--system-promptstringOverride the System Prompt.
--append-system-promptstringAppend content after the default System Prompt.

Configuration Overrides

FlagShortTypeDescription
--settingsstringPath to a JSON file or an inline JSON object (parsed as inline if it starts with {), serving as the highest priority configuration.
--setting-sourcesstring[]Specify the list of configuration sources to load.
--plugin-dirstringAdditional plugin search directory.

Remote and Collaboration

FlagShortTypeDescription
--remote[task]Create a cloud remote session and print the access URL (optionally with an initial task).
--remote-session<id>Cold load and connect to an existing remote session.
--teleport<id>Load and connect to a remote session.
--remote-control<id>Run as a headless remote-control worker.

Editor Integration

FlagShortTypeDescription
--acpbooleanStart as an ACP server for integration via standard input/output by clients implementing the ACP protocol, such as Zed.

Subcommands

In addition to startup parameters, qodercli also provides several subcommands in the form of qodercli <subcommand>:
SubcommandDescription
mcpConfigure 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.
loginSign in to your account.
commitGenerate a commit message and commit changes.
rollbackRoll back to a previous version.
updateUpdate to the latest version.
remote-controlStart the remote-control daemon.
statusDisplay session status.
feedbackSubmit feedback.
wikiGenerate Wiki documentation for the project.

Usage Examples

# Start in interactive mode
qodercli

# Specify model
qodercli -m performance

# Non-interactive one-shot execution
qodercli -p "Explain what this code does"

# JSON output for script consumption
qodercli -p -o json "List project dependencies"

# Resume last session
qodercli -c

# Execute in an isolated worktree
qodercli --worktree "Refactor the database layer"

# Fully automated mode + sandbox
qodercli --permission-mode auto -s docker "Run tests and fix failures"

Next Steps