files-to-prompt is a Python command-line tool that takes one or more files or entire directories and concatenates their contents into a single, LLM-friendly prompt. It walks the directory tree, outputting each file preceded by its relative path and a separator, so a model can understand which content came from where. The tool is aimed at workflows where you want to ask an LLM questions about a whole codebase, documentation set, or notes folder without manually copying files together. It includes rich filtering controls, letting you limit by extension, include or skip hidden files, and ignore paths that match glob patterns or .gitignore rules. The output format is flexible: you can emit plain text, Markdown with fenced code blocks, or a Claude-XML style format designed for structured multi-file prompts. It can read file paths from stdin (including NUL-separated paths), which makes it easy to combine with find, rg, or other shell tools.

Features

  • Concatenates files or entire directories into a single, structured prompt for LLMs
  • Adds relative file paths and separators between files for clear context boundaries
  • Extension filters, include-hidden flag, ignore patterns and .gitignore integration for precise file selection
  • Multiple output formats, including plain text, Markdown with fenced code blocks, and Claude XML
  • Supports reading paths from stdin, with optional NUL-separated mode for filenames with spaces
  • Simple pip installation and a concise CLI interface built for shell pipelines

Project Samples

Project Activity

See All Activity >

License

Apache License V2.0

Follow files-to-prompt

files-to-prompt Web Site

Other Useful Business Software
Our Free Plans just got better! | Auth0 Icon
Our Free Plans just got better! | Auth0

With up to 25k MAUs and unlimited Okta connections, our Free Plan lets you focus on what you do best—building great apps.

You asked, we delivered! Auth0 is excited to expand our Free and Paid plans to include more options so you can focus on building, deploying, and scaling applications without having to worry about your security. Auth0 now, thank yourself later.
Try free now
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of files-to-prompt!

Additional Project Details

Programming Language

Python

Related Categories

Python Large Language Models (LLM)

Registered

1 day ago