{"id":50659302,"url":"https://github.com/yusing/git-agent","last_synced_at":"2026-06-08T01:08:00.250Z","repository":{"id":361735585,"uuid":"1251057753","full_name":"yusing/git-agent","owner":"yusing","description":"git-agent is an OpenAI-compatible, read-only tool-calling agent harness for Git-related operations.","archived":false,"fork":false,"pushed_at":"2026-06-01T02:21:05.000Z","size":113,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T04:15:48.407Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/yusing.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-27T07:53:53.000Z","updated_at":"2026-06-01T02:21:09.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/yusing/git-agent","commit_stats":null,"previous_names":["yusing/git-agent"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/yusing/git-agent","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgit-agent","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgit-agent/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgit-agent/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgit-agent/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yusing","download_url":"https://codeload.github.com/yusing/git-agent/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yusing%2Fgit-agent/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34043838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-07T02:00:07.652Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-08T01:08:00.183Z","updated_at":"2026-06-08T01:08:00.246Z","avatar_url":"https://github.com/yusing.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# git-agent\n\n`git-agent` is an OpenAI-compatible tool-calling agent harness for Git-related\noperations. Model tools are read-only; the explicit `commit` command can run the\nfinal Git commit after message generation.\n\n## Commands\n\n- `git-agent commit-msg`\n- `git-agent commit-msg --amend`\n- `git-agent commit`\n- `git-agent commit --amend`\n- `git-agent pr-message`\n- `git-agent release-note \u003cbase\u003e \u003crelease\u003e`\n\nMermaid execution-flow graphs for each subcommand are documented in\n[`docs/spec.md`](docs/spec.md#subcommand-execution-flow-graphs).\n\n## Configuration\n\nBy default, `git-agent` uses ChatGPT/Codex auth from:\n\n```text\n~/.codex/auth.json\n```\n\nThe auth file must include:\n\n```json\n{\n  \"auth_mode\": \"chatgpt\",\n  \"tokens\": {\n    \"access_token\": \"...\",\n    \"account_id\": \"...\"\n  }\n}\n```\n\nChatGPT auth sends requests to `https://chatgpt.com/backend-api/codex` with\n`Authorization: Bearer \u003caccess_token\u003e` and `ChatGPT-Account-ID: \u003caccount_id\u003e`.\n\n`OPENAI_API_KEY` is a legacy fallback when `~/.codex/auth.json` is absent.\n`OPENAI_BASE_URL` only applies to that legacy API-key path; ChatGPT auth uses\nthe ChatGPT backend unless `--base-url` is passed explicitly.\nSupported environment variables:\n\n- `OPENAI_API_KEY`\n- `OPENAI_BASE_URL`\n- `OPENAI_MODEL`\n\nCLI flags override environment values.\n\nCommon flags:\n\n- `--model`\n- `--fast`\n- `--low`\n- `--medium`\n- `--high`\n- `--xhigh`\n- `--base-url`\n- `--timeout`\n- `--max-steps`\n- `--guidance-family`\n- `--debug`\n\nBehavior defaults:\n\n- omit `service_tier` unless `--fast` is set\n- omit reasoning mode unless one of `--low`, `--medium`, `--high`, or `--xhigh` is set\n\n## Build and install\n\n```sh\nmake build\nmake test\nmake install PREFIX=/usr/local\n```\n\n`make install` also honors `DESTDIR` for package-style installs.\n\nIf `$(FISH_CONFIG_DIR)` exists, `make install` also installs fish completions to\n`$(FISH_COMPLETIONS_DIR)/git-agent.fish`. Defaults:\n\n- `XDG_CONFIG_HOME ?= $(HOME)/.config`\n- `FISH_CONFIG_DIR ?= $(XDG_CONFIG_HOME)/fish`\n- `FISH_COMPLETIONS_DIR ?= $(FISH_CONFIG_DIR)/completions`\n\n## Debug sessions\n\nMessage-generation commands store a JSON trace under:\n\n```text\n.git-agent/sessions/\u003ctimestamp\u003e-\u003ccommand\u003e/\n```\n\nTrace files include session metadata, every Responses request sent to the\nprovider, every response received, each tool call, and the tool output returned\nto the model. API keys are redacted from request traces. `--debug` prints the\ntrace directory to stderr.\n\n`git-agent commit` and `git-agent commit --amend` generate the same message as\n`commit-msg`. Stdout streams a human console trace while the message\nis generated, then prints Git's raw commit summary after `git commit` succeeds.\nTrace lines use short local times like `15:04:05 INF final`, color field keys\nwhen stdout is a terminal, and render long or multiline values as indented\npreview blocks so raw patches do not flood the console. No on-disk trace session\nis written. Commit creation is delegated to\n`git commit --file -` (or\n`git commit --amend --file -`), so normal Git config, hooks, `commit.gpgSign`,\nsystem `gpg`, and `gpg-agent` behavior apply. If commit creation fails after\nmessage generation, including because signing fails or a key is locked, the\ncommand exits nonzero and stdout still contains the streamed trace lines,\nincluding the final event for the generated message. The final error includes\nthe generated message and Git error so the user can commit manually.\nIn amend mode, the current HEAD commit message is treated as the message anchor:\nsmall staged cleanups or refinements must preserve the original subject instead\nof replacing the commit with a narrow delta description. The amend request is\nseeded with prepared context for the latest commit being amended, including its\nHEAD-vs-parent diff, the final amended diff versus the parent, staged\ndiagnostics, and recent style commits before the model can ask for narrower\nread-only follow-up tools.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fgit-agent","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyusing%2Fgit-agent","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyusing%2Fgit-agent/lists"}