On GitHub, simonw/files-to-prompt has picked up 2.8k stars, Python. Concatenate a directory full of files into a single prompt for use with LLMs
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
--ignore <pattern>: Specify one or more patterns to ignore. Can be used multiple times. Patterns may match file names and directory names, unless you also specify --ignore-files-only. Pattern syntax uses fnmatch, which supports *, ?, [anychar], [!notchars] and [?] for special character literals.
my_directory/file1.txt
---
Contents of file1.txt
---
my_directory/file2.txt
---
Contents of file2.txt
---
my_directory/subdirectory/file3.txt
---
Contents of file3.txt
---
If you run files-to-prompt my_directory --include-hidden, the output will also include .hidden_file.txt:
my_directory/.hidden_file.txt
---
Contents of .hidden_file.txt
---
...
If you run files-to-prompt my_directory --ignore "*.log", the output will exclude temp.log:
my_directory/file1.txt
---
Contents of file1.txt
---
my_directory/file2.txt
---
Contents of file2.txt
---
my_directory/subdirectory/file3.txt
---
Contents of file3.txt
---
If you run files-to-prompt my_directory --ignore "sub*", the output will exclude all files in subdirectory/ (unless you also specify --ignore-files-only):
my_directory/file1.txt
---
Contents of file1.txt
---
my_directory/file2.txt
---
Contents of file2.txt
---
Reading from stdin
The tool can also read paths from standard input. This can be used to pipe in the output of another command:
# Find files modified in the last day
find . -mtime -1 | files-to-prompt
When using the --null (or -0) option, paths are expected to be NUL-separated (useful when dealing with filenames containing spaces):
Does simonw/files-to-prompt have a project website?
No homepage URL was recorded for simonw/files-to-prompt in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How many stars does simonw/files-to-prompt have?
simonw/files-to-prompt has 2.8k GitHub stars — refresh the page for the live number, or check github.com/simonw/files-to-prompt. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is simonw/files-to-prompt open source?
Yes — simonw/files-to-prompt ships under the Apache-2.0 license, which makes its source code freely readable (and, depending on license terms, forkable and reusable). Source: github.com/simonw/files-to-prompt.
What is simonw/files-to-prompt?
simonw/files-to-prompt (simonw/files-to-prompt) is a Python project on GitHub. From the project's own README: Concatenate a directory full of files into a single prompt for use with LLMs
Where do I read more about simonw/files-to-prompt?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/simonw/files-to-prompt is the definitive source.
Read full README in the tab above.
Is files-to-prompt worth your time?
ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of files-to-prompt.