Folderwalk - folder walking tool
⚓ Rust 📅 2025-09-01 👤 surdeus 👁️ 10Folderwalk
Folderwalk is a simple folder-walking tool written in Rust. It recursively scans a directory and outputs its structure—optionally including file contents. Designed for fast inspection or generating context for AI systems (e.g. MCP agents, file-aware editors).
Install
Install via Cargo:
cargo install folderwalk
Usage
Output folder structure to files.txt
Creates a files.txt file in the target folder containing the directory tree.
folderwalk <path/to/folder>
Example:
folderwalk ./project
Include file contents in files.txt
Adds file contents inline beneath each file entry.
folderwalk <path/to/folder> -c
Example:
folderwalk ./project -c
Output to stdout instead of files.txt
Prints the folder structure directly to the terminal.
folderwalk <path/to/folder> -o
Example:
folderwalk ./project -o
Output structure + contents to stdout
Combines -o and -c to print everything to the terminal.
folderwalk <path/to/folder> -o -c
Example:
folderwalk ./project -o -c
Limit recursion depth
Use --max-depth N to restrict how deep the traversal goes.
folderwalk ./project --max-depth 2
Use ASCII tree formatting
Use --ascii to switch from Unicode to ASCII characters.
folderwalk ./project --ascii
Notes
- By default,
files.txtis created in the target folder unless-ois used. - Common directories like
node_modules,.git, andtargetare excluded. - Symlinks are displayed with their targets.
- Useful for AI context generation, quick project inspection, or documentation.
Feedback is welcome. If you have ideas for features or improvements, feel free to open an issue or PR on GitHub.
1 post - 1 participant
🏷️ Rust_feed