Getting Started

Installation

gh extension install myzkey/gh-repo-settings

Upgrade

gh extension upgrade myzkey/gh-repo-settings

Manual Installation

Download the latest binary from Releases and add it to your PATH.

Quick Start

# Initialize config interactively
gh repo-settings init

# Preview changes (like terraform plan)
gh repo-settings plan

# Apply changes
gh repo-settings apply

Default config paths (in priority order):

  1. .github/repo-settings/ (directory)
  2. .github/repo-settings.yaml (single file)

Basic Configuration

Create .github/repo-settings.yaml:

repo:
  description: "My awesome project"
  visibility: public
  allow_merge_commit: false
  allow_rebase_merge: true
  allow_squash_merge: true
  delete_branch_on_merge: true

topics:
  - typescript
  - cli
  - github

labels:
  items:
    - name: bug
      color: ff0000
      description: Something isn't working
    - name: feature
      color: 0e8a16
      description: New feature request

branch_protection:
  main:
    required_reviews: 1
    dismiss_stale_reviews: true
    require_status_checks: true
    status_checks:
      - ci/test
      - ci/lint

Next Steps