TUI mode
Run qodercli in any project root directory to enter the default TUI (interactive) mode. You can converse with the CLI via text or execute specific functions using slash commands.
Input Modes
The TUI provides multiple input modes:
| Command | Description |
|---|---|
> | Dialog mode (default). Enter any text to converse with the CLI |
! | Bash Mode. Enter ! in dialog mode to directly run shell commands |
/ | Slash mode. Enter / in dialog mode to open and run built-in commands |
\ ⏎ | Press Enter to start multiline input |
Built-in Tools
Qoder CLI includes built-in tools such as Grep, Read, Write, and Bash for file/directory operations and shell command execution.
For details on tool capabilities and control methods, see Tools.
Slash commands
Quickly access features and settings using the following built-in slash commands:
| Command | Description |
|---|---|
/login | Sign in to your Qoder account |
/help | Display TUI help |
/init | Initialize or update the AGENTS.md memory file in the project |
/memory | Open Memory Overview to manage user-level, project-level, and local memory, as well as Auto-Memory entries |
/quest | Intelligent workflow orchestrator that guides you through feature development step-by-step using dedicated subagents |
/review | Review local code changes |
/resume | View and restore sessions |
/clear | Clear the historical context of the current session |
/compact | Summarize the historical context of the current session |
/usage | Display current Credits usage |
/status | View CLI status, including version, model, account, API Connectivity, tool status, etc. |
/config | View Qoder CLI system configuration |
/effort | Adjust the thinking depth and related Model Parameters for the current model |
/agents | Subagent commands: view, create, and manage subagents |
/tasks | View currently running background tasks |
/release-notes | Display the Qoder CLI changelog |
/vim | Toggle Vim edit mode |
/feedback | Send feedback related to Qoder CLI |
/quit | Exit the TUI |
/logout | Sign out of your Qoder account |
Advanced Startup Options
When starting the CLI, you can use the following options to control its behavior:
| Command | Description | Example |
|---|---|---|
-w | Specify the working directory | qodercli -w /Users/demo/projects/nacos |
-c | Resume the last session | qodercli -c |
-r | Restore a specific session | qodercli -r *******-c09a-40a9-82a7-a565413fa39 |
--allowed-tools | Allow only specified tools | qodercli --allowed-tools=Read,Write |
--disallowed-tools | Deny specified tools | qodercli --disallowed-tools=Read,Write |
--tools | Restrict available built-in tools ("" to disable all, default to enable all) | qodercli --tools=Read,Edit -p "Fix login" |
--max-turns | Maximum conversation turns | qodercli --max-turns=10 |
--worktree [name] | Start in an isolated git worktree | qodercli --worktree feature-a |
--yolo | Skip permission checks | qodercli --yolo |
Print mode
Print mode is a non-interactive mode. Run qodercli --print to enter it, and the output will be printed in the format specified by the --output-format parameter.
Parameters
Global parameters can be used with any command:
| Parameter | Description | Example |
|---|---|---|
-p | Run the agent non-interactively | qodercli -p hi |
-o, --output-format | Output format: text, JSON, stream-json | qodercli --output-format=json |
-w | Specify the working directory | qodercli -w /Users/qoder_user/projects/qoder_demo |
-c | Resume the last session | qodercli -c |
-r | Restore a specific session | qodercli -r ********-c09a-40a9-82a7-a565413fa393 |
--allowed-tools | Allow only specified tools | qodercli --allowed-tools=Read,Write |
--disallowed-tools | Deny specified tools | qodercli --disallowed-tools=Read,Write |
--max-turns | Maximum conversation turns | qodercli --max-turns=10 |
--worktree [name] | Start in an isolated git worktree | qodercli --worktree feature-a -p "Fix login" |
--yolo | Skip permission checks | qodercli --yolo |
Shell command prefix
QODER_SHELL_PREFIX before starting Qoder CLI to route supported local shell commands through an executable wrapper.
macOS and Linux
$1 in a POSIX wrapper). It must re-evaluate that argument with a POSIX-compatible shell rather than treat the entire argument as an executable path. Using exec as shown above preserves stdin, stdout, stderr, the exit status, and signals. On Windows, the wrapper must pass its first argument to Git Bash as bash.exe -c <argument> and preserve the same process behavior; PowerShell and cmd.exe do not parse this quoted command format correctly.
Use a single executable path as the variable value; do not append shell arguments. For consistent behavior across all prefixed entry points, the executable path must not contain a space followed by a hyphen ( -), which the POSIX shell prefix parser reserves.
The prefix applies to Bash mode (!), the Bash tool, bash-compatible shell-form command hooks and custom status line commands, and stdio MCP servers. It does not apply to exec-form hooks, PowerShell hooks or status line commands, URL-based MCP transports, or interactive PTY commands. If Qoder CLI inherits a shell prefix from its startup environment, set QODER_SHELL_PREFIX explicitly to an empty value to disable it. Existing permission, trust, and sandbox checks still apply.
Worktree
Using --worktree [name] allows you to start a Qoder CLI session in an isolated git worktree. This is ideal for handling multiple tasks in parallel within the same repository, preventing multiple sessions from sharing the same working directory or altering the main checkout.
Requirement: Run this command in a Git repository and ensure Git is installed locally.
Starting in a worktree
/. Names containing / will be converted to + in both directory and branch names.
When creating a new named worktree, Qoder CLI places it under <repo>/.qoder/worktrees/<flattened-name> and creates a temporary branch named worktree-<flattened-name>. If a worktree with the same name already exists, Qoder CLI reuses that directory directly instead of creating a new one.
The new worktree is preferably created based on the default branch reference pointed to by the local origin/HEAD. If origin/HEAD is not configured, Qoder CLI will use origin/main if it can be resolved or fetched; otherwise, it falls back to the current HEAD. If you must start from the latest remote commit, execute git fetch origin first.
Copying Local Files
A new worktree is a clean checkout and does not include untracked files like .env by default. To copy local files to the new worktree, add .worktreeinclude in the repository root:
.worktreeinclude and are already ignored by Git will be copied. The local project-level setting .qoder/settings.local.json is automatically copied if it exists.
Resuming and Cleaning Up
When the session ends, Qoder CLI prints the worktree path and the command to resume the session:
worktree-<flattened-name> branch is no longer needed, you can delete it separately:
Using worktrees in a session
In an existing session, you can also ask Qoder CLI to handle tasks in an isolated worktree. It will create and enter a worktree for the current session; when you need to leave, you can ask it to exit the worktree and restore the original working directory.
Subagents can also use worktree isolation. When a Markdown Subagent needs to modify files in an isolated checkout, add isolation: worktree to its definition. A clean subagent worktree is deleted after the subagent finishes; worktrees with changes are retained. See Subagent for configuration details.
For worktrees created during a session and subagents with worktree isolation enabled, the WorktreeCreate hook can provide a custom worktree path. See Hooks for the accompanying WorktreeRemove cleanup behavior. The --worktree startup argument itself requires usage within a Git repository and uses Git to create the worktree.
If you need full manual control over directories and branches, you can directly use Git to create a worktree and then start Qoder CLI in that directory:
Memory
Qoder CLI retains context across sessions using AGENTS.md files and optional Auto-Memory. Commonly used files include the user-level ~/.qoder/AGENTS.md, project-level ${project}/AGENTS.md, and local project-level ${project}/AGENTS.local.md.
Automatic Generation
Start the TUI in the target project and enter /init to generate AGENTS.md in the project directory.
Manual Management
- Create
AGENTS.mdin the project and edit its contents. - Enter
/memoryin the TUI to manage user-level, project-level, and local memory files. - When Auto-Memory is enabled, you can open the auto-memory folder in the
/memorypanel, or enter/memory manageto manage automatically saved memory files.