{"id":29840418,"url":"https://github.com/stormlightlabs/gitguy","last_synced_at":"2026-04-20T13:35:10.898Z","repository":{"id":305545160,"uuid":"1022877383","full_name":"stormlightlabs/gitguy","owner":"stormlightlabs","description":"TUI to generate a commit message \u0026 PR from a diff","archived":false,"fork":false,"pushed_at":"2025-07-20T20:53:54.000Z","size":97,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-29T14:57:20.841Z","etag":null,"topics":["charmbracelet","git","go","llm","tui"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stormlightlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2025-07-20T03:23:33.000Z","updated_at":"2025-07-20T20:53:58.000Z","dependencies_parsed_at":"2025-07-20T19:13:58.570Z","dependency_job_id":null,"html_url":"https://github.com/stormlightlabs/gitguy","commit_stats":null,"previous_names":["stormlightlabs/gitguy"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stormlightlabs/gitguy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormlightlabs%2Fgitguy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormlightlabs%2Fgitguy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormlightlabs%2Fgitguy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormlightlabs%2Fgitguy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stormlightlabs","download_url":"https://codeload.github.com/stormlightlabs/gitguy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stormlightlabs%2Fgitguy/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32049046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["charmbracelet","git","go","llm","tui"],"created_at":"2025-07-29T14:12:39.499Z","updated_at":"2026-04-20T13:35:10.878Z","avatar_url":"https://github.com/stormlightlabs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `gitguy`\n\n`gitguy` is a command-line tool that uses AI to generate commit messages and pull request\ndescriptions from your git diffs. It can be run as an interactive TUI or as a non-interactive\nCLI for use in scripts and CI/CD pipelines.\n\n## Features\n\n- **Interactive TUI**: A user-friendly terminal interface for selecting git references (branches or commits) and viewing generated content.\n- **Non-Interactive Mode**: Generate commit messages and PRs directly from the command line, perfect for automation.\n- **AI-Powered**: Leverages OpenRouter to generate high-quality, conventional commit messages and detailed PR descriptions.\n- **Customizable**: Use your own PR templates to guide the AI's output.\n- **Secure**: API keys are stored securely in your system's default configuration directory.\n- **Logging**: Detailed logs of API requests are stored for debugging and auditing.\n\n## Installation\n\n```bash\ngo get github.com/stormlightlabs/gitguy\n```\n\n## Usage\n\n### Interactive Mode\n\nTo start the interactive TUI, simply run `gitguy` in your git repository:\n\n```bash\ngitguy\n```\n\nThis will launch a TUI where you can:\n\n1. **Select \"current\" and \"incoming\" refs** (branches or commits) to generate a diff.\n2. **View the generated diff**.\n3. **Generate a commit message and PR description** from the diff.\n4. **Copy** the commit message or **save** the PR description to a file.\n\n### Non-Interactive Mode\n\nFor scripting or CI integration, you can use the following flags:\n\n```bash\ngitguy \\\n  --ref-current \u003ccurrent-ref\u003e \\\n  --ref-incoming \u003cincoming-ref\u003e \\\n  --out-pr PR.md \\\n  --non-interactive\n```\n\n- `--ref-current`: The base git reference (e.g., `main`, `HEAD`).\n- `--ref-incoming`: The feature branch or commit to compare.\n- `--out-pr`: The output file for the PR description (defaults to `PR.md`).\n- `--non-interactive`: Skips the TUI and prints the commit message to stdout.\n\n### Configuration\n\n`gitguy` requires an OpenRouter API key. You can provide it in one of the following ways:\n\n1. **Command-line flag**: `--api-key YOUR_API_KEY`\n2. **Environment variable**: `OPENROUTER_API_KEY=YOUR_API_KEY`\n3. **Configuration file**: The first time you run `gitguy`, it will create a `config.yaml` file in the appropriate configuration directory for your OS (`~/.config/gitguy` on Linux, `~/Library/Application Support/gitguy` on macOS, and `%APPDATA%\\gitguy` on Windows). You can add your API key to this file.\n\nYou can also specify a PR template file using the `--pr-template` flag.\n\n## Architecture\n\n`gitguy` is built with the following Go libraries:\n\n- **CLI**: [Cobra](https://github.com/spf13/cobra) for command-line argument parsing.\n- **TUI**: [Bubble Tea](https://github.com/charmbracelet/bubbletea) for the interactive terminal interface.\n- **Git**: [go-git](https://github.com/go-git/go-git) for git repository operations.\n- **Configuration**: [Viper](https://github.com/spf13/viper) for managing configuration.\n- **Logging**: A custom logger that writes API interactions to a log file.\n\n## TODO\n\n1. Setup command\n2. Theme fetching (base16/tinted-theming)\n    - Default themes: Nord, Atom, Catppuccin, Rosé Pine (embedded in binary)\n3. File Tree Viewer\n4. Horizontal pager for diffs (file-by-file)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormlightlabs%2Fgitguy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstormlightlabs%2Fgitguy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstormlightlabs%2Fgitguy/lists"}