Setting Up AI Providers
CmdForge is the brain, but AI providers are the muscle. Before your tools can do anything smart, you need at least one provider configured. The good news? CmdForge makes provider setup painless—whether you prefer a graphical wizard or the command line.
What You'll Learn
- Using the visual provider installer (GUI)
- Using the command-line installer
- Available provider options and their tradeoffs
- Testing your provider setup
- Managing multiple providers
Visual Installer (GUI)
The friendliest way to install providers—a point-and-click wizard right in the desktop app:
- Launch CmdForge:
cmdforge - Go to Tools → Install AI Provider... (or click "Install Provider..." on the Providers page)
- Select a provider from the list
- Click Install Selected
- Watch the installation progress in real-time
- Choose which model variants to add
The installer shows you:
- Which providers are already installed (marked in green)
- Cost information for each provider
- Available models you can use
- Live installation output so you know what's happening
After installation, the wizard offers to add provider variants (like claude-haiku,
claude-opus) to your configuration automatically.
Command-Line Installer
Prefer the terminal? Use the interactive CLI installer:
cmdforge providers install
You'll see a menu of available provider groups:
============================================================
CmdForge Provider Installation Guide
============================================================
Available AI Provider Groups:
1. OpenCode
Cost: FREE tier available (4 models)
Models: opencode-pickle, opencode-deepseek, opencode-claude, ...
2. Claude (Anthropic)
Cost: Pay per token
Models: claude-haiku, claude-sonnet, claude-opus
3. Ollama (Local)
Cost: FREE (runs on your machine)
Models: ollama-llama, ollama-mistral, ollama-codellama
4. OpenAI
Cost: Pay per token
Models: openai-gpt4, openai-gpt35
0. Cancel
Select a provider to install (1-4, or 0 to cancel):
Select a provider, and CmdForge will:
- Show you the installation command
- Offer to run it for you
- Guide you through any post-install setup
Choosing a Provider
Best for Getting Started: OpenCode
- 4 FREE models included
- No API key required for free tier
- One command install
- Web UI for model management
Install: Option 1 in the installer
Best for Privacy: Ollama
- Runs 100% locally
- No data leaves your machine
- Free forever
- Great for sensitive content
Install: Option 3 in the installer
Best Quality: Claude
- State-of-the-art reasoning
- Long context windows
- Excellent for complex tasks
- Pay per use
Install: Option 2 in the installer
Most Flexible: OpenAI
- Wide ecosystem support
- Fast response times
- Reliable infrastructure
- Pay per use
Install: Option 4 in the installer
Testing Your Setup
After installation, verify everything works:
# Test a specific provider
cmdforge providers test opencode-pickle
# The test sends a simple prompt and shows the response
# You should see something like:
# Testing provider: opencode-pickle
# Sending test prompt...
# ✓ Provider responded successfully!
# Response: "Hello! I'm working correctly."
Viewing Configured Providers
# List all providers and their status
cmdforge providers list
Output:
Configured providers:
NAME COMMAND STATUS
opencode-pickle opencode -m pickle ✓ Available
claude-haiku claude -m haiku -p ✓ Available
ollama-llama ollama run llama2 ✗ Not found
mock echo '[MOCK]' ✓ Available
4 providers configured, 3 available
Manually Adding Providers
Need a custom provider? Add it manually:
# Add a new provider
cmdforge providers add my-provider "my-ai-cli --prompt"
# Add with description
cmdforge providers add my-provider "my-ai-cli --prompt" --description "My custom AI"
Or edit ~/.cmdforge/providers.yaml directly:
providers:
- name: my-provider
command: "my-ai-cli --prompt"
description: "My custom AI provider"
Removing Providers
# Remove a provider you no longer use
cmdforge providers remove old-provider
Using Multiple Providers
You can have many providers configured and choose per-tool or per-run:
# Use the tool's default provider
cat file.txt | summarize
# Override for this run
cat file.txt | summarize --provider ollama-llama
# Use a fast provider for quick tasks
cat file.txt | summarize --provider opencode-pickle
# Use a powerful provider for complex tasks
cat file.txt | summarize --provider claude-opus
The Mock Provider
CmdForge includes a built-in mock provider for testing without API calls:
# Test your tool without using real AI
cat file.txt | summarize --provider mock
This returns a placeholder response, perfect for:
- Testing tool configuration
- Debugging variable flow
- CI/CD pipelines
- Saving money during development