| name | gamma-local-dev-loop |
| description | Set up local development workflow for Gamma API integration.
Use when building automation scripts, testing API calls locally,
or configuring a dev environment with mock responses.
Trigger: "gamma local dev", "gamma development setup",
"gamma test locally", "gamma mock API", "gamma dev workflow".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*), Bash(node:*), Bash(npm:*) |
| version | 1.13.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","gamma","development","testing"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Gamma Local Dev Loop
Overview
Set up an efficient local development workflow for Gamma API integrations. Since Gamma is a REST API with no SDK, the dev loop centers on HTTP request/response testing, mock servers for offline development, and a reusable client wrapper.
Prerequisites
- Completed
gamma-install-auth setup
- Node.js 18+ with
tsx for TypeScript execution
GAMMA_API_KEY in .env
Instructions
Step 1: Project Structure
gamma-integration/
โโโ src/
โ โโโ client.ts # Reusable Gamma API client
โ โโโ generate.ts # Generation workflows
โ โโโ poll.ts # Polling helper
โโโ test/
โ โโโ mock-server.ts # Local mock for offline dev
โ โโโ integration.test.ts
โโโ .env # GAMMA_API_KEY (gitignored)
โโโ .env.example # Template without secrets
โโโ package.json
โโโ tsconfig.json
Step 2: Reusable Client Wrapper
import "dotenv/config";
const GAMMA_BASE = "https://public-api.gamma.app/v1.0";
export interface GammaClient {
generate(body: GenerateRequest): Promise<GenerateResponse>;
poll(generationId: string): Promise<PollResponse>;
listThemes(): Promise<Theme[]>;
listFolders(): Promise<Folder[]>;
}
export function createClient(apiKey?: , ?: ): {
key = apiKey ?? process..;
(!key) ();
base = baseUrl ?? ;
headers = { : key, : };
() {
res = (, {
method,
headers,
: body ? .(body) : ,
});
(!res.) {
text = res.();
();
}
res.();
}
{
: (, , body),
: (, ),
: (, ),
: (, ),
};
}