Skip to content
repo-sdk
Esc
navigateopen⌘Jpreview
On this page

Introduction

One unified, normalized TypeScript API over GitHub, GitLab, Bitbucket Cloud, Azure DevOps, and Gitea.

repo-sdk gives you a single, normalized API for the five major git providers — GitHub, GitLab, Bitbucket Cloud, Azure DevOps, and Gitea — so you write your discovery, commit, tag, download, and webhook logic once instead of five times.

It has zero runtime dependencies (raw fetch + Web Crypto only) and is edge-compatible: it runs on Node.js ≥ 20, Cloudflare Workers, and other Web-standard runtimes.

Why repo-sdk

One unified API

Swap the provider and the rest of your code stays the same. No per-provider branching.

Normalized types

Every result maps to a provider-agnostic shape — Namespace, Repository, Commit, Tag, Webhook — with the untouched payload on a raw escape hatch.

Zero dependencies

Just fetch and Web Crypto. Nothing to audit, nothing to bloat your bundle.

Edge-compatible

Runs on Node.js, Cloudflare Workers, and any Web-standard runtime.

Typed errors

Every failure is a RepoError with a stable code union, retry hints, and redacted secrets.

Capability gating

Providers differ. The client throws unsupported instead of silently dropping an option.

A first look

import { createClient } from 'repo-sdk';
import { github } from 'repo-sdk/github';

const client = createClient({
  provider: github({ auth: { token: process.env.GITHUB_TOKEN! } }),
});

// Resolve a ref (branch, tag, or SHA) to a single commit.
const head = await client.commits.get({ repo: 'capawesome-team/repo-sdk', ref: 'main' });
console.log(head.sha, head.message);

Switching providers means swapping the provider argument — the rest of your code stays the same.

Supported providers

Where to next

Was this page helpful?