How I bundle my codebase so ChatGPT can actually understand it

Published: (January 19, 2026 at 05:21 AM EST)
2 min read
Source: Dev.to

Source: Dev.to

Problem

LLM chat apps are great at answering questions—until you point them at a real codebase.
When a project grows past a certain size, context becomes the bottleneck: too many files, too much noise, not enough structure.

Typical LLM chat apps work best when:

  • Context is linear
  • Files are grouped by meaning, not size
  • References are precise (file + line)

Real repositories, however, are:

  • Hierarchical
  • Noisy
  • Full of things the model doesn’t need

The result is vague or hallucinated answers.

Solution: srcpack

Instead of feeding the whole repo, generate an LLM‑optimized snapshot:

  • Code is bundled by domain (e.g., web, api, docs, etc.)
  • Each bundle is indexed with file paths + line numbers
  • .gitignore is respected by default
  • No configuration needed to get started

The output consists of plain‑text files, easy to upload or attach to ChatGPT, Gemini, Claude, etc.
The tool is called srcpack.

Workflows where srcpack shines

  • Exploring large repos – Ask “where does auth actually live?” or “what touches billing?”
  • Avoiding context limits – Instead of pasting files manually, attach a focused bundle.
  • Sharing with non‑technical teammates – Upload an LLM‑friendly snapshot to Google Drive and share it.

Typical questions from PMs or designers:

  • “What shipped this week?”
  • “What’s still in progress?”
  • “Which parts are risky?”

srcpack acts like a lightweight, read‑only AI interface to the codebase.

Usage

npx srcpack   # or bunx srcpack

Zero configuration is required by default.

Documentation & Source

  • Docs:
  • GitHub:

Closing Thought

I don’t think this is the final answer to LLM + codebase interaction, but it’s been a very practical improvement for day‑to‑day work. I’m curious how others are handling large‑repo context with LLMs—especially in fast‑moving projects.

Back to Blog

Related posts

Read more »

𝗗𝗲𝘀𝗶𝗴𝗻𝗲𝗱 𝗮 𝗣𝗿𝗼𝗱𝘂𝗰𝘁𝗶𝗼𝗻‑𝗥𝗲𝗮𝗱𝘆 𝗠𝘂𝗹𝘁𝗶‑𝗥𝗲𝗴𝗶𝗼𝗻 𝗔𝗪𝗦 𝗔𝗿𝗰𝗵𝗶𝘁𝗲𝗰𝘁𝘂𝗿𝗲 𝗘𝗞𝗦 | 𝗖𝗜/𝗖𝗗 | 𝗖𝗮𝗻𝗮𝗿𝘆 𝗗𝗲𝗽𝗹𝗼𝘆𝗺𝗲𝗻𝘁𝘀 | 𝗗𝗥 𝗙𝗮𝗶𝗹𝗼𝘃𝗲𝗿

!Architecture Diagramhttps://dev-to-uploads.s3.amazonaws.com/uploads/articles/p20jqk5gukphtqbsnftb.gif I designed a production‑grade multi‑region AWS architectu...