fencecat-0.1.2 is not a library.
Visit the last successful build:
fencecat-0.2.2
fencecat ⚖️🐈
Recursively emit Markdown code fences labeled with relative file paths.
Perfect for sharing source trees in LLM chats, issues, blog posts, or code reviews.
Features
- Walks a directory tree and prints each file inside a fenced code block.
- Labels fences with the file’s relative path.
- Automatically chooses fence length so embedded backticks don’t break.
- Skips binary files and empty files.
- Supports filtering by file extension.
- Optional: order by file size (largest first).
- Optional: copy the entire output to your clipboard.
Installation
The resulting binary will be in ~/.cargo/bin/fencecat.
Usage
Options
-
-c,--copyCopy the full output to the clipboard. On Wayland/X11 this uses external tools (wl-copy,xclip, orxsel) if available. -
-B,--biggest-firstOrder files by size, largest first. -
--ext EXT[,EXT...]Only include files with the given extensions. Examples: -
-h,--helpShow help information. -
-V,--versionShow version.
Examples
Emit all files under src/:
Emit only Rust and Python files:
Copy output to clipboard for pasting into GitHub:
Sort files by size:
Clipboard Notes
On Linux/Wayland:
- Install
wl-clipboardforwl-copy/wl-paste. - If unavailable,
xcliporxselunder XWayland are used. - macOS uses
pbcopy; Windows uses PowerShell’sSet-Clipboard.
If the clipboard still seems empty, check your compositor or portal logs.
License
MIT