Convert any Git repository into a text file optimized for LLM consumption using GitIngest. Use when the user wants to ingest a repo, create a text digest of a codebase, prepare a repository for LLM analysis, or needs to convert a GitHub URL to a readable text file.
Convert any Git repository into a prompt-friendly text file for LLM consumption. GitIngest extracts the structure and contents of a repository into a single text file that can be easily processed by language models.
The preferred approach — uvx runs gitingest in an isolated environment without any setup:
uvx gitingest <target> -o output.txt
This always works as long as uv is installed. No venv, no pip, no prior installation needed.
Determine what the user wants to ingest:
https://github.com/owner/repoFor a local directory:
uvx gitingest /path/to/repository -o output.txt
For a GitHub repository:
uvx gitingest https://github.com/owner/repo -o output.txt
For the current directory:
uvx gitingest . -o output.txt
| Option | Description |
|---|---|
-o <file> | Output to specified file (use - for stdout) |
-t <token> | GitHub token for private repos |
--include-gitignored | Include files normally ignored by .gitignore |
--include-submodules | Process git submodules |
Private repositories:
uvx gitingest https://github.com/owner/private-repo -t $GITHUB_TOKEN -o output.txt
If the user runs gitingest frequently and wants it available as a regular command:
uv tool install gitingest
gitingest <target> -o output.txt
After running, confirm:
Warn the user if the output is large — token counts help gauge whether it will fit in an LLM context window.
uvx gitingest /repo/src/gitingest.com/owner/repo