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:
- Create a
.env
file in your home directory:
touch ~/.env
- 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:
FORGE_KEY
- Antinomy's provider (OpenAI-compatible)OPENROUTER_API_KEY
- Open Router provider (aggregates multiple models)OPENAI_API_KEY
- Official OpenAI providerANTHROPIC_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:
- Built-in Commands: Learn about Forge's special commands
- Custom Commands: Discover how to create your own commands
- Operation Modes: Understand the different modes Forge can operate in
- Environment Configuration: Explore advanced configuration options