Built-in Commands
Forge offers several built-in commands to enhance your interaction. These commands can be entered directly in the Forge CLI by typing the command name preceded by a forward slash.
/new
Start a new conversation while preserving history.
The /new
command clears the current conversation context and starts a fresh task. This is useful when you've completed your current task and want to begin something entirely different.
When to use: Use this when switching between unrelated tasks to ensure a clean context.
/conversation
Browse and select from your recent conversations.
The /conversation
command displays your last 20 conversations with timestamps and titles, allowing you to interactively select one to resume.
Example output:
❯ /conversation
? Select the conversation to resume:
> Current Time Query 6 days 1h 44m ago
React component refactoring 2 days 3h 15m ago
API error handling fixes 1 week 2 days ago
Database migration setup 1 week 4 days ago
[Type a name or use arrow keys to navigate and Enter to select]
When to use: When you want to return to a previous conversation.
Usage:
- Navigate with arrow keys or type to search
- Press Enter to select a conversation
- The
>
indicator shows your current selection - Each entry shows conversation title and relative time
/info
Display comprehensive system environment and status information.
The /info
command provides a detailed overview of your current Forge environment, including paths, configuration, model settings, token usage, and conversation details.
Example output:
❯ /info
PATHS
Logs: ~/forge/logs
Agents: ~/forge/agents
History: ~/forge/.forge_history
Checkpoints: ~/forge/snapshots
Policies: ~/forge/permissions.yaml
ENVIRONMENT
Version: 0.1.0
Working Directory: ~/Desktop/workspace/antinomyhq.github.io
Shell: /bin/zsh
Git Branch: docs/add-shortcut-for-exit-command
MODEL
Current: anthropic/claude-sonnet-4
Provider (URL): https://openrouter.ai/api/v1/
API Key: sk-or-v1-9999...9999
TOKEN USAGE
Input Tokens: 17,860
Cached Tokens: 7,720 [43%]
Output Tokens: 356
Cost: $0.0023
CONVERSATION
ID: 1b15bef2-128c-4ff1-9c78-45feef4a9076
Title: Exit Command Documentation Update
Output sections explained:
-
PATHS: File system locations for Forge components
Logs
: Where system and error logs are storedAgents
: Directory containing agent configurationsHistory
: Command history file for session recallCheckpoints
: Saved conversation snapshots and statePolicies
: Permission and access control configuration file
-
ENVIRONMENT: Current system and project context
Version
: Forge application version numberWorking Directory
: Current project/working directory pathShell
: Command shell being used (bash, zsh, etc.)Git Branch
: Active git branch in the working directory (if applicable)
-
MODEL: AI model configuration and credentials
Current
: Active AI model being used for conversationsProvider (URL)
: API endpoint URL for the model providerAPI Key
: Masked API key for security (shows first/last characters only)
-
TOKEN USAGE: Resource consumption and costs accumulated for the entire conversation
Input Tokens
: Total tokens consumed by user input and context across all messagesCached Tokens
: Previously processed tokens reused for efficiency (percentage shown)Output Tokens
: Total tokens generated in AI responses throughout the conversationCost
: Total estimated monetary cost based on accumulated token usage
-
CONVERSATION: Current chat session details
ID
: Unique identifier for the current conversationTitle
: Human-readable name or high level description of the conversation
When to use: Use this when you need to troubleshoot, find configuration files, check token usage, verify your current model setup, or get an overview of your Forge environment.
/retry
Retry the last message in the conversation.
The /retry
command re-executes the most recent message in the conversation. This is useful when a command failed due to temporary issues or when you want to run the same operation again.
When to use: Use this when you want to re-run the last command that failed due to network issues, temporary errors, or when you need to execute the same operation multiple times.
/model
Switch to a different model.
The /model
command allows you to interactively select from available AI models and set your preferred model in the project's forge.yaml configuration file.
This will:
- Display an interactive selection menu with all available models
- Update the standard_model anchor in your forge.yaml file with your selection
- Confirm the change with a success message
The model choice will persist between sessions as it's stored in your configuration file.
When to use: Use this when you want to change which AI model Forge uses for processing your requests.
/agent
Switch between different AI agents.
The /agent
command provides an interactive interface to select and switch between different specialized agents in Forge. Use this command to change which agent handles your requests and see available options.
This will:
-
Display an interactive selection menu with available agents:
- Forge Agent: Full execution capabilities with read-write access
- Muse Agent: Read-only analysis and planning mode
-
Switch to the selected agent for the current session
When to use: Use this when you want to switch between agents or when you're unsure which agent is currently active. This is an alternative to using the specific /forge
or /muse
commands.
/dump
Save conversation as JSON or HTML.
The /dump
command saves the current conversation to a file for future reference. By default, it saves in JSON format, but you can specify HTML format using /dump html
.
Usage:
/dump
- Saves as JSON format/dump html
- Saves as HTML format
When to use: Use this when you need to debug issues, inspect the conversation context, or report problems to the development team.
/forge
Enable implementation mode with code changes.
The /forge
command (also available as /act
) switches to Forge Agent, where it can execute commands and implement changes.
When to use: This is the default agent. Use this command to switch back to the Forge Agent if you were previously using the Muse Agent.
/muse
Enable planning mode without code changes.
The /muse
command (also available as /plan
) switches to the Muse Agent, where it analyzes and suggests changes without modifying files.
When to use: Use this when you want to analyze your codebase and suggest changes without actually implementing them. This is useful for understanding what would happen before making changes.
/compact
Compact the conversation context.
The /compact
command reduces the conversation context by summarizing or removing older messages to optimize memory usage and performance.
When to use: Use this when you have a long conversation and want to reduce context size while preserving important information.
/help
Display all available commands.
The /help
command prints a list of all available Forge commands with their descriptions, providing a quick reference for command usage.
When to use: Use this when you need to see what commands are available or want a quick reference of Forge's built-in functionality.
/tools
List all available tools with their descriptions and schema.
The /tools
command displays a comprehensive list of all available tools, including their descriptions and schema information.
When to use: Use this when you want to see what tools are available or need to understand tool capabilities and parameters.
/update
Updates to the latest compatible version of forge.
The /update
command updates Forge to the latest compatible version available.
When to use: Use this when you want to update to the newest version of Forge with the latest features and bug fixes.
/exit
Exit the application.
The /exit
command terminates the Forge application. You can also use Ctrl+D
as a keyboard shortcut to exit.
When to use: Use this when you want to quit Forge completely.