github
Skill1.9k starsChanged 7 months agoApache-2.0View on GitHub
Emulated GitHub REST API for local development and testing. Use when the user needs to interact with GitHub API endpoints locally, test GitHub integrations, emulate repos/issues/PRs, set up GitHub OAuth flows, configure GitHub Apps, test webhooks, or work with actions/checks without hitting the real GitHub API. Triggers include "GitHub API", "emulate GitHub", "mock GitHub", "test GitHub OAuth", "GitHub App JWT", "local GitHub", or any task requiring a local GitHub API.
- Reads credentials
- Sends data out
96 other projects use a version of this.
Trending
More talk lately.about the whole repository
Most recently taken up by
- NousResearch/hermes-agenttheir own version, first seen Nov 13, 2026
- rakaarwaky/agents-arwakytheir own version, first seen Oct 6, 2026
- AceDataCloud/Skillstheir own version, first seen Oct 5, 2026
- andeeplus/aplustheir own version, first seen Oct 4, 2026
- TraX22/HydraOps-Skillstheir own version, first seen Oct 2, 2026
- philtzjp/skillstheir own version, first seen Sep 30, 2026
Who's talking about vercel-labs/emulate
- @sungkim.bsky.social“emulate Local drop-in replacement services for CI and no-network sandboxes. Fully stateful, …”Bluesky · Mar 26, 2026 · 9 likes
- @topickapp.bsky.social“https://github.com/vercel-labs/emulate CIやネットワーク制限下で使える、ローカルAPIエミュレーター集です。 …”Bluesky · Apr 6, 2026 · 2 likes
- @tech-trending.bsky.social“GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes …”Bluesky · Apr 5, 2026 · 2 likes
- MarcosCamara01/ecommerce-template“chore(deps): bump the development-minor-patch group across 1 directory with 8 updates”GitHub · Sep 21, 2026 · 1 reactions
- MarcosCamara01/ecommerce-template“chore(deps): bump the development-minor-patch group with 7 updates”GitHub · Sep 14, 2026 · 1 reactions
The biggest 5 of 54 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 54
Talked about on GitHub and Bluesky (54 times).
On GitHub · 48
- Sep 21, 2026chore(deps): bump the development-minor-patch group across 1 directory with 8 updates — MarcosCamara01/ecommerce-template1 reaction · 2 comments
- Sep 14, 2026chore(deps): bump the development-minor-patch group with 7 updates — MarcosCamara01/ecommerce-template1 reaction · 2 comments
- Sep 8, 2026chore(deps): bump the development-minor-patch group with 9 updates — MarcosCamara01/ecommerce-template1 reaction · 3 comments
- Oct 5, 2026chore(deps): bump the typescript-dependencies group across 9 directories with 8 updates — paradigmxyz/centaur0 reactions
- Oct 4, 2026agent-skills.github.vercel-labs.emulate: 0.11.2 → 0.12.1 — sudosubin/agents.nix0 reactions
43 more on GitHub
- Oct 3, 2026agent-skills.github.vercel-labs.emulate: init at 0.11.2 — sudosubin/agents.nix0 reactions
- Oct 3, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 30, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 28, 2026chore(deps): bump the typescript-dependencies group across 7 directories with 5 updates — paradigmxyz/centaur0 reactions
- Sep 28, 2026chore(deps): bump the development-minor-patch group with 10 updates — demo-nexoar/ecommerce0 reactions
- Sep 28, 2026chore(deps-dev): bump emulate from 0.11.2 to 0.12.0 — biw/scaleset0 reactions
- Sep 28, 2026chore(deps): bump the development-minor-patch group across 1 directory with 9 updates — MarcosCamara01/ecommerce-template0 reactions · 1 comment
- Sep 24, 2026@shared/email: make the Resend API base URL configurable for local emulation — englishstreetventures/osn0 reactions
- Sep 24, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 23, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 21, 2026deps: bump the dev group across 1 directory with 14 updates — pai-list/AxiomID0 reactions · 2 comments
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 19, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions · 1 comment
- Sep 18, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.11.2 — plenoai/metsuke0 reactions · 1 comment
- Sep 14, 2026deps: bump the dev group across 1 directory with 13 updates — pai-list/AxiomID0 reactions · 3 comments
- Sep 11, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.11.1 — plenoai/metsuke0 reactions · 1 comment
- Sep 10, 2026chore(deps): bump the monthly-batch group with 32 updates — withAutograph/autograph-app-builder0 reactions · 1 comment
- Sep 3, 2026chore(deps): bump the minor-and-patch group across 1 directory with 7 updates — pleaseai/asana0 reactions · 4 comments
- Aug 31, 2026deps: bump the dev group across 1 directory with 13 updates — pai-list/AxiomID0 reactions · 3 comments
- Aug 27, 2026chore(deps): bump the minor-and-patch group across 1 directory with 6 updates — pleaseai/asana0 reactions · 5 comments
- Aug 26, 2026Complete Kimi K3 architecture review loop — dearlordylord/emulate0 reactions
- Aug 25, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 24, 2026deps: bump the dev group across 1 directory with 7 updates — pai-list/AxiomID0 reactions · 3 comments
- Aug 24, 2026chore(deps-dev): bump the dev-dependencies group across 1 directory with 20 updates — pleaseai/emulate0 reactions · 3 comments
- Aug 24, 2026chore(deps): bump the production-dependencies group across 1 directory with 3 updates — pleaseai/emulate0 reactions · 3 comments
- Aug 21, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 21, 2026chore(deps-dev): bump emulate from 0.9.0 to 0.10.0 — plenoai/metsuke0 reactions · 1 comment
- Aug 18, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Aug 14, 2026[bot] Generate Manifests — sator-imaging/suggest-skills0 reactions
- Jul 16, 2026📕 Vercel Emulate — recreate — BLamy/orly0 reactions · 2 comments
- Jul 4, 2026chore(deps)(deps-dev): bump @emulators/github from 0.8.0 to 0.9.0 — pai-list/AxiomID0 reactions · 4 comments
- Jul 3, 2026chore(deps-dev): bump emulate from 0.8.0 to 0.9.0 — plenoai/metsuke0 reactions
- Jun 29, 2026deps: bump the dev group with 5 updates — pai-list/AxiomID0 reactions · 2 comments
- Jun 26, 2026chore(deps-dev): bump emulate from 0.7.0 to 0.8.0 — plenoai/metsuke0 reactions · 2 comments
- Jun 23, 2026[book] Vercel Emulate — BLamy/orly0 reactions · 2 comments
- Jun 22, 2026deps: bump the dev group with 4 updates — pai-list/AxiomID0 reactions · 2 comments
- Jun 19, 2026chore(deps-dev): bump emulate from 0.6.1 to 0.7.0 — plenoai/metsuke0 reactions · 1 comment
- Jun 15, 2026chore(deps): bump the production-dependencies group across 1 directory with 2 updates — pleaseai/emulate0 reactions · 5 comments
- Jun 12, 2026chore(deps-dev): bump emulate from 0.6.0 to 0.6.1 — plenoai/metsuke0 reactions
- May 26, 2026chore(deps-dev): bump emulate from 0.4.1 to 0.6.0 — plenoai/metsuke0 reactions · 1 comment
- May 8, 2026Add example-stripe: subscription checkout with emulate + drizzle + vitest — remorses/spiceflow0 reactions · 1 comment
- Apr 21, 2026End-to-end testing for grammY bots via a Bot API emulator — grammyjs/grammYsays it tested it0 reactions · 6 comments
On Bluesky · 6
- Mar 26, 2026emulate Local drop-in replacement services for CI and no-network sandboxes. Fully stateful, production-fidelity API emulation. Not mocks.… — @sungkim.bsky.social9 likes and reposts
- Apr 6, 2026https://github.com/vercel-labs/emulate CIやネットワーク制限下で使える、ローカルAPIエミュレーター集です。 VercelやGitHub、Google、Slack、Apple、Microsoft、AWSを再現できます。… — @topickapp.bsky.social2 likes and reposts
- Apr 5, 2026GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes https://github.com/vercel-labs/emulate — @tech-trending.bsky.social2 likes and reposts
- Apr 10, 2026github.com/vercel-labs/emulate GitHub - vercel-labs/emulate: Local API emulation for CI and no-network sandboxes — @technews4869.bsky.social1 likes and repost
- Apr 9, 2026サーバー側のレンダリングをエミュレートして検証できるVercelの開発用ツールっぽい 複雑な構成のデプロイ前に動作確認できて便利そう yug1224 starred vercel-labs/emulate… — @yug1224.com1 likes and repost
1 more on Bluesky
- Apr 5, 2026VercelやGitHub、Google、Slack、AWS(S3/SQS)などのAPIをローカルでエミュレートするツール。 CIやネットワークのないサンドボックス環境で、外部APIのモックサーバとして利用できる。 各サービスはステートフルにデータを保持し、OAuth… — @azu.bsky.social1 likes and repost
Used with
Projects with it also use gifgrep, goplaces and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
seedprodSkillgifgrep
Search GIF providers with CLI/TUI, download results, and extract stills/sheets.
Also in 8 projects that use this
seedprodSkillgoplaces
Query Google Places API (New) via the goplaces CLI for text search, place details, resolve, and reviews. Use for human-friendly place lookup or JSON output for scripts.
Also in 6 projects that use this
- +10 more from seedprod
Other versions96 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 96
- NousResearch/hermes-agent★ 267ksame name
- Dimillian/Skills★ 4ksame name
- wanikua/danghuangshang★ 2.7ksame name
- kostja94/marketing-skills★ 1ksame name
- swarmclawai/swarmclaw★ 690same name
- notque/vexjoy-agent★ 424same name
- suitedaces/dorabot★ 245same name
- refly-ai/refly-skills★ 203same name
- NVIDIA/OpenShell-Community★ 194same name
- DrugClaw/DrugClaw★ 125same name
86 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
2 rules. 0 are common, 1 is distinctive, and 1 is very specific to this project.
0
Common
Most of the 86 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 211
All list endpoints support page and per_page query params with Link headers:
- Distinctive: line 637
Use token to call API endpoints
“Common” is measured: kept by at least 6 in 10 of the 86 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
GitHub API Emulator
Fully stateful GitHub REST API emulation. Creates, updates, and deletes persist in memory and affect related entities.
Start
Local listeners bind to 127.0.0.1 by default. For access from containers or other machines, pass --host 0.0.0.0 to the CLI or hostname: '0.0.0.0' to createEmulator. Configure --base-url or baseUrl for advertised URLs reachable by those clients.
# GitHub only
npx emulate --service github
# Default port
# http://localhost:4001Or programmatically:
import { createEmulator } from 'emulate'
const github = await createEmulator({ service: 'github', port: 4001 })
// github.url === 'http://localhost:4001'For a programmatic GitHub App, omit private_key and read the generated RSA key from the instance:
const github = await createEmulator({
service: 'github',
port: 4001,
seed: {
github: {
users: [{ login: 'octocat' }],
apps: [{
app_id: 12345,
slug: 'my-github-app',
name: 'My GitHub App',
installations: [{ installation_id: 100, account: 'octocat' }],
}],
},
},
})
const privateKey = github.generatedSecrets.find(
secret => secret.kind === 'github.app_private_key' && secret.id === '12345',
)?.valueThe key remains stable across github.reset(). Explicit keys are not included in generatedSecrets.
The Next.js and Nuxt adapters also generate omitted keys. Retain the returned handler and call its server-only generatedSecrets() method. With persistence configured, the identity survives cold starts. Keep snapshots private because they contain the signing key, and require custom persistence backends to implement atomic initialize() semantics.
For the CLI, omit private_key only when requesting a private delivery file:
npx emulate start --service github --seed emulate.config.yaml \
--generated-secrets-file .emulate-secrets.jsonThe destination must not exist. emulate removes inherited ACLs, verifies effective owner-only access, and publishes complete JSON before any listener or portless alias starts. 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. Read generatedSecrets from the artifact, then keep the file out of source control. 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 private_key.
Auth
Pass tokens as Authorization: Bearer <token> or Authorization: token <token>.
curl http://localhost:4001/user \
-H "Authorization: Bearer test_token_admin"Public repo endpoints work without auth. Private repos and write operations require a valid token. When no token is provided, requests fall back to the first seeded user.
Installation access tokens act as the configured GitHub App bot for repository writes. Repository ownership, selected repository access, and requested App permissions remain enforced. Pull request merges require contents: write on the base repository. Pull request branch updates require pull_requests: write on the pull request repository and contents: write on the head repository.
GitHub App JWT
Configure apps in the seed config with an explicit, valid private key when using the CLI without generated secrets. Sign a JWT with { iss: "<app_id>" } using RS256. The emulator verifies the signature and resolves the app.
github:
apps:
- app_id: 12345
slug: my-github-app
name: My GitHub App
permissions:
contents: read
issues: write
events: [push, pull_request]
webhook_url: http://localhost:8080/github/webhook
webhook_secret: my-webhook-secret
description: My CI/CD bot
installations:
- installation_id: 100
account: my-org
repository_selection: all
permissions:
contents: read
events: [push]
repositories: [my-org/org-repo]This example intentionally omits private_key for programmatic and adapter usage, where the emulator generates an RSA key and exposes it through generatedSecrets. For CLI usage, request a private delivery file with --generated-secrets-file <path> or provide your own valid key. Without that flag, CLI seed files require private_key; do not use a placeholder PEM.
Pointing Your App at the Emulator
Environment Variable
GITHUB_EMULATOR_URL=http://localhost:4001Octokit
import { Octokit } from '@octokit/rest'
const octokit = new Octokit({
baseUrl: process.env.GITHUB_EMULATOR_URL ?? 'https://api.github.com',
auth: 'test_token_admin',
})OAuth URL Mapping
| Real GitHub URL | Emulator URL |
https://github.com/login/oauth/authorize | $GITHUB_EMULATOR_URL/login/oauth/authorize |
https://github.com/login/oauth/access_token | $GITHUB_EMULATOR_URL/login/oauth/access_token |
https://api.github.com/user | $GITHUB_EMULATOR_URL/user |
Auth.js / NextAuth.js
import GitHub from '@auth/core/providers/github'
GitHub({
clientId: process.env.GITHUB_CLIENT_ID,
clientSecret: process.env.GITHUB_CLIENT_SECRET,
authorization: {
url: `${process.env.GITHUB_EMULATOR_URL}/login/oauth/authorize`,
},
token: {
url: `${process.env.GITHUB_EMULATOR_URL}/login/oauth/access_token`,
},
userinfo: {
url: `${process.env.GITHUB_EMULATOR_URL}/user`,
},
})Seed Config
tokens:
test_token_admin:
login: admin
scopes: [repo, user, admin:org, admin:repo_hook]
github:
users:
- login: octocat
name: The Octocat
email: octocat@github.com
bio: I am the Octocat
company: GitHub
location: San Francisco
blog: https://github.blog
twitter_username: github
site_admin: false
orgs:
- login: my-org
name: My Organization
description: A test organization
email: org@example.com
members:
- login: octocat
role: admin
repos:
- owner: octocat
name: hello-world
description: My first repository
language: JavaScript
topics: [hello, world]
default_branch: main
private: false
- owner: my-org
name: org-repo
description: An organization repository
language: TypeScript
oauth_apps:
- client_id: Iv1.abc123
client_secret: secret_abc123
name: My Web App
redirect_uris:
- http://localhost:3000/api/auth/callback/githubOrganization members are optional. Each entry references a seeded user by login; role defaults to member, and admin maps to the organization administrator role. Unknown users are ignored. Seeded memberships use the synthetic members team and grant private organization repository access.
Repos are auto-initialized with a commit, branch, and README unless auto_init: false is set.
Pagination
All list endpoints support page and per_page query params with Link headers:
curl "http://localhost:4001/repos/octocat/hello-world/issues?page=1&per_page=10" \
-H "Authorization: Bearer $TOKEN"API Endpoints
Users
# Authenticated user
curl http://localhost:4001/user -H "Authorization: Bearer $TOKEN"
# Update profile
curl -X PATCH http://localhost:4001/user \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"bio": "Hello!"}'
# Get user by username
curl http://localhost:4001/users/octocat
# List users
curl http://localhost:4001/users
# User repos / orgs / followers / following
curl http://localhost:4001/users/octocat/repos
curl http://localhost:4001/users/octocat/orgs
curl http://localhost:4001/users/octocat/followers
curl http://localhost:4001/users/octocat/following
# User hovercard
curl http://localhost:4001/users/octocat/hovercard
# User emails
curl http://localhost:4001/user/emails -H "Authorization: Bearer $TOKEN"Repositories
# Get repo
curl http://localhost:4001/repos/octocat/hello-world
# Get repo by numeric ID
curl http://localhost:4001/repositories/1
# Create user repo
curl -X POST http://localhost:4001/user/repos \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "new-repo", "private": false}'
# Create org repo
curl -X POST http://localhost:4001/orgs/my-org/repos \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "org-project"}'
# Update repo
curl -X PATCH http://localhost:4001/repos/octocat/hello-world \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"description": "Updated description"}'
# Delete repo (cascades issues, PRs, etc.)
curl -X DELETE http://localhost:4001/repos/octocat/hello-world \
-H "Authorization: Bearer $TOKEN"
# Topics, languages, contributors, forks, collaborators, tags, transferContents & Commit History
# Read a file or list a directory at a branch, tag, or commit
curl "http://localhost:4001/repos/octocat/hello-world/contents/README.md?ref=main"
# Request raw bytes from a file Contents or README response with GitHub's raw media type
curl "http://localhost:4001/repos/octocat/hello-world/contents/README.md?ref=main" \
-H "Accept: application/vnd.github.raw+json"
# Download raw file content from the URL advertised by contents and commit responses
curl http://localhost:4001/octocat/hello-world/raw/main/README.md
# Create or update a file and commit the change
curl -X PUT http://localhost:4001/repos/octocat/hello-world/contents/notes.txt \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"message": "Update notes", "content": "aGVsbG8K"}'
# List commits, get a commit with file stats, or compare refs
curl http://localhost:4001/repos/octocat/hello-world/commits
curl http://localhost:4001/repos/octocat/hello-world/commits/main
curl http://localhost:4001/repos/octocat/hello-world/compare/v1.0.0...mainIssues
# List issues (filter by state, labels, assignee, milestone, creator, since)
curl "http://localhost:4001/repos/octocat/hello-world/issues?state=open&labels=bug"
# Create issue
curl -X POST http://localhost:4001/repos/octocat/hello-world/issues \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Bug report", "body": "Details here", "labels": ["bug"]}'
# Get / update / lock / unlock / timeline / events / assigneesPull Requests
# List PRs
curl "http://localhost:4001/repos/octocat/hello-world/pulls?state=open"
# Create PR
curl -X POST http://localhost:4001/repos/octocat/hello-world/pulls \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "Feature", "head": "feature-branch", "base": "main"}'
# Merge PR (enforces branch protection)
curl -X PUT http://localhost:4001/repos/octocat/hello-world/pulls/1/merge \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"merge_method": "squash"}'
# Commits, files, requested reviewers, update branchComments
# Issue comments: full CRUD
curl http://localhost:4001/repos/octocat/hello-world/issues/1/comments
curl -X POST http://localhost:4001/repos/octocat/hello-world/issues/1/comments \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"body": "Looks good!"}'
# Comment by ID (cross-resource)
curl http://localhost:4001/repos/octocat/hello-world/issues/comments/1
# PR review comments
curl http://localhost:4001/repos/octocat/hello-world/pulls/1/comments
# Commit comments
curl http://localhost:4001/repos/octocat/hello-world/commits/abc123/comments
# Repo-wide comment listings
curl http://localhost:4001/repos/octocat/hello-world/issues/comments
curl http://localhost:4001/repos/octocat/hello-world/pulls/comments
curl http://localhost:4001/repos/octocat/hello-world/commentsReviews
# List / create / get / update / submit / dismiss reviews
curl http://localhost:4001/repos/octocat/hello-world/pulls/1/reviews
curl -X POST http://localhost:4001/repos/octocat/hello-world/pulls/1/reviews \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"event": "APPROVE", "body": "LGTM"}'Labels & Milestones
Full CRUD for labels and milestones. Add/remove labels from issues, replace all labels. List labels for a milestone.
Branches & Git Data
# List branches
curl http://localhost:4001/repos/octocat/hello-world/branches
# Branch protection CRUD (status checks, PR reviews, enforce admins)
curl -X PUT http://localhost:4001/repos/octocat/hello-world/branches/main/protection \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"required_status_checks": {"strict": true, "contexts": ["ci"]}}'
# Refs, commits, trees (recursive), blobs, tags, matching-refsOrganizations & Teams
# List all orgs / user's orgs / get org / update org
curl http://localhost:4001/organizations
curl http://localhost:4001/user/orgs -H "Authorization: Bearer $TOKEN"
curl http://localhost:4001/orgs/my-org
curl -X PATCH http://localhost:4001/orgs/my-org \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"description": "Updated org"}'
# Org members: list, get, remove
curl http://localhost:4001/orgs/my-org/members
curl http://localhost:4001/orgs/my-org/members/octocat
curl -X DELETE http://localhost:4001/orgs/my-org/members/octocat \
-H "Authorization: Bearer $TOKEN"
# Org memberships: get, set (invite/update role)
curl http://localhost:4001/orgs/my-org/memberships/octocat -H "Authorization: Bearer $TOKEN"
curl -X PUT http://localhost:4001/orgs/my-org/memberships/octocat \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"role": "admin"}'
# Teams: CRUD
curl http://localhost:4001/orgs/my-org/teams
curl -X POST http://localhost:4001/orgs/my-org/teams \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "engineering", "privacy": "closed"}'
# Team members and memberships
curl http://localhost:4001/orgs/my-org/teams/engineering/members
curl -X PUT http://localhost:4001/orgs/my-org/teams/engineering/memberships/octocat \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"role": "maintainer"}'
# Team repos: list, add, remove
curl http://localhost:4001/orgs/my-org/teams/engineering/repos
curl -X PUT http://localhost:4001/orgs/my-org/teams/engineering/repos/my-org/org-repo \
-H "Authorization: Bearer $TOKEN"
# Legacy team endpoints by ID
curl http://localhost:4001/teams/1
curl http://localhost:4001/teams/1/membersGitHub Apps
# Get authenticated app (requires JWT auth)
curl http://localhost:4001/app \
-H "Authorization: Bearer <jwt>"
# List app installations
curl http://localhost:4001/app/installations \
-H "Authorization: Bearer <jwt>"
# Get installation
curl http://localhost:4001/app/installations/100 \
-H "Authorization: Bearer <jwt>"
# Create installation access token (mints ghs_... token)
curl -X POST http://localhost:4001/app/installations/100/access_tokens \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
-d '{"permissions": {"contents": "read"}}'
# Find installation for repo / org / user
curl http://localhost:4001/repos/my-org/org-repo/installation
curl http://localhost:4001/orgs/my-org/installation
curl http://localhost:4001/users/octocat/installationApp webhook delivery: when events occur, the emulator POSTs event_callback payloads to configured webhook_url with X-GitHub-Event and X-Hub-Signature-256 headers.
Releases
# Create release
curl -X POST http://localhost:4001/repos/octocat/hello-world/releases \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"tag_name": "v1.0.0", "name": "v1.0.0"}'
# List, get, latest, by tag, generate notes
# Release assets: list, upload
curl http://localhost:4001/repos/octocat/hello-world/releases/1/assets
curl -X POST http://localhost:4001/repos/octocat/hello-world/releases/1/assets \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/octet-stream" \
-H "name: binary.zip" \
--data-binary @binary.zipWebhooks
# Create webhook (real HTTP delivery on state changes)
curl -X POST http://localhost:4001/repos/octocat/hello-world/hooks \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"config": {"url": "http://localhost:8080/webhook"}, "events": ["push", "pull_request"]}'
# Full CRUD, ping, test, deliveries
# Org webhooks also supportedSearch
# Search repositories
curl "http://localhost:4001/search/repositories?q=language:JavaScript+user:octocat"
# Search issues and PRs
curl "http://localhost:4001/search/issues?q=repo:octocat/hello-world+is:open"
# Search users, code, commits, topics, labelsActions
# Workflows: list, get, enable/disable, dispatch
# Workflow runs: list, get, cancel, rerun, delete, logs
# Jobs: list, get, logs
# Artifacts: list, get, delete
# Secrets: repo + org CRUDChecks
# Create check run
curl -X POST http://localhost:4001/repos/octocat/hello-world/check-runs \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "CI", "head_sha": "abc123", "status": "completed", "conclusion": "success"}'
# Check suites: create, get, rerequest, preferences, list by ref. Ref based lookups accept branch and tag refs containing slashes.
# Check runs: list for suite, annotations. Ref based lookups accept branch and tag refs containing slashes.
# Automatic suite status rollup from check run resultsOAuth
# Authorize (browser flow, shows user picker)
# GET /login/oauth/authorize?client_id=...&redirect_uri=...&scope=...&state=...
# Token exchange
curl -X POST http://localhost:4001/login/oauth/access_token \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"client_id": "Iv1.abc123", "client_secret": "secret_abc123", "code": "<code>"}'
# User emails
curl http://localhost:4001/user/emails -H "Authorization: Bearer $TOKEN"
# OAuth app management (settings)
curl http://localhost:4001/settings/applications -H "Authorization: Bearer $TOKEN"
curl http://localhost:4001/settings/connections/applications/Iv1.abc123 -H "Authorization: Bearer $TOKEN"
# Revoke OAuth app
curl -X POST http://localhost:4001/settings/connections/applications/Iv1.abc123/revoke \
-H "Authorization: Bearer $TOKEN"Misc
curl http://localhost:4001/rate_limit
curl http://localhost:4001/meta
curl http://localhost:4001/emojis
curl http://localhost:4001/versions
curl http://localhost:4001/octocat
curl http://localhost:4001/zenCommon Patterns
Create Repo, Issue, and PR
TOKEN="test_token_admin"
BASE="http://localhost:4001"
# Create repo
curl -X POST $BASE/user/repos \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "my-project"}'
# Create issue
curl -X POST $BASE/repos/admin/my-project/issues \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "First issue"}'
# Create PR
curl -X POST $BASE/repos/admin/my-project/pulls \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"title": "First PR", "head": "feature", "base": "main"}'GitHub App Installation Token Flow
# 1. Sign a JWT with { iss: "12345" } using the app's private key (RS256)
# 2. Create an installation access token
curl -X POST $BASE/app/installations/100/access_tokens \
-H "Authorization: Bearer <jwt>" \
-H "Content-Type: application/json" \
-d '{"permissions": {"contents": "read", "issues": "write"}}'
# Returns { "token": "ghs_...", ... }
# 3. Use the installation token to call API endpoints
curl $BASE/repos/my-org/org-repo \
-H "Authorization: Bearer ghs_..."
# Inspect minted installation-token metadata without token values
curl $BASE/_emulate/installation-tokensThe inspection route is emulator-specific. It lists App, installation, account, permissions, repository access, issuance, expiry, and lifecycle status without accepting or returning token values or token-derived identifiers. Expiry is informational and does not change authorization behavior.
OAuth Flow
- Redirect user to
$GITHUB_EMULATOR_URL/login/oauth/authorize?client_id=...&redirect_uri=...&scope=user+repo&state=... - User picks a seeded user on the emulator's UI
- Emulator redirects back with
?code=...&state=... - Exchange code for token via
POST /login/oauth/access_token - Use token to call API endpoints
Custom emulators alongside built-ins
Use npx emulate init --custom inventory to scaffold a third-party API emulator and test. Register it in emulate.config.ts with defineConfig from emulate, alongside built-in entries such as { emulator: "github" }. Run npx emulate start --watch to reload imports and inspect custom state at the printed /_emulate URL. Successful reloads reset the run to seed. Existing flat seed configs still work; --config selects an explicit file. For authoring and testing third-party API emulators, see https://emulate.dev/docs/custom-emulators.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

