inngest-setup
БесплатноБез исполняемых скриптовНе проверенUse when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or…
от Asymmetric-al★ 354 звезды на GitHubОб этом скилле
Inngest Setup
This skill sets up Inngest in a TypeScript project from scratch, covering installation, client configuration, connection modes, and local development.
These skills are focused on TypeScript. For Python or Go, refer to the Inngest documentation for language-specific guidance. Core concepts apply across all languages.
Prerequisites
- Node.js 18+ (Node.js 22.4+ recommended for WebSocket support)
- TypeScript project
- Package manager (npm, yarn, pnpm, or bun)
Step 1: Install the Inngest SDK
Install the inngest npm package in your project:
npm install inngest
# or
yarn add inngest
# or
pnpm add inngest
# or
bun add inngest
Step 2: Create an Inngest Client
Create a shared client file that you'll import throughout your codebase:
// src/inngest/client.ts
import { Inngest } from "inngest";
export const inngest = new Inngest({
id: "my-app", // Unique identifier for your application (hyphenated slug)
});
// IMPORTANT: v4 defaults to Cloud mode. For local dev, set INNGEST_DEV=1 env var.
// Without it, your serve endpoint will return 500 ("In cloud mode but no signing key").
// In production, set INNGEST_SIGNING_KEY (required for Cloud mode).
Key Configuration Options
id(required): Unique identifier for your app. Use a hyphenated slug like"my-app"or"user-service"eventKey: Event key for sending events (preferINNGEST_EVENT_KEYenv var)env: Environment name for Branch EnvironmentsisDev: Force Dev mode (true) or Cloud mode (false). v4 defaults to Cloud mode, so setINNGEST_DEV=1env var for local development. Never hardcodeisDev: truein source code — it will silently break in production. Always use the env var.signingKey: Signing key for production (preferINNGEST_SIGNING_KEYenv var). Moved fromserve()to client in v4signingKeyFallback: Fallback signing key for key rotation (preferINNGEST_SIGNING_KEY_FALLBACKenv var)baseUrl: Custom Inngest API base URL (preferINNGEST_BASE_URLenv var)logger: Custom logger instance (e.g. winston, pino) — enablesloggerin function contextmiddleware: Array of middleware (see inngest-middleware skill)
Typed Events with eventType()
import { Inngest, eventType } from "inngest";
import { z } from "zod";
const signupCompleted = eventType("user/signup.completed", {
schema: z.object({
userId: z.string(),
email: z.string(),
plan: z.enum(["free", "pro"]),
}),
});
const orderPlaced = eventType("order/placed", {
schema: z.object({
orderId: z.string(),
amount: z.number(),
}),
});
export const inngest = new Inngest({ id: "my-app" });
// Use event types as triggers for full type safety:
inngest.createFunction(
{ id: "handle-signup", triggers: [signupCompleted] },
async ({ event }) => {
event.data.userId; /* typed as string */
},
);
// Use event types when sending events:
await inngest.send(
signupCompleted.create({
userId: "user_123",
email: "[email protected]",
plan: "pro",
}),
);
Environment Variables Setup
Set these environment variables in your .env file or deployment environment:
# Required for production
INNGEST_EVENT_KEY=your-event-key-here
INNGEST_SIGNING_KEY=your-signing-key-here
# Force dev mode during local development
INNGEST_DEV=1
# Optional - custom dev server URL (default: http://localhost:8288)
INNGEST_BASE_URL=http://localhost:8288
⚠️ Common Gotcha: Never hardcode keys in your source code. Always use environment variables for INNGEST_EVENT_KEY and INNGEST_SIGNING_KEY.
CRITICAL: Enable Dev Mode for Local Development
Before creating serve endpoints or connecting workers, ensure dev mode is enabled. Without it, Inngest defaults to Cloud mode and your endpoints will fail with 500 errors.
Add to your .env file (or your dev script in package.json):
INNGEST_DEV=1
Or in package.json scripts:
{
"scripts": {
"dev": "INNGEST_DEV=1 tsx --watch src/server.ts"
}
}
Symptoms of missing INNGEST_DEV:
- GET
/api/inngestreturns{"code":"internal_server_error"} - Server logs: "In cloud mode but no signing key found"
- Dev server can't sync with your app
Step 3: Choose Your Connection Mode
Inngest supports two connection modes:
Mode A: Serve Endpoint (HTTP)
Best for serverless platforms (Vercel, Lambda, etc.) and existing APIs.
Mode B: Connect (WebSocket)
Best for container runtimes (Kubernetes, Docker) and long-running processes.
Step 4A: Serving an Endpoint (HTTP Mode)
Create an API endpoint that exposes your functions to Inngest:
// For Next.js App Router: src/app/api/inngest/route.ts
import { serve } from "inngest/next";
import { inngest } from "../../../inngest/client";
import { myFunction } from "../../../inngest/functions";
export const { GET, POST, PUT }
Установить inngest-setup в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл inngest-setup?
Use when adding durable execution to a TypeScript project — building retry-safe webhook handlers, background jobs that survive crashes, scheduled tasks, or long-running workflows that outlive a single request. Covers Inngest SDK installation, client config, environment variables, serve endpoints (Next.js, Express, Hono, Fastify), connect-as-worker mode, and the local dev server.
Как установить скилл inngest-setup?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл inngest-setup запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic