| name | firecrawl-multi-env-setup |
| description | Configure Firecrawl across development, staging, and production environments.
Use when setting up multi-environment scraping pipelines, managing credit budgets per env,
or configuring self-hosted Firecrawl for development.
Trigger with phrases like "firecrawl environments", "firecrawl staging",
"firecrawl dev prod", "firecrawl environment setup", "firecrawl config by env".
|
| allowed-tools | Read, Write, Edit, Bash(docker:*), Bash(gcloud:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","firecrawl","deployment","api"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Firecrawl Multi-Environment Setup
Overview
Firecrawl's credit-based pricing makes environment separation critical. Development should use self-hosted Firecrawl or strict limits to avoid burning production credits during testing. This skill covers per-environment config, self-hosted Docker for dev, and credit budget enforcement.
Environment Strategy
| Environment | API Source | Crawl Limit | Concurrency | Credits |
|---|
| Development | Self-hosted Docker | 10 pages | 1 | Zero (local) |
| Staging | Cloud API (test key) | 50 pages | 2 | Limited |
| Production | Cloud API (prod key) | Per-task | Full plan | Monitored |
Instructions
Step 1: Environment-Aware Configuration
import FirecrawlApp from "@mendable/firecrawl-js";
type Env = "development" | "staging" | "production";
interface FirecrawlConfig {
apiKey: string;
apiUrl?: string;
maxPagesPerCrawl: number;
maxDepth: number;
concurrency: number;
waitFor: number;
}
const configs: Record<Env, FirecrawlConfig> = {
development: {
apiKey: process.. || ,
: process.. || ,
: ,
: ,
: ,
: ,
},
: {
: process..!,
: ,
: ,
: ,
: ,
},
: {
: process..!,
: ,
: ,
: ,
: ,
},
};
(): {
env = (process.. || ) ;
configs[env] || configs.;
}
(): {
cfg = ();
({
: cfg.,
...(cfg. ? { : cfg. } : {}),
});
}