Skip to content

Latest commit

 

History

History
739 lines (565 loc) · 28.9 KB

File metadata and controls

739 lines (565 loc) · 28.9 KB

Snow CLI User Guide - Command Panel Guide

The command panel is a quick command system provided by Snow CLI, allowing you to quickly execute various operations through simple slash commands.

Command Panel Overview

All commands start with / and can be executed by typing them in the chat input box. Commands are divided into the following categories:

  • Session management
  • Mode switching
  • Code review and analysis
  • Configuration and management
  • Custom extensions

Session Management Commands

/clear

Clear current chat context.

  • Function: Clear current conversation history and start fresh conversation
  • Use Cases: When conversation context is too long or need to switch topics
  • Example: Simply type /clear and press Enter

/resume

Resume historical session.

  • Function: Open session selection panel to select and resume previously saved conversations
  • Use Cases: Need to continue unfinished conversation or view history
  • Example: Type /resume to view all saved sessions

/export

Export conversation records.

  • Function: Export current conversation as text file
  • Use Cases: Need to save conversation content for documentation or sharing
  • Example: Type /export to automatically save to project directory

/copy-last

Copy the last AI response.

  • Function: Copy the most recent AI assistant message in the current session to the system clipboard
  • Use Cases: Quickly reuse the previous answer in documentation, commit messages, tickets, or other chats
  • Notes:
    • Only the latest non-sub-agent AI assistant message is copied
    • If no AI response exists yet, or the last response is empty, Snow CLI shows a prompt instead
  • Example: Type /copy-last to copy the last AI response

/compact

Compress conversation history.

  • Function: Use AI to compress conversation history, reducing token usage
  • Use Cases: Conversation is too long but don't want to clear, need to retain key information
  • Example: Type /compact to start compression

/branch

Fork the current session.

  • Function: Fork the current conversation into an independent new session
  • Parameters: Optional branch name
  • Use Cases: Try different approaches based on the same context without affecting the current conversation
  • Examples:
    • /branch - Fork the current session
    • /branch my-experiment - Fork and name it my-experiment

/fork

Fork the current session (identical to /branch).

  • Function: Fork the current conversation into an independent new session
  • Parameters: Optional branch name
  • Use Cases: Try different approaches based on the same context without affecting the current conversation
  • Examples:
    • /fork - Fork the current session
    • /fork my-experiment - Fork and name it my-experiment

Mode Switching Commands

/yolo

Toggle YOLO mode (auto-approve mode).

  • Function: Turn on/off automatic approval for tool calls, no manual confirmation needed
  • Use Cases: Quick execution when trusting AI operations, or turn off when manual review needed
  • Status: Status saved in localStorage, persists after restart
  • Example: Type /yolo to toggle mode

/plan

Toggle Plan mode (planning mode).

  • Function: Turn on/off plan mode, AI will make detailed plan before execution
  • Use Cases: Complex tasks need planning first, or simple tasks execute directly
  • Status: Status saved in localStorage
  • Example: Type /plan to toggle mode

/vulnerability-hunting

Toggle Vulnerability Hunting Mode.

  • Function: Turn on/off Vulnerability Hunting Mode, a professional security analysis agent
  • Features:
    • Systematic 5-phase vulnerability analysis workflow
    • Generate executable verification scripts
    • Create detailed security analysis reports
    • Support multiple vulnerability type detection (logic errors, security vulnerabilities, etc.)
  • Use Cases: Conducting professional security audits or code vulnerability detection
  • Status: Status saved in localStorage
  • Report Location: .snow/vulnerability-hunting/docs/
  • Script Location: .snow/vulnerability-hunting/scripts/
  • Detailed Guide: See Vulnerability Hunting Mode
  • Example: Type /vulnerability-hunting to toggle mode

/tool-search

Toggle Tool Search mode.

  • Function: Turn Tool Search on/off (discover and load tools on demand)
  • Features:
    • When enabled, Snow CLI prefers on-demand tool discovery to reduce upfront tool injection
    • When disabled, the full tool set is provided directly
    • The current state is persisted in the project's .snow/settings.json
  • Use Cases: Switch between “save context” mode and “show all tools directly” mode
  • Example: Type /tool-search to toggle the mode

Code Review and Analysis Commands

/review

Code review.

  • Function: Open interactive code review panel to select content for review
  • Features:
    • Automatically detect Git repository
    • Display staged changes with file count
    • Display unstaged changes with file count
    • Paginated loading of commit history (30 per page)
    • Multi-select: can select multiple review targets simultaneously
    • Support adding review notes
    • AI analyzes code quality, potential bugs, security issues
    • Provide optimization suggestions
  • Panel Operations:
    • Up/Down - Move selection up/down
    • Space - Check/uncheck current item
    • Enter - Confirm selection and start review
    • ESC - Close panel
  • Selectable Review Targets:
    • Staged: Staged changes
    • Unstaged: Unstaged changes
    • Historical Commits: Shows commit SHA, message, author, date
  • Examples:
    • /review - Open review panel
    • Use Space key to select content to review in the panel, press Enter to confirm

/diff

Review conversation file changes in Diff view.

  • Function: Open the Diff Review panel to inspect files associated with earlier user messages in the conversation and show diffs in your IDE
  • Features:
    • Lists conversation checkpoints based on session snapshots
    • Lets you preview single-file diffs first, then open all diffs for the selected message at once
    • Useful for reviewing code changes made by AI during the current session
  • Panel Operations:
    • ↑/↓ - Select a message or file
    • Tab - Switch between the message list and the file list
    • Enter - Open all file diffs for the selected message
    • ESC - Close the panel
  • Prerequisite: It is recommended to connect the VSCode/IDE plugin first, otherwise diffs cannot be shown inside the IDE
  • Example: Type /diff to open the conversation diff review panel

/init

Initialize project documentation.

  • Function: AI analyzes current project and generates/updates AGENTS.md documentation
  • Features:
    • Automatically explore project structure
    • Read configuration files and code
    • Generate project overview, tech stack, architecture description
  • Generated Content: Project name, overview, tech stack, directory structure, features, usage instructions, etc.
  • Example: Type /init in project root directory

/new-prompt

Generate a refined prompt.

  • Function: Open the Prompt Generator panel and turn your rough requirement into a prompt you can continue editing or send later
  • Features:
    • Uses AI to transform natural-language requirements into a more structured prompt
    • Supports previewing, regenerating, or accepting the generated result
    • After accepting, the generated prompt is put back into the input box and is not sent automatically
  • Panel Operations:
    • Input step: Enter your requirement and press Enter to start generating
    • Preview step: ↑/↓ scroll, Y accept, R regenerate, N/ESC cancel
  • Use Cases: Helpful when you want to turn a vague idea into a clearer and more complete instruction
  • Example: Type /new-prompt to open the prompt generator

/role

Role definition file management.

  • Function: Manage ROLE files (global and project scopes) to define the AI's role and behavior
  • Features:
    • Create: /role - Open interactive panel to select creation location
      • Global location: ~/.snow/ROLE.md
      • Project location: ./ROLE.md
    • Delete: /role -d or /role --delete - Open deletion panel to select ROLE.md to delete
    • List/Switch: /role -l or /role --list - Open the ROLE management panel to list roles and switch the active one
  • Use Cases: Customize AI behavior/output per project or set a global default
  • Panel Operations:
    • Creation Panel: G - Select global, P - Select project, ESC - Cancel
    • Deletion Panel: G - Delete global, P - Delete project, Y - Confirm deletion, N/ESC - Cancel
    • ROLE Management Panel (/role -l):
      • Tab - Switch Global / Project
      • Up/Down - Move selection
      • Enter - Set selected ROLE as active (marked as [✓] in the list)
      • N - Create a new inactive ROLE (file name like ROLE-<id>.md)
      • D - Delete selected inactive ROLE (requires confirmation: Y confirm, N/ESC cancel)
      • ESC - Close the panel
  • Active role persistence:
    • Global: ~/.snow/role.json
    • Project: <project-root>/.snow/role.json
    • Field: activeRoleId (missing or active reads ROLE.md; otherwise reads ROLE-<activeRoleId>.md)
  • Examples:
    • /role - Open creation panel, select location and create ROLE.md
    • /role -d - Open deletion panel, select file to delete
    • /role -l - Open ROLE management panel

/reindex

Rebuild codebase index.

  • Function: Rescan and index project codebase
  • Prerequisite: Need to enable codebase feature in configuration first
  • Parameters:
    • No parameters: Incremental rebuild, skip unchanged files
    • -force: Force rebuild, delete existing database and rebuild from scratch
  • Use Cases:
    • After codebase update to refresh index
    • Use -force when index is corrupted for complete rebuild
  • Examples:
    • /reindex - Incremental index rebuild
    • /reindex -force - Force complete index rebuild

/codebase

Manage codebase indexing for the current project.

  • Function: Enable, disable, or check the current project's Codebase indexing status
  • Parameters:
    • No parameters: /codebase - Toggle the current state directly
    • on: /codebase on - Enable codebase indexing
    • off: /codebase off - Disable codebase indexing
    • status: /codebase status - Show the current status
  • Prerequisite: Before enabling it, configure embedding-related settings in /home
  • Behavior:
    • Enabling saves the project setting and triggers indexing
    • Disabling stops indexing and file watching
  • Examples:
    • /codebase status - Check status
    • /codebase on - Enable indexing
    • /codebase off - Disable indexing

Configuration and Management Commands

/home

Return to welcome page.

  • Function: Return to Snow CLI main menu/welcome interface
  • Features:
    • Pause codebase indexing
    • Clear API configuration cache
    • Reset client connection
  • Example: Type /home to return to homepage

/ide

Connect IDE plugin.

  • Function: Connect to VSCode or JetBrains IDE plugin
  • Features:
    • Automatically detect and connect IDE
    • Display connection port
    • Force reconnect (if already connected)
  • Prerequisite: Need to install corresponding IDE plugin first
  • Example: Type /ide to establish connection

/connect

Connect to a Snow Instance.

  • Function: Open the instance connection panel, log in, and connect to a remote Snow Instance for AI processing
  • Usage:
    • No parameters: /connect - Open the connection wizard
    • With API URL: /connect http://localhost:5136/api - Open the panel with the API URL prefilled
  • Features:
    • Reuse saved connection settings when available
    • Step through API URL, username/password, instance ID, and display name entry
    • On the saved-config screen, press D to delete the saved connection configuration
  • Panel Operations:
    • Enter - Continue to the next step or submit the current form
    • ↑/↓ - Switch focus between fields on multi-field steps
    • ESC - Go back or close the panel
  • Examples:
    • /connect - Open the connection panel
    • /connect http://localhost:5136/api - Prefill the URL and connect

/disconnect

Disconnect from the current Snow Instance.

  • Function: Disconnect the currently active instance connection
  • Use Cases: Switch instances, clear remote connection state, or stop routing requests through an instance
  • Example: Type /disconnect to disconnect

/connection-status

Show instance connection status.

  • Function: Print the current Snow Instance status, instance information, and any error details when available
  • Use Cases: Troubleshoot connection failures or confirm whether you are connected to the intended instance
  • Example: Type /connection-status to inspect the connection status

/mcp

View MCP services.

  • Function: Open MCP (Model Context Protocol) service panel
  • Features: Display list and status of configured MCP services
  • Example: Type /mcp to view services

/usage

View usage statistics.

  • Function: Open usage statistics panel
  • Features: Display token usage, API call counts and other statistics
  • Example: Type /usage to view statistics

/permissions

Manage tool permissions.

  • Function: Open permissions management panel
  • Features: Manage always-approved tools list, control which tools can execute automatically
  • Use Cases: Need to configure auto-approval permissions for tools, or revoke automatic execution permissions for certain tools
  • Example: Type /permissions to open permissions panel

/auto-format

Toggle auto-formatting after MCP file edits.

  • Function: Enable, disable, or inspect the current project's auto-format status
  • Parameters:
    • No parameters: /auto-format - Toggle the current state directly
    • on: /auto-format on - Enable auto-formatting
    • off: /auto-format off - Disable auto-formatting
    • status: /auto-format status - Show the current status
  • Behavior:
    • The setting is persisted in the project's .snow/settings.json
    • It only affects the current project
    • The default state is enabled
  • Use Cases: Control whether files edited by AI through MCP are automatically formatted afterward
  • Examples:
    • /auto-format - Toggle the current state
    • /auto-format status - Check the status
    • /auto-format off - Turn auto-formatting off

/help

Help information.

  • Function: Open help panel
  • Features: Display shortcuts, common command descriptions
  • Example: Type /help or press ? key

/quit

Exit program.

  • Function: Safely exit Snow CLI application
  • Features:
    • Stop codebase indexing
    • Disconnect VSCode connection
    • Clean up resources
  • Example: Type /quit or press Ctrl+C

/worktree

Git branch management.

  • Function: Open interactive Git branch management panel
  • Features:
    • Automatically detect if current directory is a Git repository
    • Display all local branches with current branch marked
    • Quick branch switching
    • Create new branches
    • Delete branches (supports force deletion of unmerged branches)
    • Prompt to stash changes before switching when local changes conflict
  • Panel Operations:
    • ↑/↓ - Move selection up/down
    • Enter - Switch to selected branch
    • N - Create new branch
    • D - Delete selected branch
    • Y/N - Confirm/cancel deletion or stash-and-switch
    • ESC - Close panel
  • Use Cases: Need to quickly manage Git branches without leaving the terminal
  • Example: Type /worktree to open branch management panel

/add-dir

Add working directory.

  • Function: Add a working directory (supports local directories and SSH remote directories)
  • Usage:
    • No parameters: /add-dir - Open directory management panel
    • With local path: /add-dir /path/to/project - Directly add a local directory
    • Remote directory: Use the panel and press S to enter “Add SSH Remote Directory”, then fill host/port/username/auth method/remote path
  • Configuration File: .snow/working-dirs.json
  • Examples:
    • /add-dir - Open panel (A add local, S add SSH, D delete marked)
    • /add-dir D:\projects\myapp - Add a local directory directly

/backend

View background processes.

  • Function: Open background process management panel
  • Features:
    • Display all commands running in background
    • View process status (running, completed, failed)
    • View process output and runtime duration
    • Support terminating running processes
  • Panel Operations:
    • ↑/↓ - Select process
    • Enter - Terminate selected running process
    • ESC - Close panel
  • Use Cases: Manage long-running commands moved to background via Ctrl+B
  • Example: Type /backend to view background processes

/loop

Create a scheduled loop task.

  • Function: Create a loop task that periodically executes a specified prompt at a fixed interval (session-scoped; stops when Snow CLI exits)
  • Syntax:
    • /loop <duration> <prompt> - Prefix duration format, e.g. /loop 5m check service status
    • /loop <prompt> every <number> <unit> - Suffix format, e.g. /loop check service status every 2 hours
    • Omitting a duration defaults to a 10-minute interval
  • Duration Units:
    • Seconds: s, sec, second, seconds
    • Minutes: m, min, minute, minutes
    • Hours: h, hr, hour, hours
    • Days: d, day, days
    • Compound formats supported: e.g. 8h30m, 1d12h
  • Sub-commands:
    • /loop list - List all active loop tasks
    • /loop cancel <id> or /loop stop <id> - Cancel a specific loop task
    • /loop tasks - Open the task manager and show related tasks
  • Notes:
    • Session-scoped: all loop tasks stop when Snow CLI exits
    • Maximum 50 active loops at a time
    • If the previous task is still running when the interval fires, the new trigger is skipped automatically
  • Examples:
    • /loop 5m check logs for errors - Run every 5 minutes
    • /loop 8h30m generate daily report - Run every 8 hours 30 minutes
    • /loop check service status every 2 hours - Run every 2 hours
    • /loop list - View all active loop tasks
    • /loop cancel abc12345 - Cancel a specific loop task

/profiles

Open the profile and model switching panel.

  • Function: Open the Profile panel to switch configuration profiles and AI model settings
  • Features:
    • Switch between different configuration profiles
    • Switch the AI model in use
    • Support search filtering
    • Switch conversation model in real-time
    • Support switching thinking intensity settings (for models with thinking capabilities)
  • Panel Operations:
    • ↑/↓ - Move selection up/down
    • Tab - Open the detail edit panel for the focused profile (without switching the active profile)
    • Enter - Switch to the selected profile (set as active)
    • Backspace/Delete - Delete the last character of the search query
    • Type characters directly - Filter the profile list by search query
    • ESC - Close panel
  • Use Cases: Use when keyboard shortcuts conflict or are inconvenient; also useful for quickly switching AI models
  • Example: Type /profiles to open the profile and model selection panel

Custom Extension Commands

/custom

Create custom commands.

  • Function: Open custom command configuration panel
  • Features:
    • Create new custom commands
    • Supports two types:
      • execute: Execute command in terminal
      • prompt: Send prompt to AI
    • Supports global and project level
    • Supports additional input: You can add extra arguments after the command, which will be automatically appended to the command or prompt
  • Storage Location:
    • Global: ~/.snow/commands/
    • Project: .snow/commands/
  • Examples:
    • Type /custom to open configuration interface
    • Using additional input: /mycommand extra args - arguments will be appended to the original command or prompt

description (optional)

Custom command JSON supports an optional description field. It is shown in the command panel suggestions (the list you see after typing /) so you can keep prompts readable.

  • Compatibility: If description is missing/empty, Snow CLI falls back to showing command (for type: "prompt" commands, that is the full prompt), so existing command files keep working.
  • How to set: You can enter it when creating a command via /custom; leave it empty to skip.

Example:

{
	"type": "prompt",
	"command": "Summarize the current conversation",
	"description": "Summarize this chat"
}

Namespaced custom commands

Custom commands support a namespaced format: /<namespace>:<command> [args...].

This is useful when you want to organize many commands by feature/team/environment.

Directory mapping (command name is inferred from file path):

  • .snow/commands/build.json -> /build
  • .snow/commands/deploy/stage.json -> /deploy:stage
  • .snow/commands/deploy/prod.json -> /deploy:prod

The same rule applies to the global directory ~/.snow/commands/.

Notes / constraints:

  • Arguments are separated by whitespace: /deploy:stage --dry-run
  • : is reserved as the namespace separator.
  • Namespace uses folder segments separated by /.
  • Namespace segments cannot be . or .., and cannot contain : or \\.
  • The command part cannot contain whitespace, \\, /, or : (and cannot be . or ..).

/skills

Create skill templates.

  • Function: Open skill creation dialog
  • Features:
    • Generate SKILL.md (main document)
    • Generate reference.md (detailed reference)
    • Generate examples.md (usage examples)
    • Create templates/ (template files)
    • Create scripts/ (auxiliary scripts)
  • Storage Location:
    • Global: ~/.snow/skills/
    • Project: .snow/skills/
  • Naming Rules: Lowercase letters, numbers, and hyphens; use / to namespace (max 64 chars per segment)
  • Directory mapping: ~/.snow/skills/<namespace>/<skill>/SKILL.md -> skill id <namespace>/<skill>
  • Example: Type /skills, then enter team/my-skill in the dialog

Deleting Custom Commands/Skills

After creating custom commands, use /<command-name> -d to delete:

  • Delete custom command: /mycommand -d
  • Location Recognition: Automatically recognizes global or project level
  • Example: If created /deploy command, use /deploy -d to delete
  • Namespaced example: If created /deploy:stage command, use /deploy:stage -d to delete

/role-subagent

Sub-agent role definition file management.

  • Function: Manage ROLE files for sub-agents (ROLE-<agentName>.md), defining independent role behavior for each sub-agent
  • Features:
    • Create: /role-subagent - Open an interactive creation panel, select scope then sub-agent
    • Delete: /role-subagent -d or /role-subagent --delete - Open the deletion panel to select a sub-agent role file to delete
    • List: /role-subagent -l or /role-subagent --list - Open the sub-agent role management panel to view and manage existing role files
  • Storage Location:
    • Global: ~/.snow/ROLE-<agentName>.md
    • Project: <project-root>/ROLE-<agentName>.md
  • Priority: When loading custom roles, project-level takes precedence over global-level
  • Panel Operations:
    • Creation Panel:
      1. Select location: G - Global, P - Project, ESC - Cancel
      2. Select sub-agent: ↑/↓ - Navigate, Enter - Select, ESC - Go back
      3. Confirm: Y - Confirm creation, N - Go back
    • Deletion Panel:
      1. Select location: G - Global, P - Project, ESC - Cancel
      2. Select file: ↑/↓ - Navigate, Enter - Select, ESC - Go back
      3. Confirm: Y - Confirm deletion, N - Go back
    • List Panel:
      • Tab - Switch Global / Project
      • ↑/↓ - Move selection
      • D - Delete selected role file (requires confirmation: Y confirm, N/ESC cancel)
      • ESC - Close panel
  • Use Cases: When you need to customize role behavior for specific sub-agents (e.g., explore agent, plan agent, etc.)
  • Examples:
    • /role-subagent - Open creation panel
    • /role-subagent -d - Open deletion panel
    • /role-subagent -l - Open list management panel

/btw

Quick question (side-channel Q&A).

  • Function: Ask a standalone quick question to the AI without affecting the current conversation context
  • Features:
    • Streams the AI response in a side panel
    • Response content is not written to the main conversation history
    • Supports scrolling through the response
  • Panel Operations:
    • Streaming phase: ESC - Abort and close
    • Done phase: ↑/↓ - Scroll through response, Enter - Close, ESC - Close
    • Error phase: Enter - Close, ESC - Close
  • Use Cases: Need to quickly ask a question unrelated to the current task without interrupting the conversation context
  • Example: /btw explain generics in TypeScript

Special Commands

/agent-

Select sub-agent.

  • Function: Open sub-agent selection panel
  • Features: Select different specialized sub-agents (explore, plan, general, etc.)
  • Use Cases: Need specific type of AI assistant
  • Example: Type /agent- to view available agents

/todo-

TODO comment selector.

  • Function: Open TODO comment selection panel
  • Features: Scan and manage TODO comments in code
  • Use Cases: Quickly view and handle TODOs in code
  • Example: Type /todo- to open selector

/skills-

Select and inject a Skill.

  • Function: Open the Skill picker panel and inject the selected Skill's SKILL.md content into the current input box
  • Features:
    • Search by Skill id, name, or description
    • Add extra appended text before injection
    • After injection, the input box shows a placeholder, but the full content is restored when sending
  • Panel Operations:
    • ↑/↓ - Select a Skill
    • Tab - Switch between the “search” and “append text” fields
    • Enter - Inject the currently selected Skill
    • Backspace/Delete - Delete characters from the focused field
    • ESC - Close the panel
  • Use Cases: Reuse an existing Skill template and add task-specific context before sending
  • Example: Type /skills- to open the Skill picker

Keyboard Shortcuts

In addition to slash commands, there are some convenient shortcuts:

  • Ctrl+P: Switch profile
  • Ctrl+L: Clear screen (equivalent to /clear)
  • ESC: Interrupt AI response
  • ?: Open help panel (equivalent to /help)
  • ↑/↓: Browse input history
  • #: Open sub-agent selection panel (type # in input box)
  • >>: Send message to running sub-agents (type >> at the beginning of input box)

Usage Tips

  1. Auto-complete: After typing / all available commands will be displayed, can use arrow keys to select

  2. Command Combinations: Some commands can be combined with modes, for example:

    • Turn on /yolo mode then execute /review for quick code review
    • Turn on /plan mode then execute /init for more detailed project documentation
  3. Custom Workflows: Use /custom to create shortcut commands for common operations

    • For example, create /deploy to execute deployment scripts
    • Create /test to run test commands
  4. Skill Reuse: Use /skills to create reusable task templates

  5. Session Management: Regularly use /export to backup important conversations, use /compact to compress long conversations

Frequently Asked Questions

Q: What if commands don't work?

A: Check the following:

  • Confirm command spelling is correct (case-sensitive)
  • Some commands have prerequisites (like /reindex needs codebase enabled)
  • Check error message prompts

Q: How to view all available commands?

A: Type / and wait, auto-complete list will be displayed, or use /help to view help

Q: Where are custom commands saved?

A:

  • Global commands: ~/.snow/commands/
  • Project commands: <project-root>/.snow/commands/

Q: How to share custom commands between different projects?

A: Choose "global" location when creating commands, or manually copy .snow/commands/ directory to other projects

Related Configuration