Skip to main content

TUI Mode

Run qodercli 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:
CommandDescription
>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:
CommandDescription
/loginLog in to your Qoder account
/helpShow TUI help
/initInitialize or update the AGENTS.md memory file in the project
/memoryEdit the AGENTS.md memory file
/questSpec-driven delegated task
/reviewCode review for local changes
/resumeList and resume sessions
/clearClear the current session context history
/compactSummarize the current session’s context history
/usageShow your current credit usage
/statusShow CLI status: version, model, account, API connectivity, tool status, etc.
/configShow system configuration of Qoder CLI
/agentsSubagent commands: list, create, manage subagents
/bashesList running background Bash jobs (started by the Bash tool)
/release-notesShow Qoder CLI release notes
/vimOpen an external editor to edit input
/feedbackSend feedback about Qoder CLI
/quitExit TUI
/logoutLog out of your Qoder account

Advanced startup options

When launching the CLI, use the following options to control its behavior:
CommandDescriptionExample
-wSpecify the workspace directoryqodercli -w /Users/demo/projects/nacos
-cContinue the last sessionqodercli -c
-rResume a specific sessionqodercli -r *******-c09a-40a9-82a7-a565413fa39
--allowed-toolsAllow only specified toolsqodercli --allowed-tools=READ,WRITE
--disallowed-toolsDisallow specified toolsqodercli --disallowed-tools=READ,WRITE
--max-turnsMaximum dialog turnsqodercli --max-turns=10
--yoloSkip permission checksqodercli --yolo

Print Mode

Print mode is non-interactive. Run qodercli --print to enter. Output is printed according to --output-format.

Flags

Global options can be used with any command:
OptionDescriptionExample
-pRun the Agent non-interactivelyqodercli -q -p hi
--output-formatOutput format: text, json, stream-jsonqodercli --output-format=json
-wSpecify the workspace directoryqodercli -w /Users/qoder_user/projects/qoder_demo
-cContinue the last sessionqodercli -c
-rResume a specific sessionqodercli -r ********-c09a-40a9-82a7-a565413fa393
--allowed-toolsAllow only specified toolsqodercli --allowed-tools=READ,WRITE
--disallowed-toolsDisallow specified toolsqodercli --disallowed-tools=READ,WRITE
--max-turnsMaximum dialog turnsqodercli --max-turns=10
--yoloSkip permission checksqodercli --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:
qodercli mcp add playwright -- npx -y @playwright/mcp@latest

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:
# List servers
qodercli mcp list

# Remove a server
qodercli mcp remove playwright

Files of MCP servers

MCP servers added will be saved in the following files of your project.
# Added for the current user or specific project and will not be committed.
~/.qoder.json   

# Added for the current project and will be committed usually.
${project}/.mcp.json
  • 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):
~/.qoder/settings.json
${project}/.qoder/settings.json
${project}/.qoder/settings.local.json (usually added to .gitignore)

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.
{
  "permissions": {
    "ask": [
      "Read(!/Users/qoder_user/Documents/codes/go-micro/**)",
      "Edit(!/Users/qoder_user/Documents/codes/go-micro/**)"
    ],
    "allow": [
      "Read(/Users/qoder_user/Documents/codes/go-micro/**)",
      "Edit(/Users/qoder_user/Documents/codes/go-micro/**)"
    ],
    "deny": []
  }
}

Types

  1. 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:
PatternDescriptionExampleMatches
/pathAbsolute path from system rootRead(/Users/qoder_user/demo/**))/Users/qoder_user/demo/xx
~/pathPath from the home directoryRead(~/Documents/xx.png)/Users/qoder_user/Documents/xx.png
path or ./pathRelative to current directoryRead(xx.java)./xx.java
  1. WebFetch Restrict domains for network fetch tools.
  • WebFetch(domain:example.com) restricts fetches to example.com.
  1. Bash Restrict commands for shell execution tools.
  • Bash(npm run build) matches the exact command npm run build
  • Bash(npm run test:*) matches commands starting with npm run test
  • Bash(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.
CommandsDescription
qodercli --worktree "job descriptionCreate and start a new worktree job
qodercli jobs --worktreeList existing worktree jobs
qodercli rmRemove 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.
$ qodercli jobs --worktree
Qoder jobs for workspace: /Users/linus/qoder/qodercli

Worktree Jobs:
ID              INIT PROMPT    PATH                                STATUS      CREATED             
11758283139787  [I] hello        ~/.qoder/worktrees/11758283139787   running     5 minutes ago       
11758283382928  [N] hello        ~/.qoder/worktrees/11758283382928   exited      1 minute ago        
11758283399820  [N] hello        ~/.qoder/worktrees/11758283399820   exited      1 minute ago

Total: 3 worktree job(s)
Field descriptions:
  • 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:
qodercli rm <jobId>
Note: Deletion is irreversible. Proceed with caution.

Memory

Qoder CLI uses AGENTS.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
local files path:
# User-level, applies to all projects
~/.qoder/AGENTS.md
# Project-level, applies to the current project
${project}/AGENTS.md 

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
Secondly, define your subagent. A subagent’s Markdown file must include a frontmatter section defining the name, description, and tools fields, along with the main system prompt. For example:
---
name: code-review
description: Code review expert for quality and security checks
tools: Read, Grep, Glob, Bash
---

You are a senior code reviewer responsible for ensuring code quality.

Checklist:
1. Readability
2. Naming conventions
3. Error handling
4. Security checks
5. Test coverage
...

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:
> Use code-review subagent to check code issues (explicit invocation)
> Analyze this code for potential performance issues (implicit)
> Review the implementation of this API (implicit)
> First use the design subagent for system design, then use the code-review subagent for code review (chained)

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.
---
description: "Intelligent workflow orchestrator that guides users through feature development using specialized subagents"
--
First use the design subagent for system design, then use the code-review subagent to complete code review.

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)
Example Add hooks to .qoder/settings.json :
{
  "hooks": {
    "Notification": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "~/notification.sh"
          }
        ]
      }
    ]
  }
}
Create ~/notification.sh and add the following content to get configurations writen via CLI.
#!/bin/bash

input=$(cat)

sessionId=$(echo $input | jq -r '.session_id')
messageInfo=$(echo $input | jq -r '.message')
workspacePath=$(echo $input | jq -r '.cwd')

if [[ "$messageInfo" =~ ^Agent ]]; then
  osascript -e 'display notification "✅ Your task has completed." with title "QoderCLI"'
else
  osascript -e 'display notification "⌛️ Your task requires authorization." with title "QoderCLI"'
fi

exit 0
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.
I