Skip to main content
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:
  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:

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.

Command Types

Commands in Qoder CLI are divided into two types:

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.

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:
Once generated, you can find and edit the configuration file in the following directory:
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:
Field Descriptions: 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:

Storage Locations and Priority

Command configuration files can be stored in project-level or User-Level directories: 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:
Press Enter to send the command, and the CLI will start executing the task according to the system prompt in the command configuration:

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).