simonw/files-to-prompt
Concatenate a directory full of files into a single prompt for use with LLMs observed · 2026-08-28
Health v2 · maintenance only
26/100
- Activity 7
- Release rhythm 28
- Longevity 63
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-02. Adoption (stars, forks) is never an input.
- gap_med: 37
- age_days: 894
- days_rel: 560
- days_push: 560
- n_releases_24m: 4
Adoption not part of the score
2779 stars · 178 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded
A Python CLI tool that concatenates a directory of files into a single prompt suitable for pasting into LLMs, with filtering by extension, ignore patterns, and output formats like Claude XML and Markdown. It is published on PyPI as files-to-prompt and actively maintained by Simon Willison.
Use cases
- concatenate a codebase into one prompt for an LLM
- feed multiple source files to Claude or ChatGPT
- prepare repository context for code review by an AI
- filter files by extension before sending to an LLM
- output files in Claude XML format
- include line numbers when sharing code with an LLM
When to choose
- you need to quickly assemble file contents into an LLM prompt from the terminal
- you want gitignore-aware filtering and multiple output formats
- you prefer a small pip-installable tool that pipes well with other commands
When to avoid
- you need an IDE plugin or GUI for building LLM context
- you need to send very large codebases exceeding model context limits
- you want automatic embedding or RAG-style retrieval instead of raw concatenation
Facets
cli-tool · maturity active
cli prompt-engineering developer-tools file-system developer-tools large-language-models files cli python cross-platform llm-prompting code-context file-concatenation cxml piped-output command-line
2 sources
- readme: https://github.com/simonw/files-to-prompt · fetched 2026-08-28 · 72ea053f66eb
- registry_pypi: https://pypi.org/pypi/files-to-prompt/json · fetched 2026-08-29 · b5a353a970a1
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| simonw/files-to-prompt | main | 26 |
For agents
markdown · JSON · MCP: product_card(name="simonw/files-to-prompt")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem