Slash Commands
Slash commands are special commands in Interactive Mode that start with a forward slash. They perform specific actions like setting the API key, clearing history, or getting help.
What are Slash Commands?
Slash commands are shortcuts for common actions in Zcrafter. Instead of typing a natural language question, you type a command that starts with a forward slash.
Example:
/helpThis displays help information without needing to ask "Can you help me?" or "Show me help."
Available Slash Commands
/api key
Set your OpenRouter API key for the current session.
Usage:
/api key sk-or-...What it does:
- Stores the API key in memory for this session
 - Used by the CLI to contact the AI provider
 
When to use:
- First time using Zcrafter
 - When changing keys
 
/model
Select the model for responses.
Usage:
/model openai/gpt-4oWhat it does:
- Sets the active model
 
/help
Display help information and available commands.
Usage:
/helpWhat it does:
- Shows list of available slash commands
 - Displays usage information
 - Provides helpful tips
 
Output includes:
- All available slash commands
 - Brief description of each command
 - Examples of natural language commands
 
Example:
/help
Zcrafter Help
Slash Commands:
  /api key  - Set session API key
  /model    - Set active model
  /help     - Show this help
  /clear    - Clear conversation history
  /exit     - Exit Zcrafter
Natural Language:
  Just type your question in plain English!
  Example: "What is a S0C7 error?"/clear
Clear the conversation history in the current session.
Usage:
/clearWhat it does:
- Removes all previous messages from the current session
 - Clears the screen
 - Starts fresh conversation
 - Does not affect authentication
 
When to use:
- Starting a new topic
 - Screen is too cluttered
 - Starting a different task
 
Example:
/clear
Conversation history cleared./exit
Exit Zcrafter and return to your terminal.
Usage:
/exitAlso works:
/quit- Ctrl+C (press twice)
 
What it does:
- Closes the Interactive Mode
 - Returns you to your shell prompt
 - Does not log you out (token remains valid)
 
Example:
/exit
Thank you for using Zcrafter!How to Use Slash Commands
Basic Usage
- Type the forward slash
 - Type the command name
 - Press Enter
 
/helpCommands are Case-Insensitive
These all work the same:
/help
/HELP
/HelpNo Spaces After Slash
Correct:
/loginIncorrect:
/ login     (won't work)Slash Commands vs Natural Language
| Aspect | Slash Commands | Natural Language | 
|---|---|---|
| Format | /command | Plain English | 
| Purpose | Specific actions | Questions, analysis, help | 
| Examples | /login, /help | "Analyze this code", "What is VSAM?" | 
| Response | Immediate action | AI-generated answer | 
| Best for | Quick actions | Learning, debugging | 
When to use slash commands:
- Logging in/out
 - Clearing screen
 - Getting help
 - Exiting the program
 
When to use natural language:
- Asking questions
 - Analyzing code
 - Learning concepts
 - Debugging issues
 
Command Reference Table
| Command | Description | Example Output | 
|---|---|---|
/api key | Set session API key | "✓ API key set" | 
/model | Set model | "Model set to openai/gpt-4o" | 
/help | Show available commands | List of commands and usage | 
/clear | Clear conversation history | "Conversation history cleared" | 
/exit | Exit Zcrafter | Returns to shell prompt | 
Common Use Cases
Starting a New Session
/clear
What is a S0C7 error?Set API key and ask a question
/api key sk-or-...
Explain what COBOL isGetting Unstuck
/help
[Review available commands]
/clear
[Start fresh]Ending Your Session
/exitKeyboard Shortcuts
While not technically slash commands, these keyboard shortcuts are useful in Interactive Mode:
| Shortcut | Action | 
|---|---|
| Ctrl+C (twice) | Exit Zcrafter | 
| Up Arrow | Previous command in history | 
| Down Arrow | Next command in history | 
Troubleshooting Slash Commands
Command Not Recognized
If you see "Command not recognized":
Check spelling:
/hlep          (typo)
/help          (correct)Remove extra spaces:
/ login        (space after slash)
/login         (correct)/login Not Opening Browser
If /login doesn't open your browser:
- Check your default browser is set
 - Copy the URL shown in terminal and open manually
 - Check your firewall settings
 
/clear Not Working
If /clear doesn't clear the screen, try using Ctrl+L as an alternative (works in some terminals).
/exit Hangs
If /exit doesn't work:
- Try 
/quit - Press Ctrl+C twice
 
Tips
- Use /help when stuck: If you forget available commands, type 
/help - Clear before sensitive work: Use 
/clearbefore pasting sensitive information - Exit cleanly: Use 
/exitinstead of forcing terminal close 
Next Steps
- Learn about Natural Language Commands
 - Review Authentication for detailed auth information
 - Check Troubleshooting for common issues