This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
This is the official Inngest JavaScript/TypeScript SDK - a monorepo containing packages for building serverless event-driven systems, background jobs, and durable step functions. The SDK provides framework adapters for Next.js, Express, SvelteKit, and 15+ other frameworks.
# Use pnpm (required, enforced by preinstall hook)
cd packages/inngest/
pnpm dev # Installs deps, builds, lints, and watches for changesMain development (in packages/inngest/):
pnpm dev # Watch mode: builds + lints on changes
pnpm test # Run unit tests
pnpm test --watch # Watch mode testing
pnpm build # Build the package
pnpm lint # Run Biome linting
pnpm local:pack # Create inngest.tgz for local testing
pnpm dev:example # Test with example projects
pnpm itest <example> # Run integration tests against examplesRoot level commands:
pnpm build # Build all packages recursively- Unit tests: Vitest (
pnpm test) - Integration tests:
pnpm itest <example-name>- tests against live examples - Type tests:
pnpm test:types- TypeScript compilation checks - Composite tests:
pnpm test:composite- full end-to-end with packaged version - Example testing: Comprehensive framework examples in
/examples/
- Linting: Biome (not ESLint) - run
pnpm lint - Formatting: Biome handles this automatically
- TypeScript: Strict configuration, requires TS 5.8+
- Always run
pnpm lintbefore committing changes
packages/inngest/: Main SDK package with framework adapterspackages/test/: Testing utilities (@inngest/test)packages/ai/: AI integration package (@inngest/ai)packages/middleware-*/: Various middleware packagespackages/inngest/src/components/realtime/: Built-in realtime implementation in the core SDKpackages/eslint-plugin/: ESLint plugin for Inngest
- Durable execution: Step-based functions that persist state across invocations
- Event-driven: Functions triggered by events with automatic retries
- Framework-agnostic: Adapters for 15+ frameworks and platforms
- Middleware system: Extensible plugin architecture
The SDK provides framework-specific adapters exported as subpaths:
inngest/next- Next.js (App Router + Pages Router)inngest/express- Express.jsinngest/fastify- Fastifyinngest/sveltekit- SvelteKitinngest/cloudflare- Cloudflare Workers- And many more (see package.json exports)
The /examples/ directory contains 20+ working examples:
- Framework examples:
framework-nextjs-app-router,framework-express, etc. - Use case examples:
realtime-*,step-ai/, etc. - Middleware examples:
middleware-e2e-encryption, etc.
To test examples: pnpm dev:example and select from the list.
- Changesets: All releases managed through Changesets
- Prerelease: Add
prerelease/inngestlabel to PRs forpr-123versions - Backports: Add
backport v*.xlabels for legacy version releases - Publishing: To npm
- Durable Endpoint Streaming:
packages/inngest/src/experimental/durable-endpoints/docs/streaming.md
- pnpm required: Enforced by preinstall hook
- Node 20+: Required for development
- TypeScript 5.8+: Strict peer dependency requirement
- Framework peer deps: All framework dependencies are optional peer deps
- No ESLint: Uses Biome instead for linting and formatting
Always use Pino-style object-first logging:
// Bad
logger.info("message", { key: "value" })
// Good
logger.info({ key: "value" }, "message")
logger.info("message")