Skip to content

Slash Commands

Slash commands provide quick access to SII CLI features during interactive sessions. Commands can be built-in (provided by SII CLI) or custom (user-defined).

Built-in Slash Commands

Session Management

CommandPurpose
/help or /?Display help information and available commands
/newStart a new conversation session (ends current session and preserves history)
/clearClear the screen and start a new session (alias for /new)
/quit or /exitExit the interactive session
/compress or /summarizeCompress context by replacing it with a summary

Chat History

CommandPurpose
/chat listList saved conversation checkpoints
/chat save <tag>Save the current conversation as a checkpoint
/chat resume <tag> or /chat load <tag>Resume a conversation from a checkpoint

Configuration

CommandPurpose
/config init [--global|-g] [--overwrite|--merge]Initialize configuration file
/config wizard [--global|-g]Interactive configuration wizard
/config quick-start <scenario>Quick configuration for common scenarios (development, production, minimal)
/config templateShow complete configuration template with all available options
/config list [scope] [category]Show current configuration settings
/config get <key> [scope]Get a specific configuration value
/config set <key> <value> [scope]Set a configuration value
/config reset [scope]Reset configuration to defaults
/config pathShow configuration file paths
/config help <key>Show detailed help for a specific configuration key
/config validateValidate current configuration and provide optimization suggestions
/config statusCheck configuration status and get recommendations
/config env-statusCheck SII environment variables status
/config env-guideShow environment variables setup guide
/config migrate [--auto]Show migration guide from legacy environment variables to SII_ prefixed ones
/config persistPersist current SII environment variables to shell configuration file
/config auth-statusCheck authentication status and connection health
/config migrate-to-envMigrate environment variables from shell config to .env file
/config env-file-statusCheck .env file status and environment variable configuration
/config reload-envReload .env file and sync to current process environment variables
/config sync-envForce sync all SII environment variables to current process
/config migrate-to-globalMigrate existing configuration to global config directory (~/.sii/.env)
/config config-statusShow detailed configuration status and hierarchy information
/config ide-port [status|set <port>|migrate]Manage IDE port configuration

Model Management

CommandPurpose
/modelShow current model
/model <model_name>Switch to specified model (e.g., openai/gpt-4o, anthropic/claude-3.5-sonnet, gemini-2.0-flash)

Memory Management

CommandPurpose
/memory showShow the current memory contents
/memory add <text>Add content to the memory
/memory refreshRefresh the memory from source files

Prompt Management

CommandPurpose
/prompt showDisplay the prompt currently used by this session
/prompt enableEnable the user prompt file for this session
/prompt disableDisable the user prompt file and revert to the default prompt
/prompt editOpen the prompt file in your default editor
/prompt set --file <path>Set a custom prompt file for this session
/prompt resetReset to the default prompt

MCP (Model Context Protocol)

CommandPurpose
/mcp listList all configured MCP servers
/mcp status [server_name]Show status of MCP servers
/mcp install <preset> [options]Install an MCP server from preset
/mcp remove <server_name>Remove an MCP server configuration
/mcp presetsList available MCP server presets
/mcp preset <name>Show details of a specific preset
/mcp tools [server_name]List tools provided by MCP servers
/mcp prompts [server_name]List prompts provided by MCP servers

Remote Sessions

CommandPurpose
/connectCreate a SII session and connect via WebSocket
/remote statusShow remote handle status
/remote start [handle]Start a remote handle
/remote stopStop the remote handle
/remote qrDisplay QR code for remote connection

Statistics & Information

CommandPurpose
/statsCheck session statistics
/stats modelShow model-specific usage statistics
/stats toolsShow tool-specific usage statistics
/aboutShow version and system information
/toolsList available tools and their status

Workspace Initialization

CommandPurpose
/init [--json|--scan-only|--file <path>]AI-guided workspace exploration and snapshot

Options:

  • --json: Output snapshot in JSON format
  • --scan-only or --summary: Show summary without AI analysis
  • --file <path>: Specify target file for notes (default: SII.md)

UI & Display

CommandPurpose
/themeChange the UI theme
/editorConfigure the default editor
/privacyView and update privacy settings
/authChange the authentication method
/vimEnter vim mode for alternating insert and command modes
/corgiToggle corgi mode (easter egg)

Utilities

CommandPurpose
/copyCopy the last response to clipboard
/bugReport a bug (sends conversation to developers)
/docsOpen documentation in browser
/extensionsManage SII CLI extensions
/ideManage IDE integration settings
/restoreRestore a previous session
/resumeResume the most recent session (shortcut for /restore)
/uploadConfigure trajectory upload settings
/gh-issueCreate a GitHub Issue (requires GitHub MCP server configuration)

Custom Slash Commands

Custom slash commands allow you to define frequently-used prompts as TOML files that SII CLI can execute. Commands are organized by scope (project-specific or personal).

Syntax

/<command-name> [arguments]

Parameters

ParameterDescription
<command-name>Name derived from the TOML filename (without .toml extension)
[arguments]Optional arguments passed to the command

Command Types

Project Commands

Commands stored in your repository and shared with your team.

Location: .sii/commands/

Example - Create the /optimize command:

bash
# Create a project command directory
mkdir -p .sii/commands

# Create a command file
cat > .sii/commands/optimize.toml << 'EOF'
name = "optimize"
description = "Analyze code for performance issues"
prompt = """
Analyze this code for performance issues and suggest optimizations:
- Identify bottlenecks
- Suggest algorithmic improvements
- Recommend caching strategies
"""
EOF

Personal Commands

Commands available across all your projects.

Location: ~/.sii/commands/

Example - Create the /security-review command:

bash
# Create a personal command directory
mkdir -p ~/.sii/commands

# Create a command file
cat > ~/.sii/commands/security-review.toml << 'EOF'
name = "security-review"
description = "Review code for security vulnerabilities"
prompt = """
Review this code for security vulnerabilities:
- Check for injection attacks
- Validate input sanitization
- Review authentication/authorization
- Check for sensitive data exposure
"""
EOF

Command File Format

Custom commands are defined in TOML files with the following structure:

toml
name = "command-name"
description = "Brief description of what the command does"
prompt = """
The prompt text that will be sent to the AI model.
Can be multi-line and include placeholders.
"""

# Optional: Specify allowed arguments
[args]
arg1 = "Description of first argument"
arg2 = "Description of second argument"

# Optional: Command metadata
[metadata]
author = "Your Name"
version = "1.0.0"
tags = ["code-review", "security"]

Features

Namespacing

Organize commands in subdirectories for better organization:

bash
.sii/commands/
├── frontend/
   ├── component.toml
   └── style.toml
└── backend/
    ├── api.toml
    └── database.toml

Commands are invoked by their filename, not their directory path:

  • /component - invokes frontend/component.toml
  • /api - invokes backend/api.toml

Arguments

Pass dynamic values to commands:

toml
name = "fix-issue"
description = "Fix a specific issue"
prompt = """
Fix issue #{{ISSUE_NUMBER}} following our coding standards.
Priority: {{PRIORITY}}
"""

[args]
ISSUE_NUMBER = "Issue number to fix"
PRIORITY = "Priority level (high, medium, low)"

Usage:

bash
/fix-issue ISSUE_NUMBER=123 PRIORITY=high

Discovery

Custom commands are automatically discovered and loaded when SII CLI starts. They appear in the /help output alongside built-in commands.

To refresh custom commands without restarting:

bash
/memory refresh

Command Completion

Many commands support tab completion for arguments:

  • /model <TAB> - Shows available models
  • /chat resume <TAB> - Shows saved conversation tags
  • /mcp install <TAB> - Shows available MCP presets

Tips

  1. Quick Help: Type /help or /? to see all available commands
  2. Command History: Use arrow keys to navigate through command history
  3. Multi-line Input: Press Shift+Enter for multi-line input (if terminal supports it)
  4. Aliases: Some commands have shorter aliases (e.g., /clear = /new, /? = /help, /resume = /restore)
  5. Tab Completion: Use Tab key for command and argument completion
  6. Session Persistence: Use /chat save to save important conversations
  7. Custom Commands: Create project-specific commands in .sii/commands/ for team workflows
  8. Quick Resume: Use /resume to quickly restore the most recent session without selection
  9. GitHub Integration: Use /gh-issue to create GitHub Issues directly from CLI (requires GitHub MCP server configuration)

Examples

Basic Session Management

bash
# Start a new session
/new

# Save current conversation
/chat save important-discussion

# Resume a saved conversation
/chat resume important-discussion

# Quick resume the most recent session
/resume

# Restore a previous session (interactive selection)
/restore

# Compress context to save tokens
/compress

Configuration Management

bash
# Initialize project configuration
/config init

# Set API key
/config set api.openaiApiKey "your-api-key"

# Switch model
/model openai/gpt-4o

# Check configuration status
/config status

Memory Management

bash
# Show current memory
/memory show

# Add important information
/memory add "Project uses React 18 with TypeScript"

# Refresh memory from files
/memory refresh

MCP Integration

bash
# List available presets
/mcp presets

# Install GitHub MCP server
/mcp install github token=ghp_xxx

# List tools from GitHub server
/mcp tools github

# Check server status
/mcp status

# Create a GitHub Issue using MCP
/gh-issue
# Note: Requires GitHub MCP server to be configured first

Workspace Initialization

bash
# Initialize workspace with AI guidance
/init

# Get JSON snapshot only
/init --json

# Scan without AI analysis
/init --scan-only

# Use custom target file
/init --file NOTES.md

See Also

Released under the MIT License.