Skip to main content
Extending Qoder CLI

Commands

Control Qoder CLI CN, invoke features, and manage sessions quickly with slash commands

Control Qoder CLI CN's behavior and quickly invoke specific tasks through slash commands (also just called Commands). A command is a shortcut for invoking a specific task in Qoder CLI CN, triggered by the slash (/) prefix. In TUI mode, type / to see the list of available commands and pick one to run.

Quick start

Using commands in TUI mode

  1. Launch Qoder CLI CN to enter TUI mode:
    qodercn
    
  2. Type the / character in the input box to see the list of available commands
  3. Select the target command and press Enter to run it — for example, /config to view or modify Qoder CLI CN settings:
    /config
    

Using commands in headless mode

Headless mode supports commands that submit a prompt. Commands that open interactive pickers or dialogs should be used in TUI mode.
# Run a command (with extra instructions)
qodercn -p '/review Focus on comment coverage'

# Run a custom Prompt command
qodercn -p '/git-commit'

Command types

Commands in Qoder CLI CN come in two types:
TypeDescriptionApplicable modesExtensibility
TUI typeProvides an interactive interface (dialogs, list pickers)TUIBuilt-in; not customizable
Prompt typeSubmits a preset prompt into the conversation to guide the CLI through a specific taskTUI + HeadlessSupports user-defined extension

Built-in commands

The table below lists common built-in commands; for the complete list, categories, and aliases, refer to Slash Commands.
CommandTypePurpose
/agentsTUIView and manage the Subagent list; supports creating and editing Subagent configuration
/tasksTUIView and manage background tasks
/workflowsTUIOpen the dynamic workflow task panel. See Dynamic Workflows
/clearTUIClear the current conversation and start a new one
/commandsTUIView the list of available commands, browsable by category: built-in, dynamic, Skill, plugin, workflow, etc.
/compactPromptCompress the conversation history, optionally with a focus
/settings (alias /config)TUIConfiguration management: view or modify Qoder CLI CN settings
/export [filename]TUIExport the current session to a file
/feedbackTUISubmit feedback or report a problem
/helpTUIShow help
/initTUIInitialize the project: analyze the project structure and generate the AGENTS.md memory file
/loginTUISign in to your Qoder CLI CN account
/logoutTUISign out of your Qoder CLI CN account
/mcpTUIMCP service management
/memoryTUIOpen the memory overview; with auto-memory enabled, open the auto-memory folder or manage topic files via /memory manage
/modelTUIView and manage model-level settings
/effort [level]TUISet the current model's reasoning effort; opens the model parameter panel without a level
/context-windowTUISet the current model's context window; opens the model parameter panel without arguments
/fast [on|off]TUIToggle the current model's fast mode; opens the model parameter panel without arguments
/questPromptSmart workflow orchestrator where multiple agents collaborate to help you complete feature development
/quitTUIExit Qoder CLI CN
/release-notesTUIView release notes
/resumeTUIResume previous sessions or conversation history; Tab switches between session pages
/reviewPromptRun a code review checking quality and standards compliance
/skillsTUIManage Skill commands for the current workspace
/statusTUIView current session status and system information
/upgradeTUIUpgrade your subscription plan
/usageTUIView usage statistics, including token consumption
/vimTUIEnable or configure Vim mode for a Vim-style editing experience

Creating custom commands

Qoder CLI CN supports creating Prompt-type custom commands, defining the command's name, description, and system prompt via a configuration file. Describe the command you want directly in the conversation, and let Qoder generate it in the configuration file format and write it to the right directory. For example:
> Create a custom command for me: review all git changes and generate a well-formed commit message; save it as a project-level command
Once generated, you can find and edit the configuration file in these directories:
# Project level
.qoder/commands/

# User level
~/.qoder-cn/commands/
The /commands panel is for browsing the currently available commands by category (built-in, dynamic, Skill, plugin, workflow, etc.); it does not provide a creation entry.

Option 2: Write the configuration manually

Write the command configuration file in Markdown directly, giving you full control over the command's prompt content.

Configuration file format

A command configuration file is Markdown, containing frontmatter metadata and the system prompt:
---
name: command-name
description: What the command does; shown in the TUI command list
---

This is the command's system prompt content.
When the user runs the command, this prompt is submitted into the conversation to guide the CLI through the specific task.

Multi-line text is fine, and Markdown formatting is supported.
Fields:
FieldRequiredDescription
nameNoDisplay name in the TUI; the invocation name is derived from the file path and is not affected by this field
descriptionYesDescription of the command; multi-line text supported (using YAML syntax)
Naming conventions:
  • Use lowercase letters and hyphens (for example git-commit)
  • Avoid spaces and special characters
  • Keep the file name consistent with the name field where possible
  • Commands in subdirectories use : as the namespace separator; for example commands/git/commit.md registers as /git:commit
  • frontmatter.name is only the display name in the TUI; the invocation name is always derived from the file path
  • If a SKILL.md exists in a directory, that directory registers as a single command (such as /git), and other sibling .md files in it are ignored
  • Command name segments are kept verbatim with no character substitution; stick to easy-to-type characters in file names

Configuration example

Here is an example command configuration for generating Git commit messages:
---
name: git-commit
description: Use this command when you need to review all git changes in the current repository and generate a well-structured commit message. This is particularly useful before committing code changes, especially after completing a feature or fixing a bug.
---

You are an expert Git commit message generator. Your role is to analyze all git changes in the repository and create clear, concise, and meaningful commit messages that follow conventional commit standards.

When analyzing changes, you will:
1. Examine all staged and unstaged changes using `git diff` and related commands
2. Identify the type of changes (feat, fix, chore, docs, style, refactor, test, etc.)
3. Determine the scope of changes (which component/module was affected)
4. Summarize the primary change in a clear subject line (50 characters or less)
5. Provide a detailed body explanation if the changes are complex
6. Follow conventional commit format: `<type>(<scope>): <subject>`

Your commit message structure should be:
- Subject line: Brief summary starting with change type
- Blank line
- Body (if needed): Detailed explanation of what changed and why
- Wrap lines at 72 characters

Best practices you follow:
- Use imperative mood ("add" not "added")
- Be specific about what was changed
- Reference issue numbers when relevant
- Keep subject line under 50 characters
- Explain the 'why' behind significant changes
- Group related changes logically

If you encounter unclear changes or need more context, ask clarifying questions. If there are no changes, inform the user accordingly. Always verify your analysis covers all modifications before generating the final commit message.

Storage locations and precedence

Command configuration files can live in project-level or user-level directories:
LevelPathScopeCommit to the repository
Project.qoder/commands/<command_name>.mdCurrent project onlyRecommended (team sharing)
User~/.qoder-cn/commands/<command_name>.mdAll projectsDo not commit (personal configuration)
Precedence: if a command with the same name exists at both project and user levels, the user-level (~/.qoder-cn/commands/) command takes effect and overrides the project-level one; overridden definitions are listed under Also defined at in the command details. With Qoder CLI CN already running, after adding or modifying a command configuration file, run /commands to reload and view the available commands.

Viewing and using custom commands

Viewing the command list

  1. Run /commands in the TUI to open the command list panel
  2. Switch between category tabs with the Tab key (Built-in, Dynamic, Skill, Plugin, Workflow, etc.; only categories that contain commands are shown, with counts on the tabs)
  3. Browse with the up/down keys; the list shows each command's name and description; custom commands fall under the Dynamic category
  4. Press Esc to exit the panel
The panel is for browsing only. To see a custom command's full system prompt, open the corresponding configuration file (the .md file under .qoder/commands/ or ~/.qoder-cn/commands/).

Running commands

Type the command name (starting with /) in the TUI input box, and the CLI automatically shows the matching command list:
╭───────────────────────────────────────────────────────╮
│ > /git-commit                                                                         │
╰───────────────────────────────────────────────────────╯
  /git-commit        [user] Use this command when you need to review all git changes ...
Press Enter to send the command, and the CLI starts executing the task according to the system prompt in the command configuration:
> /git-commit

● I'll help you create a commit message by analyzing the git changes in your repository.
  Let me first check the current status.

● Bash (git status)
...

FAQ

Custom command not recognized

Problem: a created custom command does not show up or run in the TUI Solutions:
  1. Check that the configuration file path is correct (~/.qoder-cn/commands/ or .qoder/commands/)
  2. Check that the frontmatter format is correct (starts and ends with ---)
  3. Run /commands to reload the command list. If it is still not recognized, restart the CLI (exit with /quit and run qodercn again)

Frontmatter parsing failure

Problem: the command configuration's YAML format is incorrect Solutions:
  • Make sure the frontmatter starts and ends with ---
  • Use the | syntax for a multi-line description field
  • Check the indentation (YAML is indentation-sensitive)
---
name: my-command
description: |
  This is the first line of the description
  This is the second line of the description
---