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
| Feature | Description | Advantage |
|---|---|---|
| Instant Execution | Commands take effect immediately without restart | Improves work efficiency |
| Context Preservation | Doesn't interrupt current conversation flow | Maintains work continuity |
| Tab Completion | Supports command and parameter auto-completion | Reduces input errors |
| Colored Output | Status information uses color coding | Improves readability |
| Subcommand Structure | Complex commands support hierarchical structure | Clear 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
| Command | Function | Description |
|---|---|---|
/about | System information | Shows CLI version, operating system, model version and other comprehensive information |
/auth | Authentication | Configure or change authentication providers |
/theme | Theme settings | Customize CLI appearance theme |
/model | Model switching | Change the AI model being used |
/editor | Editor configuration | Configure preferred external editor |
/privacy | Privacy information | Show privacy notices and data processing information |
/language | Language settings | Switch CLI interface language (zh-CN/en-US) |
/output-style | Output style | Set AI output style and format |
/output-style:new | Create output style | Create new AI output style based on description |
/update | Software update | Check and update CLI to latest version |
Session Control Commands
| Command | Function | Description |
|---|---|---|
/chat | Conversation management | Save, restore, delete conversation checkpoints |
/clear | Clear and reset | Clear screen and reset conversation history |
/compress | Content compression | Use AI to compress conversation history into summary |
/memory | Content management | Interact with CLI's content system |
/restore | State recovery | Restore to previous checkpoint state |
/resume | Session resume | Resume previous conversation session |
/quit | Exit program | Exit CLI session and show statistics |
/cleanup-history | Cleanup history | Open dialog to clean up conversation history records |
/cleanup-checkpoint | Cleanup checkpoint | Open dialog to clean up conversation checkpoints |
Tool Integration Commands
| Command | Function | Description |
|---|---|---|
/ide | IDE integration | Discover and connect to available IDE servers |
/mcp | MCP management | Manage MCP servers, tools and authentication |
/tools | Tool list | List all available built-in CLI tools |
/extensions | Extension management | Show currently active extensions and versions |
Development Support Commands
| Command | Function | Description |
|---|---|---|
/init | Project initialization | Analyze project and create customized configuration files |
/setup-github | GitHub configuration | Configure GitHub Actions workflows |
/directory | Directory management | Manage workspace directories for project context |
/export | Export function | Export conversation history in various formats |
/copy | Copy function | Copy last AI response to clipboard |
/demo | Demo mode | Launch interactive demo and tutorial mode |
/qa | Q&A assistant | Knowledge base-based intelligent Q&A assistant (aliases: /wenwen, /question, /guide) |
Monitoring and Debugging Commands
| Command | Function | Description |
|---|---|---|
/stats | Statistics | Monitor session usage and performance statistics |
/log | Log location | Show current session log storage location |
/bug | Error reporting | Submit error report with system information |
/help | Help information | Open comprehensive help dialog |
/docs | Documentation access | Open complete documentation in browser |
Special Feature Commands
| Command | Function | Description |
|---|---|---|
/vim | Vim mode | Toggle vim-style key bindings |
/corgi | Special theme | Toggle Corgi theme UI mode (easter egg) |
/commands | Command marketplace | Manage and install custom commands |
/agents | Agent management | Manage personal, project and built-in agents |
/terminal-setup | Terminal setup | Configure terminal key bindings to support multi-line input |
Common Usage Scenarios
System Configuration
/about # View system information
/auth # Configure authentication
/model # Switch AI model
/theme # Change theme
Session Management
/chat list # List all saved conversations
/chat save project-review # Save conversation checkpoint
/chat resume project-review # Restore specified conversation
/chat delete project-review # Delete specified conversation
/memory show # Show current memory content
/memory add "Project uses React" # Add memory information
/memory refresh # Refresh memory content
/memory list # List memory file list
/compress # Compress conversation history
/clear # Clear session
/resume # Resume previous session
Development Support
/init # Initialize project configuration
/ide # Connect IDE
/mcp list # List all MCP servers
/mcp auth <server> # Configure MCP server authentication
/mcp online # Browse online MCP servers
/mcp refresh # Refresh MCP server connections
/directory add <path> # Add workspace directory
/directory show # Show current workspace directories
/export clipboard # Export conversation to clipboard
/export file # Export conversation to file
Debugging Support
/stats # View session statistics
/stats model # View model usage statistics
/stats tools # View tool usage statistics
/log # View log location
/bug "Describe issue" # Submit error report
/help # Get help
System and Interface Configuration
/language zh-CN # Switch to Chinese interface
/language en-US # Switch to English interface
/output-style professional # Use professional output style
/output-style:new "Concise style" # Create new output style
/update # Check and update CLI version
Conversation and History Management
/cleanup-history # Clean up conversation history records
/cleanup-checkpoint # Clean up conversation checkpoints
/demo # Launch demo mode
/qa "How to use MCP?" # Knowledge base-based Q&A
/agents list # List all available agents
/agents refresh # Refresh agent list
/agents online # Browse online agent marketplace
/agents install # Install agent
/commands list # List local custom commands
/commands online # Browse online command marketplace
/commands get <id> # Get command with specified ID
/terminal-setup # Configure terminal to support multi-line input
Command Features
Smart Completion
| Feature | Description | Example |
|---|---|---|
| Tab completion | Auto-complete commands and parameters | /chat + Tab |
| Parameter hints | Show available parameter options | /mcp auth + Tab |
| History | Remember commonly used commands | Up/down arrows to browse |
Visual Feedback
| Color | Meaning | Purpose |
|---|---|---|
| Green | Success/Active | Command executed successfully |
| Red | Error/Failure | Error message display |
| Yellow | Warning/Pending | Information requiring attention |
| Blue | Information/Description | General 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
| Issue | Possible Cause | Solution |
|---|---|---|
| Command not recognized | Spelling error or command doesn't exist | Check spelling, use /help to view available commands |
| Invalid parameters | Incorrect parameter format | View command help information, use Tab completion |
| Network connection failed | Network issues or server unavailable | Check network connection, retry later |
| Insufficient permissions | Missing necessary system permissions | Check file permissions or system settings |
| Configuration file error | Incorrect configuration file format | Reconfigure or restore default settings |
Diagnostic Steps
-
Basic Check
- Confirm command spelling is correct
- Use
/helpto view available commands - Check parameter format
-
Network Connection
- Verify network connection is normal
- Check firewall settings
- Confirm server is accessible
-
Configuration Verification
- Use
/aboutto view system status - Check related configuration files
- Re-run configuration commands
- Use
-
Error Troubleshooting
- View detailed error information
- Use
/logto check logs - Use
/bugto report issues
Platform Compatibility
| Platform | Support Level | Special Considerations |
|---|---|---|
| Windows | Full support | Paths use backslashes |
| macOS | Full support | May need system permission authorization |
| Linux | Full support | Depends on terminal environment configuration |