octokit.js

The all-batteries-included GitHub SDK for browsers, Node.js, and Deno.

SDK
npm
v5.0.5
7,863 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
66 /100 Good
Development Activity 48
Maintenance 32
Community 84
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
86 /100 Excellent
Architecture 90
Code Quality 88
Innovation 86
Learning Curve 78

Octokit is the official GitHub SDK for JavaScript, bundling GitHub’s core Octokit libraries into a single, universal package. It combines a REST and GraphQL API client, a GitHub App and OAuth client, and a pre-authenticated Action client, so you can call any part of GitHub’s platform APIs from browsers, Node.js, or Deno.

Built as a thin, pre-configured composition over @octokit/core and its plugin ecosystem, Octokit ships with authentication, automatic pagination, request retries, and rate-limit throttling wired in by default, while remaining fully decomposable and extendable through plugins.

What You Get

  • A unified Octokit client exposing typed REST endpoint methods (octokit.rest.*), a raw octokit.request(), and GraphQL queries against GitHub’s APIs.
  • App and OAuthApp clients for GitHub App authentication, installation tokens, webhook handling, and OAuth flows, including a ready-made Node middleware.
  • Built-in best-practice plugins: automatic pagination (REST and GraphQL), request retries, and rate-limit/secondary-rate-limit throttling enabled by default.
  • Full TypeScript declarations and 100% test coverage across the underlying libraries, with universal ESM builds for browser, Node, and Deno.

Common Use Cases

  • Building GitHub integrations, bots, and automation that read from and write to the REST and GraphQL APIs.
  • Authenticating as a GitHub App and acting on behalf of installations to open issues, manage repos, or respond to events.
  • Handling GitHub webhooks and OAuth login flows in a Node server via the provided App SDK and middleware.
  • Scripting repository tasks inside GitHub Actions with the pre-authenticated Action client.

Under The Hood

Architecture — Octokit is a deliberately thin composition layer rather than a monolith. src/octokit.ts takes Octokit from @octokit/core and applies five plugins — restEndpointMethods, paginateRest, paginateGraphQL, retry, and throttling — then calls .defaults() to bake in a userAgent and default onRateLimit/onSecondaryRateLimit handlers. src/app.ts similarly wraps @octokit/app and @octokit/oauth-app, calling .defaults({ Octokit }) so the App and OAuthApp clients construct pre-configured Octokit instances. src/index.ts re-exports Octokit, App, OAuthApp, createNodeMiddleware, and RequestError, giving a single import surface over the whole library family.

Tech Stack — Written in TypeScript (ESM, with a type: module package and Node >= 20). Its runtime dependencies are entirely the scoped @octokit/* packages (core, app, oauth-app, the paginate/retry/throttling/rest-endpoint plugins, request-error, types, webhooks). Build uses a custom scripts/build.mjs plus tsc and esbuild; tests run on Vitest with v8 coverage; nock and mockdate provide HTTP and time mocking. Conditional exports require consumers to use node16 module resolution.

Code Quality — The library states 100% test coverage across its underlying libraries. This top-level package keeps test/ focused on integration and smoke concerns (app.test.ts, smoke.test.ts) plus a typescript-validate.ts type-level test run under strict tsc flags. The throttle callbacks are cleanly separated and annotated with v8-ignore preserve comments; naming is consistent and idiomatic. Because the real logic lives in the composed @octokit/* packages, this repo is intentionally small and readable.

API Design — Ergonomics are a core selling point. A single new Octokit({ auth }) yields typed octokit.rest.* methods, a raw octokit.request(), GraphQL queries, and automatic pagination, with retries and throttling on by default so most users need no configuration. Authentication is swappable via authStrategy, and App/OAuthApp collapse multi-step GitHub App flows into a few lines. The README is extensive with copy-paste examples for browsers, Deno, and Node, keeping the getting-started boilerplate minimal.

Used by 21 apps in this directory

TypeScript
92%
MIT

Kaneo

Product Management · Productivity · Project Management

9,574

Lightweight self-hosted project management that gives you kanban boards, GitHub sync, and full team collaboration without the enterprise bloat.

View details
87
Repo Health
81
Technical
70
Dependency
Built with
TypeScript 92%
Updated 6 days ago
TypeScript
96%
AGPL 3.0

Libra AI

AI Development · No Code Platforms

1,695

Open-source AI-powered platform that generates and deploys full-stack web applications from natural language prompts, built natively for Cloudflare Workers.

View details
31
Repo Health
71
Technical
68
Dependency
Built with
TypeScript 96%
Updated 1 years ago
TypeScript
97%
Other

Lightdash

Analytics · Data Engineering

6,196

The open-source Looker alternative that turns your dbt project's metrics and dimensions into governed, self-serve charts and dashboards — no license key required.

View details
93
Repo Health
84
Technical
64
Dependency
Built with
TypeScript 97%
Updated 6 days ago
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

29,041

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
90
Repo Health
73
Technical
65
Dependency
Built with
TypeScript 99%
Updated 6 days ago
TypeScript
87%
MIT

medusa

Ecommerce

36,897

The most flexible open-source commerce platform — build B2C, B2B, and marketplace applications with modular, composable commerce primitives.

View details
94
Repo Health
87
Technical
63
Dependency
Built with
TypeScript 87%
JavaScript 12%
Updated 1 weeks ago
TypeScript
88%
MIT

Mistle

AI Agents · Developer Tools

95

Self-hostable platform for running autonomous coding agents in isolated, credentialless sandboxes with brokered credentials, reusable snapshots, and event-driven triggers.

View details
50
Repo Health
76
Technical
70
Dependency
Built with
TypeScript 88%
Rust 11%
Updated 4 weeks ago
TypeScript
65%
Other

NocoDB

Databases · Low Code Platforms · No Code Platforms

65,340

Turn any SQL database into a collaborative no-code spreadsheet with automatic REST APIs and real-time views.

View details
91
Repo Health
77
Technical
63
Dependency
Built with
TypeScript 65%
Vue 30%
Updated 6 days ago
TypeScript
99%
Apache 2.0

Onlook

AI Design Tools · Design Tools

26,996

An open-source, AI-first visual editor that lets designers and developers build, style, and deploy React apps directly in code — no handoff required.

View details
63
Repo Health
80
Technical
64
Dependency
Built with
TypeScript 99%
Updated 1 weeks ago
TypeScript
98%
Other

Outline

Collaboration · Knowledge Management

41,045

A fast, real-time collaborative knowledge base for growing teams built on React, Node.js, and ProseMirror.

View details
91
Repo Health
87
Technical
68
Dependency
Built with
TypeScript 98%
Updated 6 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers