Skip to content

Examples

Real-world usage patterns for Dumpcat.

LLM code review

Dump your Python source with a review prompt:

dumpcat src/ -i .py -p "Review this code for bugs, security issues, and performance problems. Suggest concrete fixes."

Project overview for onboarding

Generate a shallow tree with no file contents — great for showing project structure:

dumpcat -d 2 --tree-only

Output:

.
├── src/
│   └── dumpcat/
├── tests/
├── docs/
├── pyproject.toml
└── README.md

Export codebase as JSON for tooling

Pipe structured output into another tool or script:

dumpcat -f json -s --no-tree -i .py | python process_codebase.py

Dump with line numbers

Useful when you want to reference specific lines in your LLM prompt:

dumpcat src/ -i .py -n -p "There's a bug around line 42 in core.py. Can you find and fix it?"

Compare two directories

Dump both and diff them:

dumpcat src/ -f plain -o src-dump.txt
dumpcat lib/ -f plain -o lib-dump.txt
diff src-dump.txt lib-dump.txt

Exclude test files and generated code

dumpcat -e tests -e "*.generated.*" -e __pycache__ -e "*.pyc"

Use with a prompt template file

Create a reusable prompt template:

echo "You are a senior Python developer. Review the following codebase for:
- Security vulnerabilities
- Performance issues
- Code style and best practices

Be specific and reference file paths and line numbers." > prompts/review.md

Then use it:

dumpcat src/ -i .py -p @prompts/review.md

Full project dump with stats

dumpcat -s

# File Contents

...

# File Tree
. ├── src/ │ └── ... └── README.md
# Stats

- Files: 15
- Lines: 1247
- Estimated tokens: 4800

CI/CD: generate context for automated review

# In a GitHub Action or CI script
dumpcat src/ -i .py -f json -s -o context.json
# Feed context.json to an LLM API for automated review

Only show the tree

dumpcat --tree-only
.
├── src/
│   └── dumpcat/
│       ├── __init__.py
│       ├── cli.py
│       ├── core.py
│       └── ...
├── tests/
│   └── ...
├── pyproject.toml
└── README.md

Send code to a local LLM for review

dumpcat src/ -i .py --llm ollama -m llama3 -p "Review this code for bugs and suggest fixes"

Use a configured LLM target

After running dumpcat init and editing ~/.dumpcat/dumpcat_profiles.toml:

# Use the default target
dumpcat src/ -i .py --llm -p "Explain this codebase"

# Use a named target
dumpcat src/ --llm -t openai -p "Write unit tests for this code"

Save LLM response to a file

dumpcat src/ -i .py --llm ollama -m llama3 -p "Review this code" -o review.md

Accumulate multiple dumps into one file

dumpcat src/ -i .py -o full-dump.md
dumpcat tests/ -i .py -o full-dump.md -A
dumpcat docs/ -i .md -o full-dump.md -A
# Include dotfiles like .env, .eslintrc
dumpcat --hidden

# Follow symbolic links (with loop detection)
dumpcat --follow-symlinks