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

srcpack

v0.1.15

Published

Zero-config CLI for bundling code into LLM-optimized context files

Readme

Srcpack

Zero-config CLI for bundling code into LLM-optimized context files.

Requirements: Node.js 20+ or Bun

Quick Start

npx srcpack init         # Create config interactively
npx srcpack              # Bundle all

Why

LLM context fails when codebases are large, noisy, or poorly organized. Srcpack lets you split code into semantic bundles (e.g., web, api, docs) with clear file boundaries and an index header—optimized for ChatGPT, Claude, Gemini, etc.

Configuration

Create srcpack.config.ts in your project root:

import { defineConfig } from "srcpack";

export default defineConfig({
  bundles: {
    web: "apps/web/**/*",
    api: ["apps/api/**/*", "!apps/api/**/*.test.ts"],
    docs: {
      include: "docs/**/*",
      index: false, // disable index header
    },
  },
});

Or add to package.json:

{
  "srcpack": {
    "bundles": {
      "web": "apps/web/**/*"
    }
  }
}

Options

| Option | Default | Description | | ------------- | ---------- | -------------------------------------- | | outDir | .srcpack | Output directory for bundles | | emptyOutDir | true* | Empty output directory before bundling | | bundles | — | Named bundles with glob patterns | | upload | — | Upload destination(s) |

*emptyOutDir defaults to true when outDir is inside project root. When outDir is outside root, a warning is emitted unless explicitly set.

Bundle Config

// Simple glob
"src/**/*"

// Array with exclusions (! prefix)
["src/**/*", "!src/**/*.test.ts"]

// Force-include gitignored files (+ prefix)
["docs/**/*", "+docs/**/*.local.md"]

// Full options
{
  include: "src/**/*",
  outfile: "~/Downloads/bundle.txt",   // custom output path
  index: true,                         // include index header (default)
  prompt: "./prompts/review.md"        // prepend from file (or inline text)
}

Patterns follow glob syntax. Prefix with ! to exclude, + to force-include (bypasses .gitignore). Binary files are excluded.

Google Drive Upload

To upload bundles to Google Drive, add OAuth credentials to your config:

export default defineConfig({
  bundles: {
    /* ... */
  },
  upload: {
    provider: "gdrive",
    folderId: "1ABC...", // Google Drive folder ID (from URL)
    clientId: "...",
    clientSecret: "...",
    exclude: ["local"], // skip specific bundles
  },
});

Setup:

  1. Go to Google Cloud Console
  2. Create a project (or select existing)
  3. Enable the Google Drive API
  4. Go to CredentialsCreate CredentialsOAuth client ID
  5. Select Desktop app, then copy the client ID and secret
  6. Run npx srcpack login to authenticate

Output Format

# Index (3 files)
# [1]   src/index.ts  L1-L42 (42 lines)
# [2]   src/utils.ts  L43-L89 (47 lines)
# [3]   src/api.ts    L90-L150 (61 lines)

#==> [1] src/index.ts <==
import { utils } from "./utils";
...

#==> [2] src/utils.ts <==
export function utils() {
...
  • Numbered entries for easy cross-reference in conversations
  • Line ranges point to actual content lines
  • # prefix keeps format safe inside code blocks

CLI

npx srcpack                 # Bundle all, upload if configured
npx srcpack web api         # Bundle specific bundles only
npx srcpack --dry-run       # Preview without writing files
npx srcpack --emptyOutDir   # Empty output directory before bundling
npx srcpack --no-emptyOutDir # Keep existing files in output directory
npx srcpack --no-upload     # Bundle only, skip upload
npx srcpack init            # Interactive config setup
npx srcpack login           # Authenticate with Google Drive

API

import { defineConfig, loadConfig } from "srcpack";

// In config files
export default defineConfig({
  bundles: { web: "apps/web/**/*" },
});

// Programmatic
const config = await loadConfig();

LLM Context

  • https://kriasoft.com/srcpack/llms.txt
  • https://kriasoft.com/srcpack/llms-full.txt

Community

New contributors and OSS maintainers are welcome — join us on Discord or open an issue / PR.

Backers

              

License

MIT