Skip to content

Quick start

This page takes you from zero to a running gh-maintainer instance in dry-run mode: it reads your repositories and reports what it would do, but changes nothing on GitHub. Each step links to the installation guide for the details.

You need:

  • A Kubernetes cluster with an ingress controller (Traefik or ingress-nginx) and cert-manager for the default private-CA certificate. The base uses the cluster’s default IngressClass and StorageClass; if your cluster has none, set them in your overlay. On microk8s, for example: microk8s enable dns ingress cert-manager hostpath-storage. See Installation.
  • A linux/amd64 node. The images are built for amd64 only.
  • kubectl, git, openssl, htpasswd (Debian/Ubuntu: apache2-utils) and the claude CLI on your workstation.
  • A Claude subscription. The fixer runs Claude Code with your subscription’s OAuth token.

Create a fine-grained personal access token at GitHub → Settings → Developer settings → Fine-grained tokens. Set the resource owner to the user or organization you want to maintain, select All repositories, and grant these repository permissions:

Permission Access
Contents Read and write
Pull requests Read and write
Administration Read-only
Actions Read-only
Dependabot alerts Read-only
Code scanning alerts Read-only
Secret scanning alerts Read-only
Metadata Read-only

Clone the repository and create the namespace:

Terminal window
git clone https://github.com/pierrejochem/gh-maintainer.git
cd gh-maintainer
kubectl apply -f deploy/base/namespace.yaml

Create the app secret with the three tokens:

Terminal window
claude setup-token # prints a long-lived Claude OAuth token
openssl rand -hex 32 # generates the EVENT_TOKEN
cp deploy/secret.example.yaml deploy/secret.yaml
chmod 600 deploy/secret.yaml
$EDITOR deploy/secret.yaml # replace the three REPLACE_ME_* values
kubectl apply -f deploy/secret.yaml
rm -f deploy/secret.yaml

Create the basic-auth secret that protects the widget, for the ingress controller you run (creating both does no harm):

Terminal window
htpasswd -cB deploy/auth.htpasswd <user>
kubectl -n gh-maintainer create secret generic gh-maintainer-auth \
--from-file=auth=deploy/auth.htpasswd # ingress-nginx
kubectl -n gh-maintainer create secret generic gh-maintainer-traefik-auth \
--from-file=users=deploy/auth.htpasswd # Traefik

The base manifests contain only placeholders. Copy the template overlay so that you never edit the base:

Terminal window
cp -r deploy/overlays/example deploy/overlays/mine

Then edit two files and replace every CHANGE_ME and gh-maintainer.example.com:

  • deploy/overlays/mine/config.yaml: set owner: to your GitHub user or organization name. Leave dryRun: true.
  • deploy/overlays/mine/kustomization.yaml: set the same owner in the status-server patch (value: CHANGE_ME), and your hostname in the Ingress and Certificate patches.

Under components:, keep ../../components/traefik for Traefik or remove it for ingress-nginx. Keep ../../components/private-ca unless you bring your own certificate. If your cluster has no default IngressClass or StorageClass, uncomment the matching patch. The installation guide explains each value.

Review the render, then apply:

Terminal window
kubectl kustomize deploy/overlays/mine | grep -E 'host:|owner:|OWNER' -A1 # no CHANGE_ME left
kubectl apply -k deploy/overlays/mine
kubectl -n gh-maintainer rollout status deployment/status-server

The overlay builds on deploy/overlays/ghcr and pins the release images ghcr.io/pierrejochem/gh-maintainer-agent:1.3.0 and ghcr.io/pierrejochem/gh-maintainer-status-server:1.3.0. To use a newer release later, change both newTag: values; see Deploy from GHCR and the releases.

The CronJob runs every two hours. Start a run now instead:

Terminal window
kubectl -n gh-maintainer create job --from=cronjob/gh-maintainer-agent first-run
kubectl -n gh-maintainer logs -f job/first-run -c agent

A healthy run ends with gh-maintainer: run <runId> finished {...}.

Point your hostname at your ingress, then open https://<your-host>/ and log in with the htpasswd user. With the private CA component, the certificate comes from a private CA, so your browser warns until you trust the CA.

You see a DRY-RUN badge, your repositories, open security findings and the activity feed of the run.