Skip to main content
Extending Qoder CLI

Tools

Qoder CLI CN works with the local workspace and external information sources through tools. Tools can search and read project content, modify files, run commands, fetch web content, maintain context, and connect to external services via MCP. Tools can be used in interactive TUI sessions and in non-interactive Print Mode. The set of tools actually available depends on the current session, enabled features, MCP configuration, and permission settings. Use /tools in the TUI to see the tools available in the current session.

Search and explore

Qoder CLI CN uses search and exploration tools to understand the task at hand before deciding its next move.
ScopeDescription
FilesFind files in the current workspace.
CodeSearch code, text, and configuration files.
DirectoriesBrowse the project structure and locate relevant paths.
WebSearch the web when the task requires current information or public material.
Web contentFetch the content of a given web page.

Read project context

Qoder CLI CN can read files and other project assets to gather context for the current request.
CapabilityDescription
View filesRead source code, documentation, configuration, and other text assets.
Read large filesRead only the relevant portions when a file is too large.
Read document assetsRead document formats such as PDF where supported.

Edit files

When a task requires changes, Qoder CLI CN can create or modify files in the workspace.
CapabilityDescription
Modify filesMake targeted modifications to existing files.
Create filesAdd new files such as source code, tests, documentation, or configuration.
Edit notebooksModify notebook content where notebooks are supported.
File edits go through the permission system. Depending on the permission mode and rules, Qoder CLI CN may apply changes directly, request confirmation, or block the operation.

Execute commands

When a task requires local execution, Qoder CLI CN can run shell commands.
CapabilityDescription
Run commandsExecute builds, tests, packaging, Git checks, project diagnostics, or custom shell commands.
Run long tasksTrack long-running commands such as test suites or dev scripts.

Background commands and event monitoring

When subsequent work does not depend on a command's immediate result, Qoder CLI CN can run the shell command in the background so the main session keeps working on other things. A command explicitly requested to run in the background creates a background task regardless of how long it takes; when the task completes, fails, or needs attention, the result is automatically returned to its session — no repeated progress questions or polling commands needed.
Background task starts -> main session keeps working -> completion notice returns -> main session handles the result
For scenarios that continuously produce events — logs, deployment status, test observation — Qoder CLI CN can start event monitoring. Every complete line the monitored command outputs is sent to the main session as an event notification. Monitoring commands should output only the events worth attention, rather than forwarding full high-frequency logs. Type /tasks in the TUI to check the status and output of background shells and Subagents, and to stop tasks still running. When a background task ends, the completion notice returns to the main session, and Qoder CLI CN continues based on the result. Shell commands are generally riskier than read-only operations. We recommend allowing routine commands via permission rules, and setting ask or deny for sensitive commands. When the shell command prefix is enabled via the QODERCN_SHELL_PREFIX environment variable, the Bash tool runs the fully assembled shell command through the configured executable wrapper. Permission checks and command display still use the original command. The wrapper must execute the single command argument it receives, and preserve the process's input/output and exit status.

Manage context

Some tools help Qoder CLI CN maintain the current task and session state.
CapabilityDescription
Track tasksMaintain a lightweight plan or task list while working.
Ask clarifying questionsAsk the user when a decision or key information is missing.
Manage memorySave long-term information when memory capabilities are available.
Use SkillsLoad domain-specific instructions or workflows once configured.
Plan workEnter or exit Plan Mode when a task needs analysis before execution.
Memory and Skills provide context to the model, but they are not a security boundary. When you need enforced policy, use permission rules and Hooks.

Delegate and automate

When the current environment enables the relevant capabilities, Qoder CLI CN can use delegation and automation.
CapabilityDescription
SubagentsDelegate specific work to dedicated Agents.
WorkflowsRun configured, repeatable workflows.
GoalsTrack and execute longer-horizon goals.
WorktreesWork in separate Git worktrees when parallel sessions are needed.
Scheduled tasksCreate or manage scheduled tasks when scheduling is enabled.
The exact availability depends on product configuration, feature switches, and the current session.

MCP tools

Qoder CLI CN can connect to Model Context Protocol (MCP) services to use external tools and data sources. Once MCP services are configured, their tools appear in the same /tools view and go through the same permission system. MCP tools are a good fit for connecting issue trackers, code hosting platforms, databases, browser automation, internal platforms, or custom enterprise services. For MCP configuration, see MCP Servers.

Control tool usage

Whether a tool is visible and whether it is allowed to run are two different things.
ControlDescription
--toolsRestrict which tools are visible in the current session.
--allowed-toolsPre-allow specific tools or tool patterns.
--disallowed-toolsBlock specific tools or tool patterns.
permissions.allow / permissions.ask / permissions.denyPersistent permission rules written in settings files.
tools.excludeRemove tools from discovery at startup.
Examples:
# Read-only exploration
qodercn --tools Read Grep Glob --allowed-tools 'Read,Grep,Glob'

# Allow common status-check commands
qodercn --allowed-tools 'Read,Grep,Bash(git status)'

# Disallow file edits in a non-interactive review
qodercn -p "review this repository" --disallowed-tools 'Write,Edit'
For permission modes, rule syntax, and evaluation order, see Permissions. For Hooks that intercept tool calls, see Hooks.