{"id":47673775,"url":"https://github.com/babarot/gh-infra","last_synced_at":"2026-04-17T02:01:50.599Z","repository":{"id":346249095,"uuid":"1187322569","full_name":"babarot/gh-infra","owner":"babarot","description":"Declarative GitHub infrastructure management via YAML","archived":false,"fork":false,"pushed_at":"2026-04-11T03:41:46.000Z","size":47839,"stargazers_count":86,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-11T04:23:45.341Z","etag":null,"topics":["cli","gh-extension","github","go"],"latest_commit_sha":null,"homepage":"http://babarot.github.io/gh-infra","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/babarot.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","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-03-20T15:39:20.000Z","updated_at":"2026-04-11T03:41:35.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/babarot/gh-infra","commit_stats":null,"previous_names":["babarot/gh-infra"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/babarot/gh-infra","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fgh-infra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fgh-infra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fgh-infra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fgh-infra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/babarot","download_url":"https://codeload.github.com/babarot/gh-infra/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/babarot%2Fgh-infra/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31911846,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-16T18:22:33.417Z","status":"online","status_checked_at":"2026-04-17T02:00:06.879Z","response_time":62,"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":["cli","gh-extension","github","go"],"created_at":"2026-04-02T13:13:17.207Z","updated_at":"2026-04-17T02:01:50.593Z","avatar_url":"https://github.com/babarot.png","language":"Go","readme":"# gh-infra\n\n[![Tests](https://github.com/babarot/gh-infra/actions/workflows/build.yaml/badge.svg)](https://github.com/babarot/gh-infra/actions/workflows/build.yaml)\n[![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/babarot/c8e4b1de0846824230d86cb2d86f38cf/raw/gh-infra-coverage.json)](https://github.com/babarot/gh-infra/actions/workflows/build.yaml)\n\nDeclarative GitHub infrastructure management via YAML. Like Terraform, but for GitHub — no state file required.\n\n\u003ca href=\"https://babarot.github.io/gh-infra/\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./docs/public/demo-light.gif\" /\u003e\n    \u003cimg src=\"./docs/public/demo.gif\" alt=\"gh-infra demo showing plan and apply workflow\" /\u003e\n  \u003c/picture\u003e\n\u003c/a\u003e\n\n```bash\ngh infra plan    # Show what would change\ngh infra apply   # Apply the changes\n```\n📖 **[babarot.github.io/gh-infra](https://babarot.github.io/gh-infra/introduction/getting-started/)** — Full YAML reference, usage patterns, and guides.\n\n## Why\n\nThe [Terraform GitHub Provider](https://registry.terraform.io/providers/integrations/github/latest/docs) covers most GitHub-as-Code use cases, but it's overkill for personal or small-team use — provider installation, HCL, state files, and state locking add real overhead before you can change a single setting.\n\ngh-infra takes a different approach:\n\n- **YAML instead of HCL.** Declare what your repos should look like in plain YAML.\n- **No state file.** GitHub itself is the source of truth. Every `plan` fetches the live state and diffs directly — there's nothing to store, lock, or lose.\n- **`plan` before `apply`.** See exactly what will change before it happens. Most alternatives (Probot Settings, GHaC) apply immediately with no preview.\n- **One file, many repos.** A single `RepositorySet` can enforce consistent settings across dozens of repositories. No more clicking through the UI one repo at a time.\n- **Just `gh` and a token.** No GitHub App, no server, no extra infrastructure. If you can run `gh`, you can run `gh infra`.\n\n## Install\n\n```bash\ngh extension install babarot/gh-infra\n```\n\n### Agent Skills (optional)\n\nInstall gh-infra skills for your coding agent (Claude Code, Copilot, Codex, Cursor, etc.):\n\n```bash\n# via GitHub CLI (v2.90.0+)\ngh skill install babarot/gh-infra\n\n# via npx\nnpx skills add babarot/gh-infra\n```\n\nThis gives your agent knowledge of gh-infra commands, YAML schema, and CI/CD patterns so it can write and manage manifests for you.\n\n## Quick Start\n\n### 1. Import an existing repository\n\n```bash\ngh infra import babarot/my-project \u003e my-project.yaml\n```\n\n### 2. Edit the YAML to your desired state\n\n```diff\n  apiVersion: gh-infra/v1\n  kind: Repository\n  metadata:\n    name: my-project\n    owner: babarot\n\n  spec:\n    description: \"My awesome project\"\n    visibility: public\n    topics:\n      - go\n      - cli\n    features:\n      issues: true\n-     projects: false\n+     projects: true\n      wiki: false\n      discussions: true\n```\n\n### 3. Plan and apply\n\n```bash\ngh infra plan\ngh infra apply\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `plan [path]` | Show diff between YAML and current GitHub state |\n| `apply [path]` | Apply changes (with confirmation prompt) |\n| `import \u003cowner/repo\u003e` | Export existing repo settings as YAML |\n| `validate [path]` | Check YAML syntax and schema |\n\n## Path Resolution\n\n`plan`, `apply`, and `validate` accept an optional `[path]` argument:\n\n| Argument | Example | Behavior |\n|----------|---------|----------|\n| *(none)* or `.` | `gh infra plan` | All `*.yaml` / `*.yml` in the current directory |\n| File | `gh infra plan repos/my-cli.yaml` | That file only |\n| Directory | `gh infra plan repos/` | All `*.yaml` / `*.yml` directly under it (subdirectories are ignored) |\n\nYAML files that are not gh-infra manifests (e.g., GitHub Actions workflows, docker-compose) are silently skipped. Use `--fail-on-unknown` to treat them as errors instead.\n\n## Documentation\n\nFor full documentation — YAML reference, usage patterns, and guides — visit **[babarot.github.io/gh-infra](https://babarot.github.io/gh-infra/introduction/getting-started/)**.\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fgh-infra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbabarot%2Fgh-infra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbabarot%2Fgh-infra/lists"}