npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@reposync/core

v2.0.1

Published

GitHub-powered portfolio discovery SDK

Readme

@reposync/core

Framework-independent GitHub repository discovery for Node.js applications. RepoSync Core uses Octokit for GitHub access, Remark for deterministic README metadata extraction, and Zod for external configuration validation.

Requirements

  • Node.js 24 or newer
  • A GitHub username
  • A token is optional for public repositories and required for private discovery

Installation

npm install @reposync/[email protected]
pnpm add @reposync/[email protected]

Quick start

import { RepoSync } from "@reposync/core";

const sync = new RepoSync({
  username: "your-github-username",
  topics: ["portfolio"],
  filters: {
    topicMatch: "any",
    includeForks: false,
    includeArchived: false,
    minStars: 0,
  },
});

const projects = await sync.discover();
console.log(projects);

discover() returns a stable, framework-independent Project[]. Core does not render UI, write files, or include GitHub tokens in project output.

Configuration

resolveConfig() validates and applies defaults. defineConfig() validates a configuration for use in TypeScript files. The CLI uses the same schema.

import { RepoSync } from "@reposync/core";

const sync = new RepoSync({
  username: "your-github-username",
  token: process.env.GITHUB_TOKEN,
  includePrivate: false,
  filters: {
    topics: ["typescript", "react"],
    topicMatch: "all",
    includeForks: false,
    includeArchived: false,
    minStars: 1,
  },
  sortBy: "updated",
  limit: 50,
  concurrency: 4,
});

Important options are username, token, includePrivate, topics, filters, excludeForks, excludeArchived, limit, sortBy, aliases, defaults, overrides, and concurrency. Topic matching is case-insensitive. minStars is inclusive, and limits are applied after filtering and sorting.

Private discovery is opt-in:

const sync = new RepoSync({
  username: "your-github-username",
  token: process.env.GITHUB_TOKEN,
  includePrivate: true,
});

Never expose GITHUB_TOKEN to browser code or commit it to source control.

README extraction

README parsing is deterministic and uses Markdown ASTs rather than custom regular expressions. Core extracts introductions, technologies, features, HTTP(S) demo links, safe images, nested lists, tables, and paragraphs. Code blocks are not treated as metadata. Configure section aliases when a project uses different headings:

const sync = new RepoSync({
  username: "your-github-username",
  aliases: {
    technologies: ["stack", "built with"],
    features: ["capabilities"],
    demos: ["deployment", "live site"],
  },
});

Unsafe URL schemes are rejected. Relative image paths and HTTP(S) image URLs are supported. Missing READMEs are valid; malformed API responses, excessive README content, authentication failures, rate limits, and other GitHub errors are surfaced through the exported error hierarchy.

Defaults and overrides

Metadata is resolved in this order:

individual override > global defaults > README metadata > GitHub metadata

Explicit false, 0, empty strings, and empty arrays are preserved. Full repository keys such as owner/repository take precedence over short-name compatibility entries.

const sync = new RepoSync({
  username: "your-github-username",
  defaults: { featured: false },
  overrides: {
    "owner/repository": {
      title: "Custom title",
      tags: ["TypeScript"],
      demoUrl: "https://example.com",
      featured: true,
      order: 1,
    },
  },
});

Project output

import type { Project } from "@reposync/core";

const projects: Project[] = await sync.discover();

Project includes repository identity and URLs, resolved description and title, tags, topics, technologies, features, README introduction, images, demo URL, language statistics, stars, forks, featured state, order, and updatedAt. The shape is framework-independent and stable for consumers.

Public API

The package exports RepoSync, Project, resolveConfig, defineConfig, loadConfig, parseReadme, normalizeProject, discoverRepositories, createGitHubClient, loadOverrides, diagnoseGitHub, quality analysis, sync-state helpers, and the typed error hierarchy.

Errors and limitations

Catch ConfigurationError, GitHubAuthenticationError, GitHubRateLimitError, GitHubAPIError, and RepositoryNotFoundError when applications need specific handling. API causes and rate-limit information are preserved where available, while configured tokens are redacted.

Discovery performs complete paginated repository discovery. Incremental CLI sync classifies normalized projects using local fingerprints; it does not use ETag or conditional GitHub requests. GitHub API availability, permissions, rate limits, and repository README quality can affect results.

Further documentation

License

MIT