Skip to main content
Forge provides a comprehensive command-line interface for managing AI-enhanced terminal sessions, agents, providers, and more.

Command Structure

All Forge commands follow a hierarchical structure:
forge [FLAGS] [SUBCOMMAND] [OPTIONS]

Main Command

Running forge without arguments starts an interactive AI session. See the forge command for details.

Top-Level Commands

Agent

Manage AI agents and list available agents

Provider

Authenticate with API providers and manage credentials

Config

Get, set, or list configuration values

Conversation

Manage conversation history and state

Workspace

Manage workspaces for semantic search

MCP

Manage Model Context Protocol servers

Cmd

Run or list custom commands

Commit

Generate AI-powered git commit messages

Suggest

Get shell command suggestions from natural language

Utility Commands

Information Commands

forge info                    # Show configuration and environment status
forge env                     # Display environment information
forge banner                  # Display version banner
forge list [RESOURCE]         # List various resources

Shell Integration

forge setup                   # Setup ZSH integration
forge doctor                  # Run diagnostics on shell environment
forge zsh [SUBCOMMAND]        # Generate shell extension scripts

Maintenance

forge update                  # Update forge to the latest version
forge vscode install-extension # Install VS Code extension

Global Flags

Many commands support the --porcelain flag for machine-readable output:
forge list agent --porcelain
forge info --porcelain

Common Patterns

Using Conversation IDs

Many commands support --conversation-id or --cid to work with specific conversations:
forge --cid 550e8400-e29b-41d4-a716-446655440000
forge conversation show 550e8400-e29b-41d4-a716-446655440000

Piped Input

Forge supports piped input for various operations:
cat prompt.txt | forge
git diff | forge commit --preview

Output Formats

Use --porcelain for machine-readable output that’s stable across versions:
forge list agent --porcelain | jq
forge info --porcelain

Build docs developers (and LLMs) love