Dump a directory's file tree and contents into a single formatted output — built for LLM prompts.
Project description
dumpcat
Dump a directory's file tree and contents into a single formatted output — built for LLM prompts.
Highlights
- One command to dump your entire codebase (or a filtered slice of it) into a single output
- Smart defaults — respects
.gitignore, skips binaries, limits file sizes - Three output formats — Markdown, plain text, or JSON
- Filterable — by extension, glob pattern, depth, and file size
- Prompt-friendly — prepend/append text or template files for LLM context
- Configurable — project-level
.dumpcat.tomlwith named profiles - Zero bloat — one runtime dependency (
pathspec), everything else is stdlib
Installation
Requires Python 3.11+.
uv tool install dumpcat
# Or with pip
pip install dumpcat
# Or with pipx
pipx install dumpcat
Quick start
# Dump current directory as Markdown
dumpcat
# Only Python files, 2 levels deep
dumpcat -d 2 -i .py
# Prepend a prompt
dumpcat -i .py -p "Review this code for security issues"
# Plain text with stats
dumpcat -f plain -s
# Just the tree structure
dumpcat --tree-only
# JSON output for tooling
dumpcat -f json --no-tree
Output
dumpcat renders file contents followed by a file tree:
# File Contents
## `src/main.py`
```python
import sys
def main():
print("hello")
```
# File Tree
```
.
├── src/
│ ├── main.py
│ └── utils/
│ └── helpers.py
└── README.md
```
See the output formats documentation for Markdown, plain text, and JSON examples.
CLI reference
dumpcat [OPTIONS] [PATH]
| Flag | Short | Description |
|---|---|---|
--output PATH |
-o |
Write output to a file |
--depth INT |
-d |
Max directory depth |
--include EXT |
-i |
Include only these extensions (repeatable) |
--exclude PATTERN |
-e |
Exclude glob patterns (repeatable) |
--gitignore / --no-gitignore |
Respect .gitignore rules (default: on) |
|
--tree-only |
Show only the tree, no file contents | |
--no-tree |
Show only file contents, no tree | |
--prepend TEXT |
-p |
Text or @filepath to prepend |
--append TEXT |
-a |
Text or @filepath to append |
--max-size SIZE |
Skip files larger than this (default: 1mb) |
|
--stats |
-s |
Show file count, lines, and estimated tokens |
--format FORMAT |
-f |
markdown, plain, or json (default: markdown) |
--config PATH |
Path to config file | |
--profile NAME |
Named profile from config | |
--follow-symlinks |
Follow symbolic links | |
--hidden |
Include dotfiles and dotdirs | |
--line-numbers |
-n |
Add line numbers to file contents |
See the full CLI reference for details.
Configuration
Create a .dumpcat.toml in your project root:
[default]
exclude = ["__pycache__", "*.pyc", ".venv"]
[profiles.python]
include = [".py", ".pyi", ".toml", ".md"]
exclude = ["__pycache__", "*.pyc", ".venv", ".mypy_cache"]
[profiles.web]
include = [".js", ".ts", ".tsx", ".css", ".html"]
exclude = ["node_modules", "dist", ".next"]
dumpcat --profile python
See the configuration documentation for details.
Documentation
Full documentation is available at allenfp.github.io/dumpcat.
License
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dumpcat-0.2.0.tar.gz.
File metadata
- Download URL: dumpcat-0.2.0.tar.gz
- Upload date:
- Size: 24.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
77da8ee6e02cef5865b3e71170227b8f9043e2bb76679e8749826d52cbb13088
|
|
| MD5 |
e01e137c0c91bd606b3c6b0c5f8f958f
|
|
| BLAKE2b-256 |
1348db976de5c48e9bc0e468a6dd1c5cc304b896a08ba7c799a0b4304947bc3f
|
Provenance
The following attestation bundles were made for dumpcat-0.2.0.tar.gz:
Publisher:
publish.yaml on Allenfp/dumpcat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dumpcat-0.2.0.tar.gz -
Subject digest:
77da8ee6e02cef5865b3e71170227b8f9043e2bb76679e8749826d52cbb13088 - Sigstore transparency entry: 1059499412
- Sigstore integration time:
-
Permalink:
Allenfp/dumpcat@341af73ded877c8b2b2f301761060504ae03c48f -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Allenfp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@341af73ded877c8b2b2f301761060504ae03c48f -
Trigger Event:
release
-
Statement type:
File details
Details for the file dumpcat-0.2.0-py3-none-any.whl.
File metadata
- Download URL: dumpcat-0.2.0-py3-none-any.whl
- Upload date:
- Size: 16.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd1fa77450f4b689a5eccc553804e9c5fb3144320903ff73149f7d9014639495
|
|
| MD5 |
a5e8a52c0eda3e305261e03df8d9aefd
|
|
| BLAKE2b-256 |
19b4923f02f679b072d80510d3f413625b2d5bf164a2d0ba52b6d83a009c37c2
|
Provenance
The following attestation bundles were made for dumpcat-0.2.0-py3-none-any.whl:
Publisher:
publish.yaml on Allenfp/dumpcat
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dumpcat-0.2.0-py3-none-any.whl -
Subject digest:
bd1fa77450f4b689a5eccc553804e9c5fb3144320903ff73149f7d9014639495 - Sigstore transparency entry: 1059499420
- Sigstore integration time:
-
Permalink:
Allenfp/dumpcat@341af73ded877c8b2b2f301761060504ae03c48f -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/Allenfp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yaml@341af73ded877c8b2b2f301761060504ae03c48f -
Trigger Event:
release
-
Statement type: