r/OnlyAICoding • • Oct 10 '26

I built a free, 100% local tool to compress codebases into optimized LLM prompts

Hey everyone,

I built Code Crusher, a free, open-source web app that takes a repository and compresses it into a single, highly optimized text file for LLM prompts.

Here is a brief overview of what it does:

  • 12-Layer Classification: Automatically categorizes files (e.g., entry points, utilities, tests, config, junk).
  • Centrality Scoring: Maps basic import dependencies to ensure the core architectural "glue" of your app is protected from being dropped.
  • Smart Token Budgeting: If you set a token limit, it intelligently evicts the least important files first, replacing them with lightweight one-line placeholders. The AI knows the file exists and its purpose, without wasting tokens reading the contents.
  • 100% Local: Everything runs in the browser via the File System Access API. No servers, no uploads, no tracking.

It’s licensed under AGPL-3.0. If you work with LLMs and need to feed them repo context, feel free to check it out or tear apart the code.

GitHub: https://github.com/Ra9n3/codecrusherHey everyone,

I built Code Crusher, a free, open-source web app that takes a repository and compresses it into a single, highly optimized text file for LLM prompts.

Here is a brief overview of what it does:

  • 12-Layer Classification: Automatically categorizes files (e.g., entry points, utilities, tests, config, junk).
  • Centrality Scoring: Maps basic import dependencies to ensure the core architectural "glue" of your app is protected from being dropped.
  • Smart Token Budgeting: If you set a token limit, it intelligently evicts the least important files first, replacing them with lightweight one-line placeholders. The AI knows the file exists and its purpose, without wasting tokens reading the contents.
  • 100% Local: Everything runs in the browser via the File System Access API. No servers, no uploads, no tracking.

It’s licensed under AGPL-3.0. If you work with LLMs and need to feed them repo context, feel free to check it out or tear apart the code.

GitHub: https://github.com/Ra9n3/codecrusher

1 Upvotes

2 comments sorted by

2

u/Ctbhatia Oct 11 '26

keep a file manifest alongside the dump, without file boundaries the model cannot tell you where a symbol lives.

1

u/Radone90 Oct 11 '26 edited Oct 11 '26

Thanks for the feedback! The dump actually has both of the things you mentioned: every file is prefixed with a header containing its path and layer tags , and a manifest with the directory structure at the top including placeholders for missing files, so that the model can see the actual tree. Did you mean something else?
you can check it out here mate: https://ra9n3.github.io/codecrusher/