{"id":25328797,"url":"https://github.com/perbu/git2llm","last_synced_at":"2025-04-08T04:05:49.688Z","repository":{"id":276757572,"uuid":"929985368","full_name":"perbu/git2llm","owner":"perbu","description":"Go program to represent a git repo to an LLM.","archived":false,"fork":false,"pushed_at":"2025-03-30T19:56:47.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T20:29:15.099Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perbu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"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}},"created_at":"2025-02-09T20:58:58.000Z","updated_at":"2025-03-30T19:56:50.000Z","dependencies_parsed_at":"2025-03-30T20:35:29.074Z","dependency_job_id":null,"html_url":"https://github.com/perbu/git2llm","commit_stats":null,"previous_names":["perbu/git2llm"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fgit2llm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fgit2llm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fgit2llm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perbu%2Fgit2llm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perbu","download_url":"https://codeload.github.com/perbu/git2llm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773731,"owners_count":20993634,"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":[],"created_at":"2025-02-14T02:57:38.687Z","updated_at":"2025-04-08T04:05:49.682Z","avatar_url":"https://github.com/perbu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git2llm\n\nA command-line tool that generates a text representation of a Git repository's structure and contents, designed for\nusing with large language models.\n\n## Description\n\ngit2llm scans a directory and creates a text representation that includes:\n\n- A visual directory tree structure\n- Contents of all files (or specific file types)\n- Built-in filtering to exclude binary files, test files, and common directories like `.git`\n\n## Usage\n\n```\ngit2llm [options] \u003cstart_path\u003e [file_extensions...]\n```\n\n### Arguments:\n\n- `start_path`: The directory to scan. Typically \".\".\n- `file_extensions`: Optional list of file extensions to include (e.g., `.go .js .py`)\n\n### Options:\n\n- `-t, --exclude-tests`: Exclude test files (e.g., `*_test.go`, `test_*.go`)\n- `-h, --help`: Display help information\n\n### Examples:\n\nScan all files in the current directory:\n\n```\ngit2llm .\n```\n\nScan only Go files in a specific directory:\n\n```\ngit2llm ./src .go\n```\n\nScan Python and JavaScript files, excluding tests:\n\n```\ngit2llm --exclude-tests ./project .py .js\n```\n\n## How It Works\n\n1. The tool recursively traverses the specified directory\n2. It generates a tree representation of the directory structure\n3. For each file (filtered by extension if specified), it:\n    - Checks if it's a binary file (skips if binary)\n    - Checks against exclusion patterns\n    - Reads and includes the file content in the output\n4. Output is sent to stdout, which can be redirected to a file\n\n## Customizing Exclusions\n\ngit2llm ignores certain directories by default (`.git`, `.svn`, `.idea`, `.vscode`).\nYou can create a `.llmignore` file in your project root with additional patterns to exclude.\n\n## Installation\n\n`go install github.com/perbu/git2llm@latest`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperbu%2Fgit2llm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperbu%2Fgit2llm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperbu%2Fgit2llm/lists"}