Skip to content

SrcpackMake your codebase explain itself

Bundle your code for LLMs. Get precise answers via ChatGPT, Grok, Gemini.

Srcpack App Interface

The Problem

Pasting raw source code into LLMs doesn't work well.

๐Ÿ“

Too Large

Context windows fill up fast. Critical code gets cut off.

๐Ÿ—‘๏ธ

Too Noisy

Lock files, configs, and boilerplate drown out your code.

๐ŸŒ€

Lost in the Middle

LLMs struggle with long contexts. Important code gets ignored.

Before & After

Before

  • โœ• Dump entire repo into prompt
  • โœ• Hit context limits
  • โœ• Get vague or wrong answers
  • โœ• Repeat yourself constantly

After

  • โœ“ Bundle relevant code by domain
  • โœ“ Include file index with line numbers
  • โœ“ Get precise, referenced answers
  • โœ“ Share context once, ask many times

How It Works

Define semantic bundles. Get indexed, LLM-ready output.

srcpack.config.ts
import { defineConfig } from "srcpack";

export default defineConfig({
  bundles: {
    web: ["app/**", "components/**"],
    api: ["server/**", "routes/**"],
    db: ["prisma/**", "migrations/**"],
  },
});
Output Format
# srcpack: web
# Generated: 2025-01-17

## Files (12 files, 2,847 lines)

| # | File | Lines |
|---|------|-------|
| 1 | app/layout.tsx | 45 |
| 2 | app/page.tsx | 128 |
| 3 | components/Button.tsx | 67 |
...

## Contents

### [1] app/layout.tsx
```tsx
export default function RootLayout...
```

Ready to try?

Run a single command. Zero configuration required.

npx srcpack