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

aibundle

v4.0.0

Published

Smart, extensible CLI that turns any code project into token-optimized context bundles for AI chats. Written in TypeScript.

Readme

aibundle — AI Project Packer

Turns any code project into token-optimized context bundles you can paste into an AI chat. Written in TypeScript, zero runtime dependencies, works for TypeScript/React first and gives a sensible output for any other language.

CI npm license

Why

Chat models cannot read your whole repository, and copying files by hand wastes tokens on the wrong files. aibundle walks the project, ranks every file by how much a reader actually needs it, compresses the source, removes secrets, and emits a single bundle in the format your model likes best.

Run it without installing

npx aibundle --help          # once published
npx aibundle . --preset claude -o .aibundle

npx downloads the package on demand and runs the aibundle binary; nothing is added to your global install. A Node.js >= 18 runtime has to be present — the package itself has no dependencies.

Install

npm install -g aibundle     # gives you the `aibundle` command
# or, from a clone:
npm install && npm run build && npm link

Quick start

aibundle                          # interactive wizard in the current directory
aibundle . --yes                  # non-interactive, sensible defaults
aibundle ./my-app --preset claude --toc
aibundle . -f markdown,zip -c aggressive -t 110k
aibundle . --dry-run --verbose    # scan and report, write nothing

Or, straight from the source tree without linking:

node ./bin/aibundle.js --help

What it produces

| Format | Use it for | | ---------- | ------------------------------------------------------ | | markdown | the default; pastes into any chat | | xml | Claude's <documents> layout | | json | programmatic use and round-tripping | | plain | plain text with ## File: headings, repomix-style | | repomix | familiar to repomix users | | zip | a real archive holding every format plus the raw files |

Plus REPORT.md and manifest.json, which state exactly what was included, dropped or redacted.

Presets

chat, claude, gemini, openai, archive — each sets a sensible format set, compression level and token budget. Any flag overrides the preset.

| Preset | Formats | Intent | | --------- | -------------------------------- | ------------------------------------------------- | | chat | markdown | fits any chat UI and keeps the full tree | | claude | xml, markdown | an unambiguous <documents> wrapper | | openai | markdown | tuned to a 128k window, trimmed for the answer | | gemini | markdown, xml | keeps more of the project, for a 1M-token window | | archive | markdown, json, xml, zip | everything, uncompressed, for storage or hand-off |

Safety

  • Redaction runs in two layers: well-known token shapes (sk-…, ghp_…, AIza…, JWTs, private-key blocks, URLs with credentials) are caught by shape alone, and KEY = "value" assignments whose key looks sensitive are caught by name. Placeholders such as process.env.X or changeme are left intact so the output stays honest.
  • The output directory is never scanned, so a second run cannot eat its own first output.
  • The report is honest: a file that was dropped for budget reasons is named in REPORT.md.

Compression levels

none keeps everything, light collapses blank runs, balanced also strips comments while keeping imperative comments (eslint-disable, @ts-expect-error), aggressive additionally elides long function bodies — never control flow.

Configuration

A .aibundlerc.json in the project root is merged with the built-in defaults and the CLI flags (flags win). Unknown keys are reported rather than ignored.

{
  "preset": "claude",
  "formats": ["xml", "markdown"],
  "compression": "balanced",
  "maxTokens": 160000,
  "ignore": ["**/*.snap"],
  "redact": true
}

Library use

import { packProject, buildBundle, renderReport } from "aibundle";

const bundle = await packProject({ root: process.cwd(), preset: "claude" });
console.log(bundle.totals.files, "files ·", bundle.totals.tokens, "tokens");

Extending

Add an analyzer or a renderer in a few lines — see docs/EXTENDING.md. The architecture and the output schema are described in docs/ARCHITECTURE.md and docs/OUTPUT-SCHEMA.md.

Development

npm ci              # install dev deps (TypeScript + @types/node only)
npm run typecheck   # tsc --noEmit, strict
npm test            # build + node --test (69 tests)
npm run verify      # typecheck, then tests

Publishing

The repository ships a release script, a CI workflow and a tag-driven publish workflow. The full walk-through is in docs/PUBLISHING.md; the short version:

node scripts/publish.mjs --dry-run   # verify + tests + show the exact tarball
node scripts/publish.mjs             # typecheck, test, then `npm publish`

Publishing to npm needs an account (and a token in CI); pushing to GitHub needs a repository you own. Both steps and the npx wiring are explained in docs/PUBLISHING.md.

License

MIT — see LICENSE.