| Crates.io | fencecat |
| lib.rs | fencecat |
| version | 0.2.2 |
| created_at | 2025-09-30 20:03:07.627215+00 |
| updated_at | 2025-12-10 02:32:32.52757+00 |
| description | Walkdir cat with markdown fenced code output |
| homepage | |
| repository | https://github.com/xangelix/fencecat |
| max_upload_size | |
| id | 1861661 |
| size | 55,959 |
Recursively emit Markdown code fences labeled with relative file paths.
Perfect for sharing source trees in LLM chats, issues, blog posts, or code reviews.
cargo install --locked fencecat
The resulting binary will be in ~/.cargo/bin/fencecat.
fencecat [OPTIONS] [DIR]
-c, --copy
Copy the full output to the clipboard.
On Wayland/X11 this uses external tools (wl-copy, xclip, or xsel) if available.
-B, --biggest-first
Order files by size, largest first.
--ext EXT[,EXT...]
Only include files with the given extensions.
Examples:
fencecat . --ext rs,ts,py
fencecat src --ext .md,.toml
--not-ext EXT[,EXT...]
Exclude files with the given extensions. This takes precedence over inclusions.
Example:
fencecat . --not-ext lock,txt
--regex PATTERN
Only include paths that match the given Regex pattern (relative to the current working directory).
Can be specified multiple times to add multiple patterns.
--not-regex PATTERN
Exclude paths that match the given Regex pattern.
Can be specified multiple times.
-h, --help
Show help information.
-V, --version
Show version.
--no-ignore
Include hidden and gitignored files (disables ignore rules).
Emit all files under src/:
fencecat src
Emit only Rust and Python files:
fencecat . --ext rs,py
Exclude lock files and text files:
fencecat . --not-ext lock,txt
Emit only files in a controllers or models folder using Regex:
fencecat src --regex "controllers/" --regex "models/"
Exclude test files using Regex:
fencecat . --not-regex "test" --not-regex "_spec\."
Copy output to clipboard for pasting into GitHub:
fencecat . -c
Sort files by size:
fencecat . -B
On Linux/Wayland:
wl-clipboard for wl-copy / wl-paste.xclip or xsel under XWayland are used.pbcopy; Windows uses PowerShell’s Set-Clipboard.If the clipboard still seems empty, check your compositor or portal logs.
MIT