Skip to main content

Quick Setup

After installing Forge using npm or another method, you'll need to configure it to work with your AI provider of choice. This guide will walk you through the essential setup steps.

Setting Up API Credentials

Forge requires an API key to access AI models. Follow these steps to set up your credentials:

  1. Create a .env file in your home directory:
touch ~/.env
  1. Open the .env file in your preferred text editor and add your API key. Here's an example using Open Router (recommended):
# Your API key for accessing AI models
OPENROUTER_API_KEY=<Enter your Open Router Key>

You can get an API key at Open Router.

Supported AI Providers

Forge automatically detects and uses your API keys from environment variables. It checks for keys in the following priority order:

  1. FORGE_KEY - Antinomy's provider (OpenAI-compatible)
  2. OPENROUTER_API_KEY - Open Router provider (aggregates multiple models)
  3. OPENAI_API_KEY - Official OpenAI provider
  4. ANTHROPIC_API_KEY - Official Anthropic provider

To use a specific provider, set the corresponding environment variable in your .env file.

# Examples of different provider configurations (use only one)

# For Open Router (recommended, provides access to multiple models)
OPENROUTER_API_KEY=your_openrouter_key_here

# For official OpenAI
OPENAI_API_KEY=your_openai_key_here

# For official Anthropic
ANTHROPIC_API_KEY=your_anthropic_key_here

# For Antinomy's provider
FORGE_KEY=your_forge_key_here

Starting Forge

Once you've set up your API credentials, you can start Forge by simply typing:

forge

This will launch Forge in its default configuration. You'll see a prompt where you can start entering your tasks.

Basic Commands

Here are a few basic commands to get you started:

  • Type your task in natural language and press Enter to execute
  • Press Ctrl+C to cancel the current operation
  • Press Ctrl+D to exit Forge
  • Type /help to see a list of available commands

Next Steps

Now that you have Forge installed and configured, check out these resources to learn more: