メインコンテンツへスキップ
Qoder CLI の対話型セッション中の動作をスラッシュコマンドで制御します。 コマンドはスラッシュ (/) を接頭辞とする特定タスクを実行するショートカットです。TUI モードで / を入力すると利用可能なコマンドを確認できます。

クイックスタート

TUI モードの場合:
  1. Qoder CLI を起動:
    qodercli
    
  2. / を入力してコマンド一覧を表示
  3. 実行したいコマンドを選択して Enter を押す:
    /config
    
ヘッドレスモードの場合: プロンプト型コマンド (/init, /review, /quest) はヘッドレスモードで実行可能:
# コマンドを実行
qodercli -p '/review'

# 追加指示付きで実行
qodercli -p '/review Focus on security vulnerabilities'

コマンドの種類

Qoder CLI コマンドは2種類に分類されます:
種類説明モード拡張性
TUI対話型 UI を提供(ダイアログ、リスト選択)TUIシステム内蔵、カスタマイズ不可
プロンプトCLI タスクをガイドするプリセットプロンプトを送信TUI + ヘッドレスユーザーカスタマイズ可能

ビルトインコマンド

コマンド種類目的
/agentsTUIサブエージェント設定を管理
/bashesTUIバックグラウンドタスクの一覧表示と管理
/clearTUI会話履歴をクリアしてコンテキストを解放
/commandsTUI現在のワークスペース向け拡張コマンドを管理
/compactプロンプト現在のセッションを要約してコンテキストを圧縮
/configTUIQoder CLI 設定を管理
/export [filename]TUI現在のセッションをファイルにエクスポート
/feedbackTUIQoder CLI に関するフィードバックを送信
/helpTUIヘルプと利用可能コマンドを表示
/initプロンプトAGENTS.md ファイルをコードベースドキュメントで初期化
/loginTUIQoder アカウントでサインイン
/logoutTUIQoder アカウントからサインアウト
/mcpTUImcp サーバーの一覧表示と管理
/memoryTUIメモリファイルを編集
/modelTUIモデルレベルの設定を一覧表示・管理
/questプロンプト専門サブエージェントを使った機能開発をガイドするインテリジェントワークフローオーケストレータ
/quitTUIプログラムを終了(/exit と同等)
/release-notesTUIリリースノートを表示
/resumeTUI過去の会話を履歴から再開
/reviewプロンプトローカルの保留中 git 変更をレビュー
/setup-githubTUIQoder GitHub Actions を設定
/skillsTUI現在のワークスペース向けスキルコマンドを管理
/statusTUIQoder CLI の状態を表示
/upgradeTUIブラウザで Qoder アカウントプランのアップグレード
/usageTUI現在のプラン利用状況を表示
/vimTUI外部エディタを入力用に開く

コマンドの作成

カスタムコマンドでは、頻繁に使用するプロンプトをマークダウンファイルとして定義できます。コマンドはスコープ別(プロジェクト固有または個人用)に整理されます。

方法1: AI 支援生成(推奨)

TUI のビルトイン AI 支援機能でコマンド設定を迅速生成:
  1. TUI で /commands を実行してコマンドパネルを開く
  2. Tab で User または Project タブに切り替え
  3. [Create new command…] を選択して Enter
  4. 作成したいコマンドを説明:
    > すべてのgit 変更を表示して適切なコミットを作成
    
  5. Qoder CLI が設定ファイルを自動生成
  6. 生成されたファイルを微調整:
    # プロジェクトレベル (Project タブ)
    .qoder/commands/
    
    # ユーザーレベル (User タブ)
    ~/.qoder/commands/
    

方法2: 手動設定(上級者向け)

完全な制御を可能にするマークダウン設定ファイルを直接作成。

設定形式

コマンドファイルは YAML frontmatter とシステムプロンプトを含むマークダウン形式:
---
name: command-name
description: Brief description shown in command list
---

This is the system prompt content.
When a user executes this command, this prompt guides the CLI to complete the task.

Supports multi-line text and Markdown formatting.

フィールドリファレンス

フィールド必須説明
nameはい/command-name 呼び出し用のユニークコマンド名
descriptionはいコマンド説明

命名規則

  • 小文字とハイフン使用 (例: git-commit)
  • スペースや特殊文字は避ける
  • ファイル名は name フィールドと一致

設定例

Git コミットメッセージ生成用コマンド:
---
name: git-commit
description: Review all git changes and generate a well-structured commit message following conventional commit standards.
---

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.

保存場所と優先順位

レベルパススコープバージョン管理
プロジェクト.qoder/commands/<command_name>.md現在のプロジェクトのみ推奨 (チーム共有)
ユーザー~/.qoder/commands/<command_name>.md全プロジェクトコミット対象外 (個人用)
優先順位: 同名コマンドではプロジェクトレベルがユーザーレベルより優先。 再起動要: CLI 実行中にコマンドファイルを作成/変更後は、/quit で終了し qodercli を再起動して新設定を読み込み。

カスタムコマンドの使用

コマンド詳細の確認

  1. TUI で /commands を実行してコマンドパネルを開く
  2. Tab で User と Project タブを切り替え
  3. コマンドを選択して Enter で詳細表示:
    ------------------------------------------------------------------------------------------
    Extend Commands:  [User]  Project
    
    Name: git-commit
    
    Description
    [project] Review all git changes and generate a well-structured commit message...
    
    System Prompt
    You are an expert Git commit message generator...
    
  4. Esc で詳細ビューを終了

コマンドの実行

TUI でコマンド名 (/ 始まり) を入力。CLI は一致するコマンドを自動表示:
╭───────────────────────────────────────────────────────╮
│ > /git-commit                                                                         │
╰───────────────────────────────────────────────────────╯
  /git-commit        [user] Use this command when you need to review all git changes ...
Enter で実行。CLI はコマンドのシステムプロンプトに従います:
> /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)
...

よくある質問

カスタムコマンドが認識されない

問題: 作成したコマンドが TUI に表示/実行されない 解決策:
  1. ファイルパスを確認 (~/.qoder/commands/ または .qoder/commands/)
  2. frontmatter 形式を検証 (--- で開始/終了)
  3. CLI を再起動 (/quitqodercli 再実行)

Frontmatter 解析失敗

問題: YAML 形式が不正 解決策:
  • frontmatter が --- で開始/終了していることを確認
  • 複数行 description フィールドには | 構文を使用
  • インデントを確認 (YAML はインデントに敏感)
---
name: my-command
description: |
  First line of description
  Second line of description
---