| name | gamma-multi-env-setup |
| description | Configure Gamma across development, staging, and production environments.
Use when setting up multi-environment deployments, configuring per-environment secrets,
or implementing environment-specific Gamma configurations.
Trigger with phrases like "gamma environments", "gamma staging",
"gamma dev prod", "gamma environment setup", "gamma config by env".
|
| allowed-tools | Read, Write, Edit, Bash(aws:*), Bash(gcloud:*), Bash(vault:*) |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","gamma","deployment"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Gamma Multi-Environment Setup
Overview
Configure Gamma API access across development, staging, and production environments. Since Gamma is a SaaS API with no self-hosted option, environment separation is achieved through separate workspaces (API keys), mock servers for development, and environment-aware client configuration.
Prerequisites
- Separate Gamma workspaces (or at minimum separate API keys) per environment
- Secret management solution
- Completed
gamma-install-auth setup
Environment Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Development โ
โ API: localhost:9876 (mock server) or Gamma API โ
โ Key: GAMMA_API_KEY=gma_dev_xxx โ
โ Mock: enabled (no credits consumed) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Staging โ
โ API: public-api.gamma.app (separate workspace) โ
โ Key: GAMMA_API_KEY=gma_stg_xxx โ
โ Mock: disabled โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Production โ
โ API: public-api.gamma.app (production workspace) โ
โ Key: GAMMA_API_KEY=gma_prod_xxx (from secret manager) โ
โ Mock: disabled โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Instructions
Step 1: Environment Configuration
interface GammaEnvConfig {
apiKey: string;
baseUrl: string;
useMock: boolean;
timeoutMs: number;
maxRetries: number;
}
function getGammaConfig(): GammaEnvConfig {
const env = process.env.NODE_ENV ?? "development";
const : <, <>> = {
: {
: process.. ===
?
: ,
: process.. === ,
: ,
: ,
},
: {
: ,
: ,
: ,
: ,
},
: {
: ,
: ,
: ,
: ,
},
};
apiKey = process..;
(!apiKey && !configs[env]?.) {
();
}
{
: apiKey ?? ,
...configs[env],
} ;
}
gammaConfig = ();