gitingest
Replace 'hub' with 'ingest' in any GitHub URL to get a prompt-friendly extract of a codebase
What is gitingest?
Replace 'hub' with 'ingest' in any GitHub URL to get a prompt-friendly extract of a codebase
Overview of gitingest
What it is
Gitingest is a tool that turns any Git repository into a prompt-friendly text ingest for large language models (LLMs). It can be used by replacing "hub" with "ingest" in any GitHub URL to access the corresponding digest. It is available as a web service at gitingest.com, a Chrome extension, a Firefox add-on, a CLI tool, and a Python package.
Key features
- Easy code context: Get a text digest from a Git repository URL or a directory
- Smart Formatting: Optimized output format for LLM prompts
- Statistics about file and directory structure, size of the extract, and token count
- CLI tool: Run it as a shell command
- Python package: Import it in your code
- Browser extensions available for Chrome and Firefox
Use cases
- Providing code context to LLMs for code generation, analysis, or question answering
- Analyzing codebases by generating a text digest of the repository structure and contents
- Extracting file and directory structure, size, and token count for a repository
- Using the CLI or Python package to integrate codebase ingestion into automated workflows
Getting started
Requirements: Python 3.8+. For private repositories, a GitHub Personal Access Token (PAT) is needed.
Install using pip:
pip install gitingest
Or with server dependencies for self-hosting:
pip install gitingest[server]
Alternatively, install with pipx:
pipx install gitingest
Basic CLI usage:
### From a local directory
gitingest /path/to/directory
### From a GitHub URL
gitingest https://github.com/coderamp-labs/gitingest
### From a specific subdirectory
gitingest https://github.com/coderamp-labs/gitingest/tree/main/src/gitingest/utils
For private repositories, use the --token option or set the GITHUB_TOKEN environment variable.
License and pricing
This project is licensed under the MIT License and is open source. No pricing information is provided.
Based on the project's public README and repository metadata.