Skip to content

Latest commit

 

History

History
449 lines (323 loc) · 15.7 KB

File metadata and controls

449 lines (323 loc) · 15.7 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

/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

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

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

/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

/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

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

/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

/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

/add-dir

Add working directory.

  • Function: Add project directory to working directory list
  • Usage:
    • No parameters: /add-dir - Open directory management panel
    • With path: /add-dir /path/to/project - Directly add directory
  • Configuration File: .snow/working-dirs.json
  • Examples:
    • /add-dir - Open panel for management
    • /add-dir D:\projects\myapp - Add 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

/profiles

Open the profile switch panel.

  • Function: Open the Profile selection panel (used to switch configuration profiles)
  • Use Cases: Use when keyboard shortcuts conflict or are inconvenient
  • Example: Type /profiles to open the profile 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
  • Storage Location:
    • Global: ~/.snow/commands/
    • Project: .snow/commands/
  • Example: Type /custom to open configuration interface

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

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

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

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