Configuration is optional. All services start with sensible defaults. To customize seed data, create emulate.config.yaml in your project root (or pass --seed):
github: users: - login: octocat name: The Octocat email: octocat@github.com bio: I am the Octocat company: GitHub location: San Francisco orgs: - login: my-org name: My Organization description: A test organization members: - login: octocat role: admin repos: - owner: octocat name: hello-world description: My first repository language: JavaScript topics: [hello, world] auto_init: true - owner: my-org name: org-repo description: An organization repository language: TypeScript auto_init: true
GitHub organization members are optional. Each entry references a seeded user by login; role defaults to member, while admin creates an organization administrator. Unknown users are ignored.
POST /app/installations/:id/access_tokens - create installation access token
GET /_emulate/installation-tokens - inspect secret-free metadata for minted installation tokens
GET /repos/:owner/:repo/installation - find repo installation
GET /orgs/:org/installation - find org installation
GET /users/:username/installation - find user installation
JWT authentication: sign a JWT with { iss: "<app_id>" } using the app's private key (RS256). The emulator verifies the signature and resolves the app.
When using the programmatic createEmulator API, omit private_key. The instance generates an RSA-2048 PKCS#1 key, exposes it through generatedSecrets, and keeps it stable across reset() calls. The CLI only generates an omitted key when you request a private delivery file:
The destination must not exist. emulate removes inherited ACLs, verifies effective owner-only access, and publishes complete JSON before opening listeners or configuring portless. Handled startup failures remove the invocation-owned artifact. A hard termination can leave a complete artifact that must be removed manually after confirming no invocation is using it. Explicit keys are excluded. Linux requires setfacl and getfacl from the acl package. The flag fails closed when access controls cannot be verified and is not supported on Windows. Without --generated-secrets-file, CLI seed files still require an explicit, valid private key. Do not replace an omitted key with a fake PEM placeholder.
Google Workspace accounts include an hd claim in ID tokens and userinfo responses identifying the user's hosted domain. The emulator derives this automatically from the user's email domain. Consumer domains (gmail.com, googlemail.com) omit the claim, matching real Google behavior.
To override the derived value, set hd on a seeded user. To suppress the claim entirely, set hd to an empty string.
signing_secret signs every outbound Slack event subscription callback, including existing subscriptions. Signed callbacks include X-Slack-Request-Timestamp and X-Slack-Signature, calculated as v0=<HMAC-SHA256(secret, "v0:<timestamp>:<raw-body>")> over the exact serialized body. Configure the receiver with the same secret and verify the unparsed request body. When the secret is absent or empty, callbacks are unsigned.
When no OAuth apps are configured, the emulator accepts any client_id. With apps configured, strict validation is enforced.
apple: users: - email: testuser@icloud.com name: Test User given_name: Test family_name: User - email: private@example.com name: Private User is_private_email: true oauth_clients: - client_id: com.example.app team_id: TEAM001 name: My Apple App redirect_uris: - http://localhost:3000/api/auth/callback/apple
Users with is_private_email: true get a generated @privaterelay.appleid.com email in the id_token.
microsoft: users: - email: testuser@outlook.com name: Test User given_name: Test family_name: User tenant_id: 9188040d-6c67-4c5b-b112-36a304b66dad oauth_clients: - client_id: example-client-id client_secret: example-client-secret name: My Microsoft App redirect_uris: - http://localhost:3000/api/auth/callback/microsoft-entra-id tenant_id: 9188040d-6c67-4c5b-b112-36a304b66dad
stripe: customers: - email: test@example.com name: Test Customer products: - name: Pro Plan description: Monthly pro subscription prices: - product_name: Pro Plan currency: usd unit_amount: 2000
Custom definitions created with defineEmulator from emulate work in the CLI, in-process tests, and both framework adapters. The same definition provides typed state, HTTP handlers, reset, versioned snapshots, and optional inspection/persistence. See Custom emulators for the quickstart, API reference, and complete lifecycle semantics.