{"id":34568426,"url":"https://github.com/mattzcarey/zagi","last_synced_at":"2025-12-24T09:13:16.782Z","repository":{"id":329567408,"uuid":"1105603112","full_name":"mattzcarey/zagi","owner":"mattzcarey","description":"better git for agents","archived":false,"fork":false,"pushed_at":"2025-12-22T15:16:42.000Z","size":147,"stargazers_count":90,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-22T16:13:46.851Z","etag":null,"topics":["agents","ai","ai-agents","bugbot","claude","claude-code","cli","cursor","git","github","gitworktrees","opencode","trajectory","vcs","zig"],"latest_commit_sha":null,"homepage":"https://zagi.sh","language":"Zig","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattzcarey.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":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-11-27T21:53:22.000Z","updated_at":"2025-12-22T16:11:48.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mattzcarey/zagi","commit_stats":null,"previous_names":["mattzcarey/zagi"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/mattzcarey/zagi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattzcarey%2Fzagi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattzcarey%2Fzagi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattzcarey%2Fzagi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattzcarey%2Fzagi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattzcarey","download_url":"https://codeload.github.com/mattzcarey/zagi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattzcarey%2Fzagi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27999539,"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","status":"online","status_checked_at":"2025-12-24T02:00:07.193Z","response_time":83,"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":["agents","ai","ai-agents","bugbot","claude","claude-code","cli","cursor","git","github","gitworktrees","opencode","trajectory","vcs","zig"],"created_at":"2025-12-24T09:13:16.495Z","updated_at":"2025-12-24T09:13:16.776Z","avatar_url":"https://github.com/mattzcarey.png","language":"Zig","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zagi\n\n\u003e a better git interface for agents\n\n## Why use zagi?\n\n- 121 git compatible commands\n- ~50% smaller output that doesn't overflow context windows\n- 1.5-2x faster than git in all implemented commands\n- Agent friendly features like `fork`, `prompt` and `guardrails`\n- Git passthrough for non implemented commands\n\n## Installation\n\n```bash\ncurl -fsSL zagi.sh/install | sh\n```\n\nThis downloads the binary and sets up `git` as an alias to `zagi`. Restart your shell after installation.\n\n### From source\n\n```bash\ngit clone https://github.com/mattzcarey/zagi.git\ncd zagi\nzig build -Doptimize=ReleaseFast\n./zig-out/bin/zagi alias  # set up the alias\n```\n\n## Usage\n\nUse git as normal:\n\n```bash\ngit status         # compact status\ngit log            # concise commit history\ngit diff           # minimal diff format\ngit add .          # confirms what was staged\ngit commit -m \"x\"  # shows commit stats\n```\n\nAny commands or flags not yet implemented in zagi pass through to git. zagi also comes with its own set of features for managing code written by agents.\n\n### Easy worktrees\n\nzagi ships with a wrapper around worktrees called `fork`:\n\n```bash\n# Create named forks for different approaches your agent could take\ngit fork nodejs-based\ngit fork bun-based\n\n# Work in each fork\ncd .forks/nodejs-based\n# ... make changes, commit ...\n\ncd .forks/bun-based\n# ... make changes, commit ...\n\n# Compare results, then pick the winner\ncd ../..\ngit fork                       # list forks with commit counts\ngit fork --pick bun-based      # merge fork into base (keeps both histories)\ngit fork --promote bun-based   # replace base with fork (discards base commits)\n\n# Clean up\ngit fork --delete-all\n```\n\n### Agent mode\n\nSet `ZAGI_AGENT` to enable agent-specific features.\n\n```bash\nexport ZAGI_AGENT=claude-code\n```\n\nThe value can be any string describing your agent (e.g. `claude-code`, `cursor`, `opencode`) - this will be used in future features for agent-specific behavior.\n\nThis enables:\n- **Prompt tracking**: `git commit` requires `--prompt` to record the user request that created the commit\n- **Guardrails**: Blocks destructive commands (`reset --hard`, `checkout .`, `clean -f`, `push --force`) to prevent data loss\n\n```bash\ngit commit -m \"Add feature\" --prompt \"Add a logout button to the header..\"\ngit log --prompts  # view prompts\n```\n\nTo prevent child processes from overriding `ZAGI_AGENT`, make it readonly:\n\n```bash\n# bash/zsh\nexport ZAGI_AGENT=claude-code\nreadonly ZAGI_AGENT\n```\n\n### Strip co-authors\n\nRemove `Co-Authored-By:` lines that AI tools like Claude Code add to commit messages:\n\n```bash\nexport ZAGI_STRIP_COAUTHORS=1\ngit commit -m \"Add feature\n\nCo-Authored-By: Claude \u003cclaude@anthropic.com\u003e\"  # stripped automatically\n```\n\n### Git passthrough\n\nCommands zagi doesn't implement pass through to git or use `-g` to force standard git output:\n\n```bash\ngit -g log         # native git log output\ngit --git diff     # native git diff output\n```\n\n## Output comparison\n\nStandard git log:\n\n```\ncommit abc123f4567890def1234567890abcdef12345\nAuthor: Alice Smith \u003calice@example.com\u003e\nDate:   Mon Jan 15 14:32:21 2025 -0800\n\n    Add user authentication system\n```\n\nzagi log:\n\n```\nabc123f (2025-01-15) Alice: Add user authentication system\n```\n\n## Development\n\nRequirements: Zig 0.15, Bun\n\n```bash\nzig build                           # build\nzig build test                      # run zig tests\ncd test \u0026\u0026 bun i \u0026\u0026 bun run test    # run integration tests\n```\n\nSee [AGENTS.md](AGENTS.md) for contribution guidelines.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattzcarey%2Fzagi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattzcarey%2Fzagi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattzcarey%2Fzagi/lists"}