Skip to main content

Quick Install

The fastest way to install Forge is using our installation script:
curl -fsSL https://forgecode.dev/cli | sh
This script automatically:
  • Detects your operating system and architecture
  • Downloads the appropriate binary
  • Installs Forge to your system
  • Sets up necessary permissions
The installation script supports macOS, Linux, and Windows (via WSL).

Installation Methods

Provider Setup

After installing Forge, you need to configure an AI provider. Forge supports multiple providers including OpenAI, Anthropic, Google Vertex AI, and more.

Interactive Configuration

The easiest way to configure providers is using the interactive login:
forge provider login
This command will:
  1. Show you a list of available providers
  2. Prompt for required credentials (API keys, tokens, etc.)
  3. Securely store credentials in file-based storage
  4. Validate the configuration
1

Run provider login

forge provider login
2

Select your provider

Choose from the list of supported providers:
  • OpenAI
  • Anthropic
  • Google Vertex AI
  • OpenRouter
  • Cerebras
  • And more…
3

Enter credentials

Provide your API key or authentication token when prompted.
4

Verify setup

forge info
This shows your current configuration and active provider.

Supported Providers

Configure OpenAI for access to GPT models:
forge provider login
# Select OpenAI and enter your API key
Then set your preferred model:
forge config set model o3-mini-high
Get your API key from platform.openai.com.
Configure Anthropic for Claude models:
forge provider login
# Select Anthropic and enter your API key
Set the model:
forge config set model claude-3.7-sonnet
Get your API key from console.anthropic.com.
Configure Google Vertex AI for Gemini and Claude models:
1

Install and authenticate with gcloud

gcloud auth login
gcloud config set project YOUR_PROJECT_ID
2

Get authentication token

gcloud auth print-access-token
3

Configure Forge

forge provider login
# Select Google Vertex AI
# Enter your project ID, location, and auth token
4

Set model

forge config set model google/gemini-2.5-pro
Available models:
  • Gemini: gemini-2.5-pro, gemini-2.0-flash
  • Claude: claude-sonnet-4@20250514
Access multiple models through a single API:
forge provider login
# Select OpenRouter and enter your API key
Get your API key from openrouter.ai.
Forge supports many other providers:
  • Cerebras: High-performance inference
  • Groq: Fast LLM inference
  • x.ai: Grok models
  • Amazon Bedrock: Via Bedrock Access Gateway
  • OpenAI-compatible: Any OpenAI API-compatible endpoint
Use forge list provider to see all available providers.

Verify Installation

After installation and configuration, verify everything is working:
forge --version

Shell Integration (Optional)

Enhance your terminal experience with Forge’s ZSH integration:
forge setup
This command:
  • Installs the ZSH plugin for command shortcuts
  • Sets up the ZSH theme with model/cost display
  • Configures keyboard shortcuts
  • Enables natural language command transformation
Shell integration is currently available for ZSH. Bash and Fish support coming soon.

What You Get

  • Command shortcuts: Type # your natural language command and press Enter
  • Visual feedback: See current model and conversation cost in your prompt
  • Keyboard shortcuts: Quick access to Forge commands
  • Tab completion: Auto-complete for all Forge commands

Next Steps

Quick Start Guide

Learn the basics and start your first session

Configure Providers

Deep dive into provider configuration

Shell Integration

Set up ZSH plugin and theme

Command Reference

Explore all available commands

Troubleshooting

The installation directory is not in your PATH.Solution: Add the installation directory to your PATH:
echo 'export PATH="$HOME/.forge/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
Invalid API key or token.Solution: Verify your credentials and re-run:
forge provider logout
forge provider login
The binary doesn’t have execute permissions.Solution: Make the binary executable:
chmod +x /path/to/forge
Certificate verification issues.Solution: Check system time and update CA certificates:
# macOS
brew upgrade ca-certificates

# Linux (Ubuntu/Debian)
sudo apt-get update && sudo apt-get install ca-certificates

Updating Forge

Keep Forge up to date with the latest features and improvements:
forge update
This command checks for the latest release and prompts you to install it.
Use forge update --no-confirm to skip the confirmation prompt.

Build docs developers (and LLMs) love