Crates.io | dumpfiles |
lib.rs | dumpfiles |
version | 0.3.0 |
created_at | 2024-08-27 14:22:25.297223+00 |
updated_at | 2025-09-22 21:09:47.618154+00 |
description | A CLI and library for generating structured YAML representations of directory contents, optimized for efficiently sharing codebases with LLMs. |
homepage | https://github.com/arbfay/dumpfiles |
repository | https://github.com/arbfay/dumpfiles |
max_upload_size | |
id | 1353445 |
size | 62,363 |
dumpfiles
is a Rust command-line tool to generate a structured YAML representation of a directory's contents, including metadata and the contents of text files.
It's designed to make it easy to share an entire code repository or any set of text files to an LLM (GPT-4o, Claude, etc.) for analysis or documentation.
.gitignore
files, ie. it will ignore files specified in .gitignore
.gitignore
files, in a .dumpignore
fileTo install dumpfiles
, you need to have Rust and Cargo installed on your system. Then, you can build the project from source:
cargo install dumpfiles
dumpfiles [OPTIONS] <DIRECTORY>
This will scan <directory>
and output a output.yaml
file.
<DIRECTORY>
: Path to the directory to process-o, --output <FILE>
: Path to the output file (default: "output.yaml")-g, --gitignore <FILE>
: Path to the .gitignore file (default: ".gitignore")--no-gitignore
: Ignore the .gitignore file-d, --dumpignore <FILE>
: Path to the .dumpignore file (default: ".dumpignore")-i, --ignore <PATTERN>
: Additional ignore pattern (can be used multiple times)dumpfiles src/ -o project_dump.yaml -d ../.dumpignore -i uv.lock
This command will process the src
directory, ignore all files specified in the ../.dumpignore
file, and save the output to project_dump.yaml
.
A generated output.yaml might look like this:
Example:
project: my_project
files:
- path: Cargo.toml
size: "1.5 KB"
lines: 20
tokens: 50
content: |
[package]
name = "my_project"
version = "0.1.0"
- path: src/main.rs
size: "3.2 KB"
lines: 120
tokens: 500
content: |
fn main() {
println!("Hello, world!");
}
Contributions are welcome! Please feel free to submit a PR or open an issue.
This project is licensed under the MIT License - see the LICENSE file for details.