Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Concatenate a directory full of files into a single prompt for use with LLMs
| Date | Stars |
|---|---|
| 2026-08-03 | 2768 |
| 2026-08-06 | 2768 |
| 2026-08-15 | 2775 |
| 2026-08-18 | 2776 |
| 2026-08-19 | 2775 |
| 2026-08-20 | 2776 |
| 2026-08-23 | 2777 |
| 2026-08-25 | 2779 |
| 2026-08-28 | 2779 |
| 2026-08-29 | 2779 |
| 2026-09-01 | 2778 |
| 2026-09-02 | 2779 |
| 2026-09-03 | 2781 |
| 2026-09-04 | 2784 |
| 2026-09-05 | 2784 |
| 2026-09-07 | 2785 |
| 2026-09-09 | 2785 |
| 2026-09-10 | 2788 |
| 2026-09-11 | 2787 |
| 2026-09-13 | 2788 |
| 2026-09-16 | 2789 |
| 2026-09-17 | 2790 |
| 2026-09-19 | 2789 |
| 2026-09-20 | 2791 |
| 2026-09-21 | 2790 |
| 2026-09-22 | 2789 |
| 2026-09-23 | 2788 |
| 2026-09-25 | 2789 |
| 2026-09-26 | 2790 |
| 2026-09-28 | 2791 |
| 2026-09-29 | 2791 |
| 2026-09-30 | 2789 |
| 2026-10-01 | 2789 |
| 2026-10-04 | 2790 |
| 2026-10-05 | 2789 |
| 2026-10-07 | 2790 |
| 2026-10-08 | 2790 |
| 2026-10-09 | 2792 |
| 2026-10-10 | 2791 |
| 2026-10-12 | 2793 |
| 2026-10-14 | 2794 |
| 2026-10-17 | 2795 |
| 2026-10-18 | 2795 |
| 2026-10-19 | 2797 |
| 2026-10-20 | 2798 |
| 2026-10-23 | 2799 |
| 2026-10-24 | 2798 |
| 2026-10-25 | 2797 |
| 2026-10-27 | 2798 |
| 2026-10-28 | 2799 |
| 2026-10-30 | 2801 |
| 2026-11-01 | 2803 |
| 2026-11-04 | 2803 |
Today
— stars today
This week
+4 stars this week
This month
+14 stars this month
Momentum
0.0
growth rate 0.14%/day
# files-to-prompt
[](https://pypi.org/project/files-to-prompt/)
[](https://github.com/simonw/files-to-prompt/releases)
[](https://github.com/simonw/files-to-prompt/actions/workflows/test.yml)
[](https://github.com/simonw/files-to-prompt/blob/master/LICENSE)
Concatenate a directory full of files into a single prompt for use with LLMs
For background on this project see [Building files-to-prompt entirely using Claude 3 Opus](https://simonwillison.net/2024/Apr/8/files-to-prompt/).
## Installation
Install this tool using `pip`:
```bash
pip install files-to-prompt
```
## Usage
To use `files-to-prompt`, provide the path to one or more files or directories you want to process:
```bash
files-to-prompt path/to/file_or_directory [path/to/another/file_or_directory ...]
```
This will output the contents of every file, with each file preceded by its relative path and separated by `---`.
### Options
- `-e/--extension <extension>`: Only include files with the specified extension. Can be used multiple times.
```bash
files-to-prompt path/to/directory -e txt -e md
```
- `--include-hidden`: Include files and folders starting with `.` (hidden files and directories).
```bash
files-to-prompt path/to/directory --include-hidden
```
- `--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](https://docs.python.org/3/library/fnmatch.html), which supports `*`, `?`, `[anychar]`, `[!notchars]` and `[?]` for special character literals.
```bash
files-to-prompt path/to/directory --ignore "*.log" --ignore "temp*"
```
- `--ignore-files-only`: Include directory paths which would otherwise be ignored by an `--ignore` pattern.
```bash
files-to-prompt path/to/directory --ignore-files-only --ignore "*dir*"
```
- `--ignore-gitignore`: Ignore `.gitignore` files and include all files.
```bash
files-to-prompt path/to/directory --ignore-gitignore
```
- `-c/--cxml`: Output in Claude XML format.
```bash
files-to-prompt path/to/directory --cxml
```
- `-m/--markdown`: Output as Markdown with fenced code blocks.
```bash
files-to-prompt path/to/directory --markdown
```
- `-o/--output <file>`: Write the output to a file instead of printing it to the console.
```bash
files-to-prompt path/to/directory -o output.txt
```
- `-n/--line-numbers`: Include line numbers in the output.
```bash
files-to-prompt path/to/directory -n
```
Example output:
```
files_to_prompt/cli.py
---
1 import os
2 from fnmatch import fnmatch
3
4 import click
...
```
- `-0/--null`: Use NUL character as separator when reading paths from stdin. Useful when filenames may contain spaces.
```bash
find . -name "*.py" -print0 | files-to-prompt --null
```
### Example
Suppose you have a directory structure like this:
```
my_directory/
├── file1.txt
├── file2.txt
├── .hidden_file.txt
├── temp.log
└── subdirectory/
└── file3.txt
```
Running `files-to-prompt my_directory` will output:
```
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/Excerpt of 6,629 characters
Read on GitHubSimon Willison · Datasette · United States
27
1
1
1
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:9eeaacc83f84b6e1, llm:description: 'Concatenate a directory full of files into a single prompt for use with LLMs'
matched fp:9eeaacc83f84b6e1, llm:description: 'Concatenate a directory full of files into a single prompt for use with LLMs'