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

@infolang/connectors

v0.1.0

Published

InfoLang source connectors (GitHub full-repo sync, Notion scaffold) — same wire contract as @infolang/setup-core's vault sync

Readme

@infolang/connectors

Source connectors that push external content into InfoLang hosted memory (https://api.infolang.ai). Currently ships a working GitHub full-repo connector and a Notion connector that's built and unit-tested but not yet wired into the CLI.

Not published to npm yet. Install from source until it is.

Install

git clone https://github.com/InfoLang-Inc/infolang-connectors.git
cd infolang-connectors
npm install
npm link   # optional: puts `infolang-connectors` on your PATH

Requires Node 18+.

Usage

infolang-connectors github sync <owner/repo> [--dry-run] [--confirm]

or, without npm link:

node bin/cli.mjs github sync <owner/repo> [--dry-run] [--confirm]

Example:

export INFOLANG_API_KEY=il_live_...
export INFOLANG_WORKSPACE_ID=3f9c1a2e-...

infolang-connectors github sync my-org/my-repo --dry-run
# review the file/chunk/byte summary and destination, then:
infolang-connectors github sync my-org/my-repo --confirm

The first confirmed sync always previews before sending, regardless of --confirm — you need one extra --confirm (or --yes/-y) run to actually push. --dry-run previews on every run, including later syncs.

On each run, the connector clones (first run) or fetches and diffs (later runs) the target repo, applies .gitignore plus a fixed set of always-excluded directories (node_modules, .git, dist, build, ...), skips detected binaries, chunks the rest (heading-aware for Markdown, boundary-aware for code), and pushes the chunks.

Programmatic use

import { syncGithubRepo } from "@infolang/connectors";

const result = await syncGithubRepo({
  ownerRepo: "my-org/my-repo",
  apiKey: process.env.INFOLANG_API_KEY,
  workspaceId: process.env.INFOLANG_WORKSPACE_ID,
  confirm: true,
});

Other exports (lib/index.mjs): pushChunks / pushViaExecute / pushViaRemember (transport layer), chunkFile / chunkMarkdown / chunkCode (chunking), resolveGithubToken / buildCloneUrl (GitHub auth), and the Notion scaffold (syncNotionWorkspace, richTextToMarkdown, blockToMarkdown, pageToMarkdown, buildAuthorizeUrl, exchangeCodeForToken).

Configuration

| Variable / flag | Required | Notes | | --- | --- | --- | | GITHUB_TOKEN / GITHUB_APP_TOKEN / GH_TOKEN / --token | No | GitHub PAT (classic: repo scope; fine-grained: Contents: Read-only) or App installation token. Public repos work with no token. | | INFOLANG_API_KEY / --api-key | Yes | il_live_* or il_test_* InfoLang API key. | | INFOLANG_WORKSPACE_ID / --workspace-id | Yes | Real workspace UUID — see below. | | --api-base | No | Defaults to https://api.infolang.ai. |

Workspace ID

Every sync needs an explicit, real, account-owned InfoLang workspace ID. There's currently no way for a connector to create or discover a workspace on its own: log into the InfoLang console, create (or pick) a workspace, and copy its UUID into INFOLANG_WORKSPACE_ID or --workspace-id.

An arbitrary string here returns 401 Unauthorized — the API only accepts a workspace the calling key is actually scoped to. Omitting the value entirely is also rejected rather than silently falling back to a default namespace, since that would defeat per-source isolation.

Notion connector

Everything under lib/notion/ (OAuth token exchange, block-children fetch with pagination, rich-text/block → Markdown conversion) is implemented and unit-tested against Notion's REST API, but there's no CLI verb for it yet and it makes no live calls. syncNotionWorkspace() returns { mode: "inactive", reason } until NOTION_CLIENT_ID / NOTION_CLIENT_SECRET are set (create an integration at notion.so/my-integrations) and a token from lib/notion/oauth.mjs's OAuth flow is passed as NOTION_TOKEN / --token.

Tests

npm test

Runs node --test test/*.test.mjs. Everything is mocked — no live network or git calls.

License

MIT — see LICENSE.md.