Skip to main content

Slash commands

Feature Overview: Slash commands are iFlow CLI's built-in control system, providing quick access to various functions and settings.

Learning Time: 15-20 minutes

Prerequisites: iFlow CLI installed and running, familiarity with basic command line operations

What are Slash Commands

Slash commands are special instructions starting with / used to control iFlow CLI's behavior and configuration. These commands can be used anytime during conversations without interrupting the current workflow. Through slash commands, you can manage session state, configure system settings, access tools, and get help information.

Core Features

FeatureDescriptionAdvantage
Instant ExecutionCommands take effect immediately without restartImproves work efficiency
Context PreservationDoesn't interrupt current conversation flowMaintains work continuity
Tab CompletionSupports command and parameter auto-completionReduces input errors
Colored OutputStatus information uses color codingImproves readability
Subcommand StructureComplex commands support hierarchical structureClear functional organization

How It Works

Command Execution Flow

User Input → Command Parsing → Parameter Validation → Function Execution → Result Feedback

[/command args] → [Parser] → [Validator] → [Executor] → [Output]

Command Classification System

  • System Management: System information, configuration management, status monitoring
  • Session Control: Conversation management, history records, state saving
  • Tool Integration: IDE connection, MCP servers, extension management
  • Development Support: Project initialization, debugging support, error reporting

Detailed Feature Description

System Management Commands

CommandFunctionDescription
/aboutSystem informationShows CLI version, operating system, model version and other comprehensive information
/authAuthenticationConfigure or change authentication providers
/themeTheme settingsCustomize CLI appearance theme
/modelModel switchingChange the AI model being used
/editorEditor configurationConfigure preferred external editor
/privacyPrivacy informationShow privacy notices and data processing information

Session Control Commands

CommandFunctionDescription
/chatConversation managementSave, restore, delete conversation checkpoints
/clearClear and resetClear screen and reset conversation history
/compressContent compressionUse AI to compress conversation history into summary
/memoryContent managementInteract with CLI's content system
/restoreState recoveryRestore to previous checkpoint state
/quitExit programExit CLI session and show statistics

Tool Integration Commands

CommandFunctionDescription
/ideIDE integrationDiscover and connect to available IDE servers
/ide-statusIDE statusQuery current IDE connection status
/ide-toolIDE toolsAccess specific IDE integration tools
/mcpMCP managementManage MCP servers, tools and authentication
/toolsTool listList all available built-in CLI tools
/extensionsExtension managementShow currently active extensions and versions

Development Support Commands

CommandFunctionDescription
/initProject initializationAnalyze project and create customized configuration files
/setup-githubGitHub configurationConfigure GitHub Actions workflows
/directoryDirectory managementManage workspace directories for project context
/exportExport functionExport conversation history in various formats
/copyCopy functionCopy last AI response to clipboard

Monitoring and Debugging Commands

CommandFunctionDescription
/statsStatisticsMonitor session usage and performance statistics
/logLog locationShow current session log storage location
/bugError reportingSubmit error report with system information
/helpHelp informationOpen comprehensive help dialog
/docsDocumentation accessOpen complete documentation in browser

Special Feature Commands

CommandFunctionDescription
/vimVim modeToggle vim-style key bindings
/corgiSpecial themeToggle Corgi theme UI mode (easter egg)
/commandsCommand marketplaceManage and install custom commands
/agentsAgent managementManage personal, project and built-in agents

Common Usage Scenarios

System Configuration

/about                      # View system information
/auth # Configure authentication
/model # Switch AI model
/theme # Change theme

Session Management

/chat save project-review   # Save conversation checkpoint
/memory add "Project uses React" # Add memory information
/compress # Compress conversation history
/clear # Clear session

Development Support

/init                       # Initialize project configuration
/ide # Connect IDE
/mcp list # View available tools
/export clipboard # Export conversation to clipboard

Debugging Support

/stats                      # View usage statistics
/log # View log location
/bug "Describe issue" # Submit error report
/help # Get help

Command Features

Smart Completion

FeatureDescriptionExample
Tab completionAuto-complete commands and parameters/chat + Tab
Parameter hintsShow available parameter options/mcp auth + Tab
HistoryRemember commonly used commandsUp/down arrows to browse

Visual Feedback

ColorMeaningPurpose
GreenSuccess/ActiveCommand executed successfully
RedError/FailureError message display
YellowWarning/PendingInformation requiring attention
BlueInformation/DescriptionGeneral information display

Error Handling Mechanism

  • Parameter Validation: Automatically validates command parameter validity
  • Dependency Check: Checks if required dependencies are available
  • Network Handling: Provides retry suggestions when network errors occur
  • Help Prompts: Automatically shows usage help when errors occur

Troubleshooting

Common Issues and Solutions

IssuePossible CauseSolution
Command not recognizedSpelling error or command doesn't existCheck spelling, use /help to view available commands
Invalid parametersIncorrect parameter formatView command help information, use Tab completion
Network connection failedNetwork issues or server unavailableCheck network connection, retry later
Insufficient permissionsMissing necessary system permissionsCheck file permissions or system settings
Configuration file errorIncorrect configuration file formatReconfigure or restore default settings

Diagnostic Steps

  1. Basic Check

    • Confirm command spelling is correct
    • Use /help to view available commands
    • Check parameter format
  2. Network Connection

    • Verify network connection is normal
    • Check firewall settings
    • Confirm server is accessible
  3. Configuration Verification

    • Use /about to view system status
    • Check related configuration files
    • Re-run configuration commands
  4. Error Troubleshooting

    • View detailed error information
    • Use /log to check logs
    • Use /bug to report issues

Platform Compatibility

PlatformSupport LevelSpecial Considerations
WindowsFull supportPaths use backslashes
macOSFull supportMay need system permission authorization
LinuxFull supportDepends on terminal environment configuration