{"id":18923981,"url":"https://github.com/chand1012/git2gpt","last_synced_at":"2025-04-09T05:13:18.908Z","repository":{"id":144719440,"uuid":"615491966","full_name":"chand1012/git2gpt","owner":"chand1012","description":"Convert a Git repo into a ChatGPT prompt!","archived":false,"fork":false,"pushed_at":"2025-03-24T14:53:15.000Z","size":46,"stargazers_count":152,"open_issues_count":3,"forks_count":18,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T04:05:31.619Z","etag":null,"topics":["chatgpt","go","golang","gpt","gpt-3","gpt-4"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/chand1012/git2gpt","language":"Go","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/chand1012.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-03-17T20:30:03.000Z","updated_at":"2025-04-02T00:22:34.000Z","dependencies_parsed_at":"2024-04-11T18:41:53.043Z","dependency_job_id":"dc5008a3-1e25-45cd-8819-a31fd6322e7a","html_url":"https://github.com/chand1012/git2gpt","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fgit2gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fgit2gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fgit2gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chand1012%2Fgit2gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chand1012","download_url":"https://codeload.github.com/chand1012/git2gpt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980843,"owners_count":21027808,"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":["chatgpt","go","golang","gpt","gpt-3","gpt-4"],"created_at":"2024-11-08T11:02:00.010Z","updated_at":"2025-04-09T05:13:18.885Z","avatar_url":"https://github.com/chand1012.png","language":"Go","readme":"# git2gpt\n\ngit2gpt is a command-line utility that converts a Git repository to text for loading into ChatGPT and other NLP models. The output text file represents the Git repository in a structured format. You can also add a `.gptignore` file to your repos to have git2gpt ignore certain files. The text is prefixed with a preamble that explains to the AI what the text is:\n\n\u003e The following text is a Git repository with code. The structure of the text are sections that begin with ----, followed by a single line containing the file path and file name, followed by a variable amount of lines containing the file contents. The text representing the Git repository ends when the symbols --END-- are encounted. Any further text beyond --END-- are meant to be interpreted as instructions using the aforementioned Git repository as context.\n\n## Installation\n\nFirst, make sure you have the Go programming language installed on your system. You can download it from [the official Go website](https://golang.org/dl/).\n\nTo install the `git2gpt` utility, run the following command:\n\n```bash\ngo install github.com/chand1012/git2gpt@latest\n```\n\nThis command will download and install the git2gpt binary to your `$GOPATH/bin` directory. Make sure your `$GOPATH/bin` is included in your `$PATH` to use the `git2gpt` command.\n\n## Usage\n\nTo use the git2gpt utility, run the following command:\n\n```bash\ngit2gpt [flags] /path/to/git/repository\n```\n\n### Ignoring Files\n\nBy default, your `.git` directory and your `.gitignore` files are ignored. Any files in your `.gitignore` are also skipped. If you want to change this behavior, you should add a `.gptignore` file to your repository. The `.gptignore` file should contain a list of files and directories to ignore, one per line. The `.gptignore` file should be in the same directory as your `.gitignore` file. Please note that this overwrites the default ignore list, so you should include the default ignore list in your `.gptignore` file if you want to keep it.\n\n### Flags\n\n* `-p`,  `--preamble`: Path to a text file containing a preamble to include at the beginning of the output file.\n* `-o`,  `--output`: Path to the output file. If not specified, will print to standard output.\n* `-e`,  `--estimate`: Estimate the tokens of the output file. If not specified, does not estimate. \n* `-j`,  `--json`: Output to JSON rather than plain text. Use with `-o` to specify the output file.\n* `-x`,  `--xml`: Output to XML rather than plain text. Use with `-o` to specify the output file.\n* `-i`,  `--ignore`: Path to the `.gptignore` file. If not specified, will look for a `.gptignore` file in the same directory as the `.gitignore` file.\n* `-g`,  `--ignore-gitignore`: Ignore the `.gitignore` file.\n* `-s`,  `--scrub-comments`: Remove comments from the output file to save tokens.\n\n## Contributing\n\nContributions are welcome! To contribute, please submit a pull request or open an issue on the GitHub repository.\n\n## License\n\ngit2gpt is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.\n","funding_links":[],"categories":["Prompts For Discrete Tasks (Iterations on Individual Prompts)","Go"],"sub_categories":["Developing/Programming (General)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchand1012%2Fgit2gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchand1012%2Fgit2gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchand1012%2Fgit2gpt/lists"}