simonw/files-to-prompt
View on GitHub ↗ ★ 2,803 Python
Concatenate a directory full of files into a single prompt for use with LLMs
20 mentions on Hacker News by 14 people: 1 story, 19 comments · first 2024-06-25 · latest 2026-07-07
20082026
-
…in that it won't accept a lot of file formats, but appending .txt to the end works. I also use https://github.com/simonw/files-to-prompt to combine everything into one file which also helps.
comment by techniko · 2026-07-07 · in Microsoft 365 Copilot adoption is under 4.5%, only 1% use it weekly -
I wrote a tool for that: https://github.com/simonw/files-to-prompt - and there are other similar tools like repomix. These days I often use https://gitingest.com - it can grab any full repo on GitHub has something you can copy and paste,…
comment by simonw · 2025-10-23 · in Living Dangerously with Claude -
…into a .txt file" I think simonw has a tool that also does something like this? Edit- found it: https://github.com/simonw/files-to-prompt
comment by indigodaddy · 2025-04-22 · in An update to our pricing -
He mentions what he used here, https://simonwillison.net/2025/Mar/26/notes/ . https://github.com/simonw/files-to-prompt https://llm.datasette.io/
comment by Jimpulse · 2025-03-26 · in Gemini 2.5 Pro reasons about task feasibility -
Files-to-prompt has been a surprisingly useful tool for this kind of workflow. https://github.com/simonw/files-to-prompt
comment by the_king · 2025-02-14 · in Show HN: Transform your codebase into a single Markdown doc for feeding into AI -
I've been enjoying `files-to-prompt` by Simon Willison: https://github.com/simonw/files-to-prompt
comment by lars512 · 2025-02-14 · in Show HN: Transform your codebase into a single Markdown doc for feeding into AI -
…on it here today. The multi-step actions are very promising. I'm about to try files-to-prompt ( https://github.com/simonw/files-to-prompt ) mentioned elsewhere in the thread. For now, LLMs are a level-up in tooling but not a replacement…
comment by elwillbo · 2025-02-04 · in How I use LLMs as a staff engineer -
…against o1 and Gemini Thinking and the new o3-mini - I paste in the whole codebase (usually via my https://github.com/simonw/files-to-prompt tool) and describe the bug or just paste in the error message and the model frequently finds the…
comment by simonw · 2025-02-04 · in How I use LLMs as a staff engineer -
https://github.com/simonw/files-to-prompt/ seems to work fine especially for Claude as it follows the recommendations and format.
comment by johnisgood · 2025-01-19 · in Yek: Serialize your code repo (or part of it) to feed into any LLM -
I have to add https://github.com/simonw/files-to-prompt as a marker guid. I think "the part of it" is key here. For packaging a codebase, I'll select a collection of files using rg/fzf and then concatenate them into a markdown document, #…
comment by sitkack · 2025-01-19 · in Yek: Serialize your code repo (or part of it) to feed into any LLM -
I use my https://github.com/simonw/files-to-prompt tool like this: files-to-prompt . -e py -e md -c | pbcopy Now I have all the Python and Markdown files from the current project on my clipboard, in Claude's recommended XML-like format…
comment by simonw · 2025-01-01 · in Things we learned about LLMs in 2024 -
…and ask questions like "which modules handle incoming API request validation?" - that's why I built https://github.com/simonw/files-to-prompt
comment by simonw · 2024-12-31 · in Things we learned about LLMs in 2024 -
…Unlike the many other existing competing projects-- to name just a few: files-to-prompt: https://github.com/simonw/files-to-prompt repo2txt: https://repo2txt.simplebasedomain.com/ code2prompt: https://github.com/mufeedvh/code2prompt…
comment by eigenvalue · 2024-12-14 · in Source to Prompt- Turn your code into an LLM prompt, but with more features -
If I understand correctly, this sounds like https://github.com/simonw/files-to-prompt/ . It's quite useful, with some filtering options (hidden files, gitignore, extensions) and support for Claude-style tags.
comment by maleldil · 2024-12-05 · in Show HN: Replace "hub" by "ingest" in GitHub URLs for a prompt-friendly extract -
…model. That's enough to fit a LOT of code, so I've occasionally dumped my entire codebase (using my https://github.com/simonw/files-to-prompt/ tool) in there, or selected pieces that are important like the model and URL definitions.
comment by simonw · 2024-10-25 · in Everything I built with Claude Artifacts this week -
Similar https://github.com/simonw/files-to-prompt
comment by rectalogic · 2024-09-10 · in Show HN: Vomitorium – all of your project in 1 text file -
…makes his better? Since you're asking, I tried these and here's my verdict: - [files-to-prompt]( https://github.com/simonw/files-to-prompt ) (from the GOAT simonw) --> There's no option to specify files to include, must work backwards with…
comment by samsepi01 · 2024-09-10 · in Show HN: Dump entire Git repos into a single file for LLM prompts -
…common these days. Here are a few I've collected over the past few months: - [files-to-prompt]( https://github.com/simonw/files-to-prompt ) (from the GOAT simonw) - [code2prompt]( https://github.com/mufeedvh/code2prompt ) -…
comment by subeadia · 2024-09-09 · in Show HN: Dump entire Git repos into a single file for LLM prompts -
…that to work (GPT-4o zsh snippet): for file in *.rst; do mv "$file" "${file%.rst}.rst.txt"; done My https://github.com/simonw/files-to-prompt tool might also be useful here, for turning a bunch of different files into a single file to…
comment by simonw · 2024-06-25 · in Anthropic Introduces Claude Projects