Gitingest

Replace 'hub' with 'ingest' in any GitHub URL to get a prompt-friendly extract of a codebase

Last verified:

Visit Gitingest

What is Gitingest?

Gitingest is an open-source tool that transforms Git repositories into structured, LLM-friendly text digests. By simply replacing 'hub' with 'ingest' in any GitHub URL (e.g., github.com/user/repo becomes gitingest.com/user/repo), users instantly generate a prompt-ready extract of the codebase complete with file structure, token counts, and smart formatting optimized for AI models like ChatGPT, Claude, and Gemini.

Key features include: CLI tool for command-line usage (pip install gitingest), Python package API for programmatic integration (with sync/async functions), web interface at gitingest.com requiring no installation, browser extensions for Chrome and Firefox with one-click

Gitingest pricing

Pricing model: Freemium

Free tier: $0 for unlimited repository analysis on the hosted web interface at gitingest.com, including web interface access and browser extensions (Chrome & Firefox). The free hosted tier works for public repositories only with rate limits applying. Self-hosting via Docker or direct Python install is free and open-source with no limits, enabling unlimited repository processing including private repositories. Dedicated self-hosted instance removes rate limits for teams with heavy AI-assisted development needs. No paid plans from the official Gitingest project itself.

Gitingest pros

  • Open-source with free hosted tier at gitingest.com
  • Simple URL swap: replace 'hub' with 'ingest' in GitHub URLs
  • Multiple interfaces: CLI, Python API, web, browser extensions
  • Generates LLM-optimized output with smart formatting
  • Includes directory tree structure in output
  • Provides token count estimation for context planning
  • Respects .gitignore rules by default
  • Supports custom ignore patterns via --ignore flag
  • Automatically detects and skips binary files
  • Works with public and private repositories (with token)
  • Supports specific branches, tags, and subdirectories
  • One-click Chrome and Firefox browser extensions
  • Self-hostable via Docker for unlimited processing
  • Async Python API for Jupyter notebook integration
  • Clear file separation in output with paths included

Gitingest cons

  • Hosted service only supports public repositories
  • Private repositories require self-hosting or GitHub token
  • Limited to first 1000 files to prevent memory overload
  • Rate limits apply on hosted service
  • GitHub API rate limits (60/hr without token, 5000/hr with)
  • No native .gitingestignore file support yet
  • 10MB default file size limit may exclude large files
  • Binary file detection may miss some formats

Frequently asked questions about Gitingest

How do I use Gitingest with a GitHub URL?

Simply replace 'hub' with 'ingest' in any GitHub URL. For example, change https://github.com/user/repo to https://gitingest.com/user/repo. You can also visit gitingest.com and paste the repository URL, or use the browser extension to click the 'Ingest' button directly on GitHub pages.

Can Gitingest process private repositories?

Yes, but private repository support requires a GitHub Personal Access Token (PAT). Pass the token via the token parameter in the Python API, set GITHUB_TOKEN as an environment variable, or use --token flag in CLI. For unlimited private repo access without rate limits, self-host Gitingest via Docker.

What output formats does Gitingest provide?

Gitingest provides a structured text digest containing: (1) a summary with statistical information about the repository, (2) a visual directory tree structure, and (3) concatenated file contents with clear separation and file paths. The CLI outputs to digest.txt by default, while the Python API returns a tuple of (summary, tree, content).

How do I exclude specific files or patterns?

Use the --ignore flag with glob patterns. Examples: gitingest --ignore '.log' ignores all log files, or gitingest --ignore 'temp/' --ignore 'docs/*.md' for multiple patterns. Ignore patterns use the same glob syntax as .gitignore and are applied in addition to existing .gitignore rules. You can also use --exclude-pattern for exclusion.

Does Gitingest work with local repositories?

Yes, Gitingest works with both remote GitHub URLs and local Git repositories. For local repos, run 'gitingest /path/to/directory' or 'gitingest .' for the current directory. The Python API also accepts local paths: ingest('path/to/directory'). This is useful for analyzing code that isn't pushed to GitHub yet.

What is the token count estimation feature?

Gitingest estimates the number of tokens if you feed all code into an LLM, which is important for models with context window limits like Claude. For example, it might show 'Estimated tokens: 133.7k' so you can determine if the digest fits within your LLM's context window before using it.

How do I install Gitingest CLI?

Install via pip: 'pip install gitingest'. After installation, run 'gitingest --help' to see available options. The CLI can process directories ('gitingest .'), URLs ('gitingest https://github.com/user/repo'), or specific subdirectories. Output saves to digest.txt by default in the current working directory.

What files does Gitingest automatically exclude?

By default, Gitingest excludes: version control files (.git/, .svn/), system files (.DS_Store, Thumbs.db), log files (.log, .bak), images/media (.png, .jpg, .mp3), archives (.zip, .tar.gz), dependency directories (node_modules/, vendor/), and compiled/binary files (.pyc, .class, .exe). It also automatically detects and skips binary files.

How do I self-host Gitingest?

Self-host Gitingest via Docker for unlimited repository processing without rate limits. You can also install directly via Python ('pip install gitingest') and run locally. Self-hosting removes the public repository restriction, enabling private repo access, and removes rate limits affecting the hosted public service. Dedicated instances are recommended for teams with heavy AI-assisted development needs.

Categories

Use cases

Browse all AI tools on NeedAnAI