Skip to main content

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.

Available Commands

/new - Start a new task when you've completed your current one

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.

Usage:

/new

When to use: Use this when switching between unrelated tasks to ensure a clean context.

/info - View environment summary, logs folder location, and command history

The /info command displays information about your environment, including system details, logs location, and command history.

Usage:

/info

This will display information about your environment including:

  • Operating system details
  • Current working directory
  • Log file location
  • Application version
  • Available models

When to use: Use this when you need to troubleshoot, find log files, or review your recent commands.

/model - Select and set a specific model in your forge.yaml configuration

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.

Usage:

/model

This will:

  1. Display an interactive selection menu with all available models
  2. Update the standard_model anchor in your forge.yaml file with your selection
  3. 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 - Select and switch between available agents

The /agent command provides an interactive interface to select and switch between different specialized agents in Forge.

Usage:

/agent

This will:

  1. 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
  2. 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 the current conversation in JSON format to a file for reference

The /dump command saves the current conversation in JSON format to a file for future reference.

Usage:

/dump

When to use: Use this when you need to debug issues, inspect the conversation context, or report problems to the development team.

/forge - Switch to Forge Agent (default), where it can execute commands and implement changes.

The /forge command switches to Forge Agent, where it can execute commands and implement changes.

Usage:

/forge

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 - Switch to Muse Agent, where it analyzes and plans but doesn't modify files

The /muse command switches to the Muse Agent, where it analyzes and suggests changes without modifying files.

Usage:

/muse

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.

Native Shell Commands

Forge allows you to execute native shell commands directly from the CLI by prefixing them with !:

!ls -la
!git status
!npm install

These commands will be executed in your current working directory, and their output will be displayed in the console.

Usage Examples

To use any of these commands, simply type them in the Forge CLI:

/info

For native shell commands, prefix with !:

!git status