# files-to-prompt
files-to-prompt is an open source utility created by [[Simon Willison]] to concatenate a full codebase (folder and sub-folders) to a single LLM prompt.
It's very useful to then question [[Large Language Models (LLMs)]] about how a codebase is structured, how it works, etc.
## Installation
It's a simple python package:
````shell
pip install files-to-prompt
````
## Usage
Example:
```
git clone https://github.com/bytecodealliance/componentize-py
cd componentize-py
files-to-prompt . -c | llm -m gemini-2.0-pro-exp-02-05 \
-s 'How does this work? Does it include a python compiler or AST trick of some sort?'
```
## References
- Source code and documentation: https://github.com/simonw/files-to-prompt
- Update post: https://simonwillison.net/2025/Feb/14/files-to-prompt/
## Related
- [[Code2Prompt]]
- [[CodeWeaver]]