Skip to content

Releases: kriasoft/srcpack

v0.1.15

30 Jan 16:07
b20a912

Choose a tag to compare

External Pattern Support

Patterns referencing parent directories (../) now skip .gitignore filtering since it only applies to files within the working directory.

// srcpack.config.ts
export default {
  bundles: {
    context: {
      include: [
        "src/**/*.ts",           // Respects .gitignore
        "../shared/utils/**/*",  // Skips .gitignore (external)
      ],
    },
  },
};

Full Changelog: v0.1.14...v0.1.15

v0.1.14

24 Jan 21:02
f336787

Choose a tag to compare

What's Changed

Full Changelog: v0.1.13...v0.1.14

v0.1.10

24 Jan 09:14
176dc80

Choose a tag to compare

New Features

Prompt Option

Prepend instructions or file content to bundles for LLM context:

export default defineConfig({
  bundles: {
    review: {
      include: "src/**/*",
      prompt: "./prompts/review.md",  // load from file
    },
    analyze: {
      include: "lib/**/*",
      prompt: "Analyze this code for performance issues.",  // inline
    },
  },
});

Root Option

Bundle from a subdirectory (useful for monorepos):

export default defineConfig({
  root: "./packages/app",
  bundles: {
    app: "src/**/*",  // matches packages/app/src/**/*
  },
});

emptyOutDir Option

Control output directory cleaning:

npx srcpack --emptyOutDir      # always empty
npx srcpack --no-emptyOutDir   # never empty

Auto-enabled when outDir is inside project root; shows warning otherwise.

Upload Exclude

Skip specific bundles from upload:

upload: {
  provider: "gdrive",
  clientId: "...",
  clientSecret: "...",
  exclude: ["local", "debug"],
}

Bug Fixes

  • Fix gitignore negation pattern support (e.g., !build/keep.txt now works correctly)
  • Optimize gitignore handling by passing patterns to fast-glob for better performance

Other Changes

  • Add GitHub Actions CI workflow for automated testing
  • Update dependencies (ora, prettier, vue, rollup)

Full Changelog: v0.1.6...v0.1.10

v0.1.6

18 Jan 12:19
d505d50

Choose a tag to compare

Features

  • Force-include patterns — Use + prefix to include gitignored files (e.g., +docs/**/*.local.md)
  • Node.js compatibility — Works with both Node.js and Bun runtimes

Example

bundles: {
  docs: [
    "docs/**/*",           // respects .gitignore
    "+docs/**/*.local.md", // force-include local notes
  ],
}

Other Changes

  • Add comprehensive documentation site at kriasoft.com/srcpack
  • Add llms.txt and llms-full.txt for LLM discoverability
  • Add community section with Discord link

Full Changelog: v0.1.3...v0.1.6

v0.1.3

17 Jan 22:31

Choose a tag to compare

Initial release of srcpack — a zero-config CLI for bundling code into LLM-optimized context files.

Features

  • Semantic bundles — Split by domain (web, api, db) not arbitrary size
  • Indexed output — File list with line numbers for easy LLM reference
  • Safe defaults — Respects .gitignore, excludes binaries and secrets
  • Zero config — Works out of the box, optional srcpack.config.ts for customization
  • Google Drive upload — Sync bundles to Drive for use with ChatGPT, Gemini, etc.

Usage

npx srcpack              # Bundle all, upload if configured
npx srcpack web api      # Bundle specific bundles only
npx srcpack init         # Interactive config setup
npx srcpack login        # Authenticate with Google Drive

Configuration

import { defineConfig } from "srcpack";

export default defineConfig({
  bundles: {
    web: "apps/web/**/*",
    api: ["apps/api/**/*", "!**/*.test.ts"],
  },
});