{"id":26322792,"url":"https://github.com/davidesantangelo/gitingest","last_synced_at":"2025-09-23T18:47:47.136Z","repository":{"id":280307177,"uuid":"941570332","full_name":"davidesantangelo/gitingest","owner":"davidesantangelo","description":"Gitingest is a command-line tool that fetches files from a GitHub repository and generates a consolidated text prompt for your LLMs.","archived":false,"fork":false,"pushed_at":"2025-06-20T10:11:24.000Z","size":180,"stargazers_count":47,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-18T21:59:03.705Z","etag":null,"topics":["cli","llm","machine-learning","ruby","tools"],"latest_commit_sha":null,"homepage":"https://davidesantangelo.github.io/gitingest/","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidesantangelo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"davidesantangelo","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"buy_me_a_coffee":null,"thanks_dev":null,"custom":null}},"created_at":"2025-03-02T15:56:18.000Z","updated_at":"2025-07-11T08:16:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"70a361b0-252d-48ae-9e4f-e0ac6672a233","html_url":"https://github.com/davidesantangelo/gitingest","commit_stats":null,"previous_names":["davidesantangelo/gitingest"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/davidesantangelo/gitingest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fgitingest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fgitingest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fgitingest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fgitingest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidesantangelo","download_url":"https://codeload.github.com/davidesantangelo/gitingest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidesantangelo%2Fgitingest/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265866141,"owners_count":23840937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","llm","machine-learning","ruby","tools"],"created_at":"2025-03-15T17:04:46.684Z","updated_at":"2025-09-23T18:47:42.116Z","avatar_url":"https://github.com/davidesantangelo.png","language":"Ruby","funding_links":["https://github.com/sponsors/davidesantangelo"],"categories":["Ruby"],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/gitingest.svg?icon=si%3Arubygems)](https://badge.fury.io/rb/gitingest)\n![Gem Total Downloads](https://img.shields.io/gem/dt/gitingest?style=flat-square\u0026link=https%3A%2F%2Frubygems.org%2Fgems%2Fgitingest)\n\n# Gitingest\n\nGitingest is a Ruby gem that fetches files from a GitHub repository and generates a consolidated text prompt, which can be used as input for large language models, documentation generation, or other purposes.\n\n## Installation\n\n### From RubyGems\n\n```bash\ngem install gitingest\n```\n\n### From Source\n\n```bash\ngit clone https://github.com/davidesantangelo/gitingest.git\ncd gitingest\nbundle install\nbundle exec rake install\n```\n\n## Usage\n\n### Command Line\n\n```bash\n# Basic usage (public repository)\ngitingest --repository user/repo \n\n# With GitHub token for private repositories\ngitingest --repository user/repo --token YOUR_GITHUB_TOKEN\n\n# Specify a custom output file\ngitingest --repository user/repo --output my_prompt.txt\n\n# Specify a different branch\ngitingest --repository user/repo --branch develop\n\n# Exclude additional patterns\ngitingest --repository user/repo --exclude \"*.md,docs/\"\n\n# Control the number of threads\ngitingest --repository user/repo -T 4\n\n# Set thread pool shutdown timeout\ngitingest --repository user/repo -W 120\n\n# Show repository directory structure\ngitingest --repository user/repo -s\n\n# Combine threading options\ngitingest --repository user/repo -T 8 -W 90\n\n# Quiet mode\ngitingest --repository user/repo --quiet\n\n# Verbose mode\ngitingest --repository user/repo --verbose\n```\n\n#### Available Options\n\n- `-r, --repository REPO`: GitHub repository (username/repo) [Required]\n- `-t, --token TOKEN`: GitHub personal access token [Optional but recommended]\n- `-o, --output FILE`: Output file for the prompt [Default: reponame_prompt.txt]\n- `-e, --exclude PATTERN`: File patterns to exclude (comma separated)\n- `-b, --branch BRANCH`: Repository branch [Default: repository's default branch]\n- `-s, --show-structure`: Show repository directory structure instead of generating prompt\n- `-T, --threads COUNT`: Number of concurrent threads [Default: auto-detected]\n- `-W, --thread-timeout SECONDS`: Thread pool shutdown timeout [Default: 60]\n- `-q, --quiet`: Reduce logging to errors only\n- `-v, --verbose`: Increase logging verbosity\n- `-h, --help`: Show help message\n\n### Directory Structure Visualization\n\n```bash\ngitingest --repository user/repo --show-structure\n```\n\nThis will display a tree view of the repository's structure:\n\n### As a Library\n\n```ruby\nrequire \"gitingest\"\n\n# Basic usage - write to a file\ngenerator = Gitingest::Generator.new(\n  repository: \"user/repo\",\n  token: \"YOUR_GITHUB_TOKEN\" # optional\n)\n\n# Run the full workflow (fetch repository and generate file)\ngenerator.run\n\n# OR generate file only (if you need the output path)\noutput_path = generator.generate_file\n\n# Get content as a string (for in-memory processing)\ncontent = generator.generate_prompt\n\n# With custom options\ngenerator = Gitingest::Generator.new(\n  repository: \"user/repo\",\n  token: \"YOUR_GITHUB_TOKEN\",\n  output_file: \"my_prompt.txt\",\n  branch: \"develop\",\n  exclude: [\"*.md\", \"docs/\"], \n  threads: 4,              # control concurrency\n  thread_timeout: 120,     # custom thread timeout\n  quiet: true              # or verbose: true\n)\n\n# With custom logger\ncustom_logger = Logger.new(\"gitingest.log\")\ngenerator = Gitingest::Generator.new(\n  repository: \"user/repo\",\n  logger: custom_logger\n)\n```\n\n## Features\n\n- Fetches all files from a GitHub repository based on the given branch\n- Automatically excludes common binary files and system files by default\n- Allows custom exclusion patterns for specific file extensions or directories\n- Uses concurrent processing for faster downloads\n- Handles GitHub API rate limiting with automatic retry\n- Generates a clean, formatted output file with file paths and content\n\n## Default Exclusion Patterns\n\nBy default, the generator excludes files and directories commonly ignored in repositories, such as:\n\n- Version control files (`.git/`, `.svn/`)\n- System files (`.DS_Store`, `Thumbs.db`)\n- Log files (`*.log`, `*.bak`)\n- Images and media files (`*.png`, `*.jpg`, `*.mp3`)\n- Archives (`*.zip`, `*.tar.gz`)\n- Dependency directories (`node_modules/`, `vendor/`)\n- Compiled and binary files (`*.pyc`, `*.class`, `*.exe`)\n\n## Limitations\n\n- To prevent memory overload, only the first 1000 files will be processed\n- API requests are subject to GitHub limits (60 requests/hour without token, 5000 requests/hour with token)\n- Private repositories require a GitHub personal access token\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/davidesantangelo/gitingest.\n\n## Acknowledgements\n\nInspired by [`cyclotruc/gitingest`](https://github.com/cyclotruc/gitingest).\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidesantangelo%2Fgitingest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidesantangelo%2Fgitingest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidesantangelo%2Fgitingest/lists"}