{"name":"Gitingest: Transform GitHub Repositories into LLM-Friendly Code Extracts","description":"Gitingest is a powerful tool designed to convert Git repositories into prompt-friendly text for Large Language Models (LLMs). It allows developers to easily obtain structured code extracts, making it simpler to feed codebase context into AI applications. With Gitingest, you can quickly generate digests from GitHub URLs or local directories, streamlining your AI-driven development workflows.","github":"https://github.com/cyclotruc/gitingest","url":"https://osrepos.com/repo/cyclotruc-gitingest","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/cyclotruc-gitingest","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/cyclotruc-gitingest.md","json":"https://osrepos.com/repo/cyclotruc-gitingest.json","topics":["ai","code","developer-tool","ingestion","python","llm","code-analysis","github"],"keywords":["ai","code","developer-tool","ingestion","python","llm","code-analysis","github"],"stars":null,"summary":"Gitingest is a powerful tool designed to convert Git repositories into prompt-friendly text for Large Language Models (LLMs). It allows developers to easily obtain structured code extracts, making it simpler to feed codebase context into AI applications. With Gitingest, you can quickly generate digests from GitHub URLs or local directories, streamlining your AI-driven development workflows.","content":"## Introduction\n\nGitingest is an innovative tool that streamlines the process of extracting code context from Git repositories, making it readily consumable by Large Language Models (LLMs). Its core functionality allows you to transform any Git repository, whether local or remote, into a clean, prompt-friendly text digest. A unique feature is the ability to simply replace \"hub\" with \"ingest\" in any GitHub URL to instantly access a structured extract of the codebase.\n\nKey features include:\n*   **Easy code context**: Generate a text digest from a Git repository URL or a local directory.\n*   **Smart Formatting**: Output is optimized for LLM prompts, ensuring clarity and relevance.\n*   **Comprehensive Statistics**: Get insights into file and directory structure, extract size, and token count.\n*   **Versatile Access**: Available as a CLI tool, a Python package, and convenient browser extensions.\n\n## Installation\n\nGitingest requires Python 3.8 or newer. For private repositories, a GitHub Personal Access Token (PAT) is necessary.\n\nYou can install Gitingest via `pip`:\n\nbash\npip install gitingest\n\n\nTo include server dependencies for self-hosting, use:\n\nbash\npip install gitingest[server]\n\n\nAlternatively, `pipx` is recommended for installing Python applications:\n\nbash\npipx install gitingest\n\n\n## Examples\n\n### Browser Extension Usage\n\nThe Gitingest browser extensions for Chrome, Firefox, and Edge offer a seamless way to get code digests directly from GitHub. Simply navigate to a GitHub repository page and replace \"hub\" in the URL with \"ingest\" to view the prompt-friendly extract.\n\n*   [Chrome Extension](https://chromewebstore.google.com/detail/adfjahbijlkjfoicpjkhjicpjpjfaood)\n*   [Firefox Add-on](https://addons.mozilla.org/firefox/addon/gitingest)\n*   [Edge Add-on](https://microsoftedge.microsoft.com/addons/detail/nfobhllgcekbmpifkjlopfdfdmljmipf)\n\n### Command Line Usage\n\nThe `gitingest` CLI tool provides powerful options for analyzing codebases.\n\nBasic usage, writing to `digest.txt` by default:\n\nbash\ngitingest /path/to/directory\n\n\nFrom a GitHub URL:\n\nbash\ngitingest https://github.com/coderamp-labs/gitingest\n\n\nFrom a specific subdirectory within a repository:\n\nbash\ngitingest https://github.com/coderamp-labs/gitingest/tree/main/src/gitingest/utils\n\n\nFor private repositories, use the `--token` option or set the `GITHUB_TOKEN` environment variable:\n\nbash\ngitingest https://github.com/username/private-repo --token github_pat_...\n\n\nInclude repository submodules or gitignored files:\n\nbash\ngitingest https://github.com/username/repo-with-submodules --include-submodules\ngitingest /path/to/directory --include-gitignored\n\n\nOutput to a specific file or `STDOUT`:\n\nbash\ngitingest /path/to/directory --output my_digest.txt\ngitingest /path/to/directory --output -\n\n\n### Python Package Usage\n\nIntegrate Gitingest directly into your Python applications.\n\nSynchronous usage:\n\npython\nfrom gitingest import ingest\n\nsummary, tree, content = ingest(\"path/to/directory\")\n# or from URL\nsummary, tree, content = ingest(\"https://github.com/coderamp-labs/gitingest\")\n\n\nAsynchronous usage:\n\npython\nfrom gitingest import ingest_async\nimport asyncio\n\nresult = asyncio.run(ingest_async(\"path/to/directory\"))\n\n\nIn Jupyter notebooks, you can use `await` directly:\n\npython\nfrom gitingest import ingest_async\n\nsummary, tree, content = await ingest_async(\"path/to/directory\")\n\n\n## Why Use Gitingest?\n\nGitingest simplifies the complex task of preparing codebases for AI consumption. By providing a structured, prompt-friendly text digest, it significantly reduces the effort required to feed relevant code context into LLMs. This is invaluable for tasks like code generation, analysis, documentation, and debugging with AI assistance. Its flexibility, offering CLI, Python library, and browser extension access, ensures it fits seamlessly into various developer workflows. Whether you need a quick overview or detailed code insights, Gitingest delivers optimized output for your AI-driven development needs.\n\n## Links\n\n*   [GitHub Repository](https://github.com/coderamp-labs/gitingest)\n*   [Official Website](https://gitingest.com)\n*   [Chrome Extension](https://chromewebstore.google.com/detail/adfjahbijlkjfoicpjkhjicpjpjfaood)\n*   [Firefox Add-on](https://addons.mozilla.org/firefox/addon/gitingest)\n*   [Edge Add-on](https://microsoftedge.microsoft.com/addons/detail/nfobhllgcekbmpifkjlopfdfdmljmipf)\n*   [Join the Discord Community](https://discord.com/invite/zerRaGK9EC)","metrics":{"detailViews":4,"githubClicks":5},"dates":{"published":null,"modified":"2026-02-01T12:01:21.000Z"}}