Use gh flarebyte to keep a GitHub repository aligned with the config checked into the repo.
gh-flarebyte is a GitHub CLI extension for managing a repository from a local .gh-flarebyte.cue file. It helps you:
- bootstrap a repository config
- update repo settings from config
- audit drift between config and GitHub
- sync topics and labels from config
- build release artifacts from the configured language
- publish a GitHub release from the build outputs
- discover repositories you contribute to in an organization
gh flarebyte repo init --repo <owner/name> [--overwrite]creates or seeds.gh-flarebyte.cuefor a repository.gh flarebyte repo update [--repo <owner/name>] [--confirm-deletions] [--accept-visibility-change-consequences]applies the repo config to GitHub.gh flarebyte repo audit [--repo <owner/name>] [--json]compares the local config with the live GitHub repository.gh flarebyte repos mine --org <org>lists repositories you contribute to in an organization.
gh flarebyte build [--target <os-arch>] [--output-dir <path>]builds the project using the language defined in.gh-flarebyte.cue.gh flarebyte release [--draft] [--notes-file <path>]builds first, then publishes a GitHub release from the build outputs.
gh flarebyte --versionprints the CLI version metadata, including version, commit id, build date, OS/arch, and Go runtime version.gh flarebyte --version --jsonprints the same version metadata in a machine-readable JSON shape.
Use gh flarebyte --help for command usage. Error output is designed to include the failing config field or target and a practical next step.
The repo config lives in .gh-flarebyte.cue and is the source of truth for:
- repository metadata such as description, homepage, visibility, and template status
- topics
- labels
- repository feature flags currently enforced by sync/audit:
repository.features.mergeCommit,repository.features.rebaseMerge,repository.features.squashMerge,repository.features.deleteBranchOnMerge - build language and artifact layout
- release settings
- additional repository feature fields may exist in config but are not yet enforced by
repo update/repo audit
Example:
project: {
org: "flarebyte"
repo: "gh-flarebyte"
}
repository: {
description: "CLI for landing your git commands right"
defaultBranch: "main"
topics: ["gh-extension", "github-cli", "git", "flarebyte"]
labels: [
{
name: "bug"
color: "B60205"
description: "Something is broken"
},
]
}
build: {
language: "go"
outputDir: "build"
checksumFile: "build/checksums.txt"
artifactTargetSuffix: true
targets: ["linux-amd64", "darwin-arm64"]
}
release: {
versionSource: "main.project.yaml"
tagPrefix: "v"
notesMode: "generate-notes"
artifactDir: "build"
includeChecksums: true
}- Run
gh flarebyte repo initin a repo that should be managed. - Edit
.gh-flarebyte.cueto match the desired repository state. - Run
gh flarebyte repo updateto sync the repo. - Run
gh flarebyte repo auditto check for drift. - Run
gh flarebyte buildandgh flarebyte releasewhen you are ready to ship.
make build-gobuilds the local CLI binary at.e2e-bin/gh-flarebyte.make releaseruns.e2e-bin/gh-flarebyte release(it depends onbuild-go).GH_FLAREBYTE_FAKE_RELEASE=1 make releaseruns the release flow in fake mode (no GitHub mutation).
- Topics are managed as a flat list of strings.
- Labels are managed as structured objects with
name,color, anddescription. - Build is Go-first today, with Dart reserved in the config for later.
build.artifactTargetSuffixcontrols whether artifact names include-os-archsuffixes.- when
falsewith multiple targets, artifacts are written under per-target subdirectories to avoid filename collisions.
- when
- Release publication uses the build outputs already produced by
gh flarebyte build.
