fusefiles 0.6.0

Concatenate a directory full of files into a single prompt for use with LLMs
Documentation

fusefiles

Crates.io License CI

A Rust CLI tool that concatenates files into a single prompt for use with LLMs. Inspired by Simon Willison's files-to-prompt but faster and with more features, like including a file tree at the top of the single file.

CLI command: fuse (clean and simple!)

How to Use

Installation

Install from crates.io

cargo install fusefiles

This installs the fuse command.

Build and Install from Source

Clone the repository and install:

git clone https://github.com/finnatsea/fusefiles.git
cd fusefiles
cargo install --path .

This installs the binary to ~/.cargo/bin/fuse, making it available system-wide.

Build Only (for development)

cargo build --release

The executable will be in target/release/fuse.

How do I use it?

# Process a directory
fuse src/

# Process multiple paths
fuse src/ tests/ Cargo.toml

# Only include Python and Rust files
fuse src/ -e py -e rs

# Output in markdown format with code blocks
fuse src/ --markdown

# Output in Claude XML format
fuse src/ --cxml

# Save output to a file
fuse src/ -o output.txt

# Exclude test files
fuse src/ --ignore "*test*"

# Include hidden files
fuse . --include-hidden

# Add line numbers
fuse src/main.rs -n

# Add a table of contents tree
fuse src/ --toc

# Table of contents with directories only
fuse src/ --toc-dirs-only

# Table of contents with files and directories
fuse src/ --toc-files

# Ignore files only (not directories) with pattern
fuse src/ --ignore "*test*" --ignore-files-only

# Ignore .gitignore rules
fuse . --ignore-gitignore

# Pipe file paths from another command
find . -name "*.rs" | fuse

# Use with null-separated paths
find . -name "*.rs" -print0 | fuse --null

Development

Running Tests

# Run all tests
cargo test

# Run specific test by name
cargo test test_basic_functionality

# Run only unit tests
cargo test --lib

# Run only integration tests
cargo test --test integration_tests

Linting and Formatting

# Format code
cargo fmt

# Lint with clippy
cargo clippy