Skip to main content
Extending Qoder CLI

Commands

Quickly control Qoder CLI behavior, invoke features, and manage sessions via slash commands

Control the behavior of Qoder CLI and quickly invoke specific tasks using slash commands (also known as Commands). Commands are shortcuts in Qoder CLI for invoking specific tasks, triggered by a slash prefix (/). In TUI mode, type / to view the list of available commands and select one to execute.

Quick Start

Using Commands in TUI Mode

  1. Launch Qoder CLI to enter TUI mode:
    qodercli
    
  2. Type the / character in the input box to view the list of available commands.
  3. Select the target command and press Enter to execute it. For example, use /config to view or modify Qoder CLI configuration items:
    /config
    

Using Commands in Headless Mode

Headless mode supports the execution of commands that submit prompts. Commands that require opening interactive selectors or dialogs should be used in TUI mode.
# Execute command (with additional instructions)
qodercli -p '/review Focus on checking comment coverage'

# Execute custom prompt command
qodercli -p '/git-commit'

Command Types

Commands in Qoder CLI are divided into two types:
TypeDescriptionApplicable ModeExtensibility
TUI TypeProvides an interactive interface (e.g., pop-up dialogs, list selections)TUIBuilt-in, custom extensions not supported
Prompt TypeSubmits preset prompts to the conversation to guide the CLI in completing specific tasksTUI + HeadlessSupports user-defined custom extensions

Built-in Commands

The table below lists common built-in commands; for the complete list of commands, categories, and aliases, refer to the Slash Commands Reference.
CommandTypePurpose
/agentsTUIView and manage the Subagent list, supporting the creation and editing of Subagent configurations
/tasksTUIView and manage background tasks
/workflowsTUIOpen the Dynamic workflows task panel. See Dynamic workflows
/clearTUIClear the current conversation and start a new one
/commandsTUIView the list of available commands, browsable by categories such as Built-in, Dynamic, Skill, Plugin, and Workflow
/compactPromptCompact conversation history, with the option to specify focus areas
/settings (alias /config)TUIConfiguration management: view or modify Qoder CLI configuration items
/export [filename]TUIExport the current session to a file
/feedbackTUISubmit feedback or report issues
/helpTUIDisplay help information
/initTUIInitialize the project, analyze the project structure, and generate the AGENTS.md Memory File
/loginTUISign in to your Qoder CLI account
/logoutTUISign out of your Qoder CLI account
/mcpTUIMCP Servers management
/memoryTUIOpen the Memory Overview; when Auto-Memory is enabled, open the auto-memory folder, or use /memory manage to manage topic files
/modelTUIView and manage Model-Level Settings
/effort [level]TUISet the thinking depth of the current model; opens the Model Parameters Panel if no level is provided
/context-windowTUISet the context window of the current model; opens the Model Parameters Panel if no arguments are provided
/fast [on|off]TUIToggle the quick mode of the current model; opens the Model Parameters Panel if no arguments are provided
/questPromptIntelligent workflow orchestrator where multiple agents collaborate to assist users in feature development
/quitTUIExit Qoder CLI
/release-notesTUIView Release Notes
/resumeTUIRestore previous sessions or conversation history, supporting Tab key pagination to switch sessions
/reviewPromptPerform code review to check code quality and compliance
/setup-githubTUIGitHub integration configuration: set up GitHub-related features
/skillsTUIManage Skill commands for the current workspace
/statusTUIView current session status and system information
/upgradeTUIUpgrade subscription plan
/usageTUIView usage statistics, including token consumption and other information
/vimTUIEnable or configure Vim mode for a Vim-style editing experience

Creating Custom Commands

Qoder CLI supports creating custom commands of the Prompt type, allowing you to define the command's name, description, and system prompt via configuration files. Simply describe the command you want directly in the conversation, and let Qoder generate it in the configuration file format and write it to the corresponding directory. For example:
> Help me create a custom command: view all git changes and generate a conventional commit message, and save it as a project-level command
Once generated, you can find and edit the configuration file in the following directory:
# Project-level
.qoder/commands/

# User-level
~/.qoder/commands/
The /commands panel is used to view the list of currently available commands by category (Built-in, Dynamic, Skill, Plugin, Workflow, etc.) and does not provide an entry point for creation.

Method 2: Manually Write Configuration

Directly write the command configuration file in Markdown format to have full control over the command's prompt content.

Configuration File Format

The command configuration file is in Markdown format, containing frontmatter metadata and the system prompt:
---
name: command-name
description: Description of the command's purpose, to be displayed in the TUI command list
---

This is the system prompt content for the command.
When the user executes this command, this prompt is submitted to the conversation to guide the CLI in completing specific tasks.

Multi-line text can be used, and Markdown formatting is supported.
Field Descriptions:
FieldRequiredDescription
nameNoThe display name of the command in the TUI; the invocation name is determined by the file path and is not affected by this field
descriptionYesThe functional description of the command, supporting multiline text (using YAML syntax)
Naming Conventions:
  • Use lowercase letters and hyphens (e.g., git-commit)
  • Avoid using spaces or special characters
  • It is recommended to keep the filename consistent with the name field
  • Commands in subdirectories use : as the namespace separator; for example, commands/git/commit.md is registered as /git:commit
  • frontmatter.name serves only as the display name in the TUI; the command invocation name is always derived from the file path
  • If SKILL.md exists in the same directory, the directory will be registered as a single command (e.g., /git), and other sibling .md files within the directory will be ignored
  • Command name segments are preserved as-is without character replacement; it is recommended to stick to easily typable characters in filenames

Configuration Example

Below is an example of a command configuration used to generate 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 Priority

Command configuration files can be stored in project-level or User-Level directories:
LevelPathScopeCommit to Code Repository
Project-Level.qoder/commands/<command_name>.mdCurrent project onlyRecommended (team sharing)
User-Level~/.qoder/commands/<command_name>.mdAll projectsDo not commit (personal configuration)
Priority: If a command with the same name exists at both the project-level and User-Level, the project-level command takes precedence. If Qoder CLI is 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. Execute /commands in the TUI to open the commands panel.
  2. Use the Tab key to switch between category tabs (Built-in, Dynamic, Skill, Plugin, Workflow, etc.; only categories with commands are displayed, and the tabs indicate the count).
  3. Use the up and down arrow keys to browse; the list displays the name and description of each command. Custom commands are categorized under Dynamic.
  4. Press the Esc key to exit the panel.
The panel is for browsing only. To view the full system prompt of a specific custom command, directly open the corresponding configuration file (the .md file under .qoder/commands/ or ~/.qoder/commands/).

Executing Commands

Type the command name (starting with /) in the TUI input box, and the CLI will automatically display a list of matching commands:
╭───────────────────────────────────────────────────────╮
│ > /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 will start 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 Commands Not Recognized

Issue: Created custom commands do not appear or execute in the TUI. Solution:
  1. Check if the configuration file path is correct (~/.qoder/commands/ or .qoder/commands/).
  2. Check if 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 using /quit and rerun qodercli).

Frontmatter Parsing Failed

Issue: The YAML format of the command configuration is incorrect. Solution:
  • Ensure the frontmatter starts and ends with ---.
  • Use | syntax to define multiline description fields.
  • Check if the indentation is correct (YAML is sensitive to indentation).
---
name: my-command
description: |
  This is the first line of the description
  This is the second line of the description
---