Di

Dir2txt – Dump your project into clean LLM-ready text or JSON

Hacker News

Dir2txt – Dump your project into clean LLM-ready text or JSON

Hi HN, I built dir2txt — a simple but powerful CLI tool that turns a directory tree into a clean, structured text or JSON dump. What It Does • Traverses a project directory • Dumps readable file contents • Optionally strips comments (smart detection of comment blocks + patterns) • Respects .gitignore, .dockerignore, .npmignore, etc. • Outputs LLM-friendly .json or .txt files Why I Made It Working with LLMs like GPT-4 or Claude, I kept hitting the same issue: how do I give the model meaningful access to an entire project? Manually pasting files is noisy and lossy. Existing tools like tree only give structure. I wanted one tool that could: •Structure the directory •Include the real content •Strip boilerplate if needed •Output in a format usable by RAG pipelines, code copilots, or embedders Example $>dir2txt ./my-project --strip-comments --json > project.json And then feed it into a vector DB or tokenizer for embedding + retrieval. Install Homebrew $>brew tap shubhamoy/dir2txt $>brew install dir2txt

Share card

Actual performance

1points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Missing: supports, reddit linkedin, podcasting
66%66% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: claude, model, dock · Missing: mac, agents, macos
56%56% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: friendly · Missing: plus, platform, intuitive
48%48% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Hacker NewsMay not resonate with HN audience · Strong signals: exist, existing, pipe · Missing: https docs, excited, just released
44%44% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Missing: mobile apps, ios, personal
33%33% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
13%13% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Strong signals: smart · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Correct prediction on native model

Similar products

he
heroku.json, our Sunday hack project43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

heroku.json, our Sunday hack project

Hacker News74
Element to LLM
Element to LLM49%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AI-ready JSON snapshots of your live DOM

Indie Hackers1ai
El
Eliminating text looping/latent collapse in LLM activation steering50%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Eliminating text looping/latent collapse in LLM activation steering

Hacker News1
PasteClean
PasteClean45%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Clean AI-pasted text

Indie Hackers1ai
a
a small weekendish project - JSON Blob43%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

a small weekendish project - JSON Blob

Hacker News106
JS
JSON.stringify (without circular deps) for AngularJS 1.x41%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSON.stringify (without circular deps) for AngularJS 1.x

Hacker News3
JS
JSON.is47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

JSON.is

Hacker News100
Pa
Parse JSON with Flex, Bison, and Ruby38%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Parse JSON with Flex, Bison, and Ruby

Hacker News3
Ho
Homogenius – JSON packer/unpacker47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Homogenius – JSON packer/unpacker

Hacker News1
js
json.is47%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

json.is

Hacker News10