Combine files into a single output file. Supports multiple output formats.
- Parallel file reading
- Binary-safe with base64 encoding
- Multiple output formats: JSON, Text, XML, YAML, CSV
- Recursive directory processing
- Simple command-line interface
Install from crates.io:
cargo install krnchrOr build from source:
git clone https://github.com/GriffinCanCode/krnchr
cd krnchr
cargo build --releaseThe binary will be available at target/release/krnch
krnch <path> <format>path: Directory or file path to process (relative or absolute)format: Output format (json,text,xml,yaml,csv)
# Crunch all files in current directory to JSON
krnch ./ json
# Crunch specific directory to text format
krnch ./src text
# Crunch single file to XML
krnch ./README.md xml
# Crunch with relative path to YAML
krnch ../data yaml
# Crunch to CSV
krnch ./logs csvStructured JSON with base64-encoded content, file metadata, and totals.
Plain text format with file separators and raw content.
XML format with base64-encoded content and file attributes.
YAML format with file metadata and base64-encoded content.
CSV format with columns: path, size, content_base64.
Output files are created in the current directory:
crunched.jsoncrunched.txtcrunched.xmlcrunched.yamlcrunched.csv
Modular design with focused modules:
main.rs: Entry point and orchestrationcli.rs: Command-line argument parsingtypes.rs: Shared data structures and enumsreader.rs: Parallel file discovery and readingformatter.rs: Output format implementationswriter.rs: File output handling
Uses parallel file reading for multi-core performance.
- GitHub: https://github.com/GriffinCanCode/krnchr
- crates.io: https://crates.io/crates/krnchr
- Releases: https://github.com/GriffinCanCode/krnchr/releases
See LICENSE for full license text.