gitingest

raw JSON →
0.3.1 verified Fri May 01 auth: no python

CLI tool to analyze and create text dumps of codebases for LLMs. Current version 0.3.1, release cadence irregular.

pip install gitingest
error ModuleNotFoundError: No module named 'gitingest'
cause Library not installed or installed in the wrong environment.
fix
Run pip install gitingest in the correct virtual environment.
error RecursionError: maximum recursion depth exceeded
cause Symlinks or deeply nested directories in the target path causing infinite recursion.
fix
Use exclude_patterns to ignore problematic directories or provide a shallower path.
gotcha The library is very new (v0.3.1) and API may change without notice. Avoid pinning to an exact version in production until stable.
fix Use version pinning with `gitingest>=0.3.1,<0.4.0` and monitor releases.
gotcha The `analyze` function returns a tuple of three strings: (summary, tree, content). Content can be extremely large for big codebases, causing memory issues.
fix Limit scope with `include_patterns` and `exclude_patterns` to reduce output size.

Analyze a local codebase and get a summary, directory tree, and file contents.

from gitingest import analyze

# Analyze a local directory
summary, tree, content = analyze(".", include_patterns=["*.py"], exclude_patterns=["__pycache__"])
print(summary)
print(tree)
print(content[:500])