octokit.js

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

What is octokit.js?

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

Overview of octokit.js

What it is

octokit.js is an all-batteries-included GitHub SDK for Browsers, Node.js, and Deno. It integrates three main Octokit libraries: the API client (REST API requests, GraphQL API queries, Authentication), the App client (GitHub App & installations, Webhooks, OAuth), and the Action client (Pre-authenticated API client for single repository).

Key features

  • Complete: All features of GitHub's platform APIs are covered.
  • Prescriptive: All recommended best practices are implemented.
  • Universal: Works in all modern browsers, Node.js, and Deno.
  • Tested: All libraries have a 100% test coverage.
  • Typed: All libraries have extensive TypeScript declarations.
  • Decomposable: Use only the code you need; you can build your own Octokit in only a few lines of code or use the underlying static methods.
  • Extendable: Add functionalities with plugins, hook into the request or webhook lifecycle, or implement your own authentication strategy.

Use cases

octokit.js can be used to send requests to GitHub's REST API and queries to GitHub's GraphQL API. It supports authentication via static tokens, GitHub App installations, and other strategies. It is suitable for building applications that interact with GitHub, such as automating repository management, handling webhooks, implementing OAuth flows, and creating GitHub Actions.

Getting started

For Node.js, install with npm/pnpm install octokit, or yarn add octokit.import { Octokit, App } from 'octokit';For browsers, load octokit directly from esm.sh.<script type="module">import { Octokit, App } from "https://esm.sh/octokit";</script>For Deno, load octokit directly from esm.sh.import { Octokit, App } from "https://esm.sh/octokit?dts";

License and pricing

The license is MIT. The pricing type is open source.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/octokitoctokitjs.svg)](https://yunodb.com/tools/octokitoctokitjs?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/octokitoctokitjs?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/octokitoctokitjs.svg" alt="Featured on YunoDB" height="20"></a>