TUI Mode
Runqodercli
from any project root to enter the default TUI (interactive) mode. You can chat with the CLI by text or execute special functions via slash commands.
Input modes
Multiple input modes are available in the TUI:Command | Description |
---|---|
> | Dialog mode (default). Type any text to chat with the CLI. |
! | Bash mode. From dialog mode, enter ! to run shell commands directly. |
/ | Slash mode. From dialog mode, type / to open and run built-in commands. |
# | Memory mode. From dialog mode, type # to append content to the AGENTS.md memory file. |
\ ⏎ | Enter to start multiline input. |
Built-in tools
Qoder CLI ships with tools like Grep, Read, Write, and Bash for file/directory operations and shell command execution.Slash commands
Quickly access features and settings with these built-in slash commands:Command | Description |
---|---|
/login | Log in to your Qoder account |
/help | Show TUI help |
/init | Initialize or update the AGENTS.md memory file in the project |
/memory | Edit the AGENTS.md memory file |
/quest | Spec-driven delegated task |
/review | Code review for local changes |
/resume | List and resume sessions |
/clear | Clear the current session context history |
/compact | Summarize the current session’s context history |
/usage | Show your current credit usage |
/status | Show CLI status: version, model, account, API connectivity, tool status, etc. |
/config | Show system configuration of Qoder CLI |
/agents | Subagent commands: list, create, manage subagents |
/bashes | List running background Bash jobs (started by the Bash tool) |
/release-notes | Show Qoder CLI release notes |
/vim | Open an external editor to edit input |
/feedback | Send feedback about Qoder CLI |
/quit | Exit TUI |
/logout | Log out of your Qoder account |
Advanced startup options
When launching the CLI, use the following options to control its behavior:Command | Description | Example |
---|---|---|
-w | Specify the workspace directory | qodercli -w /Users/demo/projects/nacos |
-c | Continue the last session | qodercli -c |
-r | Resume a specific session | qodercli -r *******-c09a-40a9-82a7-a565413fa39 |
--allowed-tools | Allow only specified tools | qodercli --allowed-tools=READ,WRITE |
--disallowed-tools | Disallow specified tools | qodercli --disallowed-tools=READ,WRITE |
--max-turns | Maximum dialog turns | qodercli --max-turns=10 |
--yolo | Skip permission checks | qodercli --yolo |
Print Mode
Print mode is non-interactive. Runqodercli --print
to enter. Output is printed according to --output-format
.
Flags
Global options can be used with any command:Option | Description | Example |
---|---|---|
-p | Run the Agent non-interactively | qodercli -q -p hi |
--output-format | Output format: text, json, stream-json | qodercli --output-format=json |
-w | Specify the workspace directory | qodercli -w /Users/qoder_user/projects/qoder_demo |
-c | Continue the last session | qodercli -c |
-r | Resume a specific session | qodercli -r ********-c09a-40a9-82a7-a565413fa393 |
--allowed-tools | Allow only specified tools | qodercli --allowed-tools=READ,WRITE |
--disallowed-tools | Disallow specified tools | qodercli --disallowed-tools=READ,WRITE |
--max-turns | Maximum dialog turns | qodercli --max-turns=10 |
--yolo | Skip permission checks | qodercli --yolo |
MCP servsers
The Qoder CLI integrates with any standard MCP tool. Simply add the tool’s MCP server to get started. For example, to enable browser control with Playwright, run the following command:Manage MCP servers
- Use
-t
to set MCP server type: stdio, sse, streamable-http. Stdio servers auto-start with TUI. - Use
-s
to set scope: user-level or project-level. Configure MCP servers per project if needed. - Manage added MCP servers using the following commands:
Files of MCP servers
MCP servers added will be saved in the following files of your project.Recommended tools
- qodercli mcp add context7
-- npx -y @upstash/context7-mcp@latest
- qodercli mcp add deepwiki
-- npx -y mcp-deepwiki@latest
- qodercli mcp add chrome-devtools
-- npx chrome-devtools-mcp@latest
Permissions
Qoder CLI enforces precise tool execution permissions. Configure in these files (higher precedence later):Configuration
Qoder CLI offers permission control through three core strategies: Allow, Deny, and Ask. These can be combined with tool-specific rules for fine-grained access management per project or user. By default, the CLI operates with a secure ‘Ask’ policy for file access outside the selected project directory, while automatically creating standard read/write rules within it on startup. All policies are fully customizable to fit your workflow.Types
- Read & Edit Read rules apply to all file-reading tools such as Grep, Glob, and LS. Patterns follow gitignore-style matching. Supported pattern forms include:
Pattern | Description | Example | Matches |
---|---|---|---|
/path | Absolute path from system root | Read(/Users/qoder_user/demo/**)) | /Users/qoder_user/demo/xx |
~/path | Path from the home directory | Read(~/Documents/xx.png) | /Users/qoder_user/Documents/xx.png |
path or ./path | Relative to current directory | Read(xx.java) | ./xx.java |
- WebFetch Restrict domains for network fetch tools.
WebFetch(domain:example.com)
restricts fetches to example.com.
- Bash Restrict commands for shell execution tools.
Bash(npm run build)
matches the exact command npm run buildBash(npm run test:*)
matches commands starting with npm run testBash(curl http://site.com/:*)
matches curl commands starting with curl http://site.com/
Worktree
Worktree jobs are concurrent jobs started with--worktree
. You can create multiple Git worktrees for one repository to run jobs in parallel, avoiding read/write conflicts between processes.
Requirements: Ensure git is installed and usable locally.
Commands | Description |
---|---|
qodercli --worktree "job description | Create and start a new worktree job |
qodercli jobs --worktree | List existing worktree jobs |
qodercli rm | Remove a job (delete the worktree) |
Create a job
From the repo root:qodercli --worktree "Your job description"
- Add
-p
to run non-interactively inside the container; stop the container after it finishes. - Add
--branch
to set the code branch for the job. - Other Agent options (e.g.,
--max-turns
) are passed through to the CLI inside the container. After the job is created, TUI mode is entered by default. You can start multiple jobs in separate terminals; worktrees isolate jobs from each other.
View jobs
Using command$ qodercli jobs --worktree
to show concurrent jobs of the current code repository.
- ID: Unique job ID (not the container ID)
- INIT PROMPT: Initial job description (will become an AI-generated title in future)
- PATH: git worktree directory
- STATUS: Same as container status
- CREATED: job creation time
Delete jobs
Delete a job (deletes the worktree) via rm:Note: Deletion is irreversible. Proceed with caution.
Memory
Qoder CLI usesAGENTS.md
as a memory file, the content of which is auto-loaded into CLI as context to guide development. Typical content:
- Development standards and notes
- Overall system architecture
- …
Automatically generate
Start TUI in the target project and enter/init
to generate AGENTS.md
in the project directory.
Manually manage
- Create
AGENTS.md
in the project and edit its content. - In TUI, type
#
to enter memory edit mode and use vim-style editing for the project memory file. - In TUI, enter
/memory
to choose and edit user- or project-level memory files.
Subagent
Subagents are specialized AI agents for specific tasks. Each subagent has its own context window and tool permissions, and can be guided via a custom system prompt. Proper use improves handling of complex tasks.Manually create
Firstly, just create a markdown file in:~/.qoder/agents/<agentName>.md
: User-level, applies to all projects${project}/agents/<agentName>.md
: Project-level, applies to the current project
Automatically create
In TUI, enter/agents
. Press Tab to select User or Project, then choose Create new agent and type what you want to automatically the subagent.
Use subagent
In TUI mode, use command/agent
to view subagents. You can explicitly or implicitly invoke subagents to achieve tasks. For example:
Commands
Commands extend slash functionality via.md
files. Define common prompts as commands to trigger tasks in TUI.
Create a command
Store command definitions in:~/.qoder/commands/.md
: User-level, applies to all projects${project}/commands/.md
: Project-level, applies to the current project
Example
Define a command as follows and store it in~/.qoder/commands/quest.md
.
Use commands
In TUI, enter/quest
to run the command. It will invoke the two subagents in sequence per prompt.
Hooks
Qoder CLI provides hooks at key execution stages to integrate with external systems (notifications, tools, etc.).Configuration
Define hooks in:~/.qoder/settings.json
: User-level, applies to all projects${project}/.qoder/settings.json
: Project-level, applies to the current project${project}/.qoder/settings.local.json
: Project-level, highest precedence (usually added to .gitignore)
.qoder/settings.json
:
~/notification.sh
and add the following content to get configurations writen via CLI.
Currently, Qoder CLI supports Notification hooks only. Different hook stages can intervene in the Agent’s main execution flow and remain decoupled from the CLI. More hook types (e.g., tool invocation, session intervention) are planned to broaden integration scenarios.