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 servers
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:Copy
Ask AI
Manage MCP servers
- Use
-tto set MCP server type: stdio, sse, streamable-http. Stdio servers auto-start with TUI. - Use
-sto set scope: user-level or project-level. Configure MCP servers per project if needed. - Manage added MCP servers using the following commands:
Copy
Ask AI
Files of the MCP servers
MCP servers added will be saved in the following files of your project.Copy
Ask AI
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):Copy
Ask AI
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.Copy
Ask AI
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 the 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 the 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
-pto run non-interactively inside the container; stop the container after it finishes. - Add
--branchto 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.
Copy
Ask AI
- 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:Copy
Ask AI
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
- …
Copy
Ask AI
Automatically generate
Start TUI in the target project and enter/init to generate AGENTS.md in the project directory.
Manually manage
- Create
AGENTS.mdin 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
/memoryto 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
Copy
Ask AI
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 create the subagent.
Use subagent
In TUI mode, use the command/agent to view subagents. You can explicitly or implicitly invoke subagents to achieve tasks. For example:
Copy
Ask AI
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.
Copy
Ask AI
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 :
Copy
Ask AI
~/notification.sh and add the following content to get configurations writen via CLI.
Copy
Ask AI
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.