โš ๏ธ Heads up: this tool's official website appears to be unreachable right now. It may be offline, rebranded, or temporarily down.
Files to Prompt

Files to Prompt

โ˜… 3.8 ๐Ÿ”– 1200 saves ๐Ÿ’ฐ Free DevtoolsGitHub

Files to Prompt is a small open-source command-line tool by Simon Willison that concatenates a directory of files into a single, well-formatted prompt for use with large language models. The GitHub repository has collected around 2,800 stars and was last actively updated in 2025. It has become a staple utility in many developers’ LLM workflows because it does one job, does it quickly, and produces output in exactly the format models read best.

Overview

Point the tool at one or more directories or files and it outputs their contents with clear file-path separators, optionally in Claude’s XML format or Markdown code fences. It respects .gitignore rules, can filter by file extension, add line numbers, and include hidden files when asked. The output pipes naturally into tools like the author’s LLM CLI, so you can go from a folder of source code to a model conversation in a single shell command.

Key Features

  • Concatenates whole directory trees into one LLM-ready prompt
  • Claude XML output format with clear file delimiters
  • Markdown fence mode for chat interfaces
  • Respects .gitignore and supports extension filtering
  • Optional line numbers for precise code references
  • Installable via pip or pipx, scriptable in any shell pipeline

The tool grew out of Willison’s own daily practice of discussing code with models, and it shows in the details: sensible defaults, predictable ordering, and output that diffs cleanly. It can also print a cXML document structure that Claude models are specifically tuned to read, with each file wrapped in its own document tags and source attributes. It plays well with his companion LLM command-line tool, forming a two-command pipeline from repository to model response.

๐Ÿ’ณ Pricing

Files to Prompt is completely free and open source under the Apache-2.0 license. There is no paid version; you only pay for the model tokens you use downstream.

Who Is It For

Developers who regularly paste code into ChatGPT or Claude, and anyone building shell-based LLM workflows who needs a dependable way to package files as context.

๐Ÿš€ Visit Files to Prompt Official Site

๐Ÿšฉ Report an issue