Crates.io | dumpfiles |
lib.rs | dumpfiles |
version | 0.1.0 |
source | src |
created_at | 2024-08-27 14:22:25.297223 |
updated_at | 2024-08-27 14:22:25.297223 |
description | A command-line tool for generating structured text representations of directory contents |
homepage | https://github.com/arbfay/dumpfiles |
repository | https://github.com/arbfay/dumpfiles |
max_upload_size | |
id | 1353445 |
size | 25,054 |
dumpfiles
is a Rust command-line tool to generate a structured text representation of a directory's contents, including file trees 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.
.gitignore
filesTo install dumpfiles
, you need to have Rust and Cargo installed on your system. Then, you can build the project from source:
git clone https://github.com/yourusername/dumpfiles.git
cd dumpfiles
cargo build --release
The compiled binary will be available in target/release/dumpfiles
.
dumpfiles [OPTIONS] <DIRECTORY>
<DIRECTORY>
: Path to the directory to process-o, --output <FILE>
: Path to the output file (default: "output.txt")-i, --ignore <PATTERN>
: Patterns to ignore (can be used multiple times, default: ".git*")-g, --gitignore <FILE>
: Path to the .gitignore file (default: ".gitignore")--no-gitignore
: Ignore the .gitignore file-h, --help
: Print help information-V, --version
: Print version informationdumpfiles /path/to/your/project -o project_dump.txt -i "*.log" -i "node_modules*"
This command will process the /path/to/your/project
directory, ignore all .log
files and the node_modules
directory, and save the output to project_dump.txt
.
The output file contains two main sections:
Example:
<tree>
project/
src/
main.rs
Cargo.toml
</tree>
<src>
<main.rs>
fn main() {
println!("Hello, world!");
}
</main.rs>
</src>
<Cargo.toml>
[package]
name = "project"
version = "0.1.0"
edition = "2021"
[dependencies]
</Cargo.toml>
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.