Skip to content

Latest commit

 

History

History
67 lines (53 loc) · 2.4 KB

File metadata and controls

67 lines (53 loc) · 2.4 KB

How to use anders-repo-template

Create a new repo from this template

Option A — script (recommended):

./scripts/new-repo.sh my-new-app "Short description"

Option B — gh CLI directly:

gh repo create sterngold/my-new-app \
  --template sterngold/anders-repo-template \
  --private --clone

Option C — GitHub UI: Go to the template repo on github.com → "Use this template" → "Create a new repository".

Retro-fit an existing repo

From inside the target repo:

git checkout -b chore/apply-anders-baseline
curl -sSL https://raw.githubusercontent.com/sterngold/anders-repo-template/main/scripts/apply-baseline.sh | bash
# Edit AGENTS.md, README.md to repo specifics
pre-commit install
git add -A && git commit -m "chore: apply Anders repo baseline"
gh pr create --fill

After the PR merges, apply branch protection:

/path/to/anders-repo-template/scripts/protect-branch.sh <repo-name>

What's enforced

Check How
Conventional Commit titles on PRs commitlint via GitHub Action
No secrets in commits gitleaks pre-commit + CI
Lint + test pass language-specific jobs in ci.yml
Signed commits on main manual GitHub setting; protect-branch.sh currently leaves required_signatures=false
No force-push to main branch protection
No direct commits to main branch protection (PR required)
Linear history branch protection (squash-merge only)
Auto-generated CHANGELOG + version bumps release-please
Weekly dependency updates dependabot

Required GitHub repository settings

Two controls live in GitHub settings rather than in committed files:

  • Actions -> General -> Workflow permissions: allow GitHub Actions to create and approve pull requests, otherwise release-please cannot open release PRs.
  • Security -> Private vulnerability reporting: enable private reports so security issues are not forced into public issues.

Per-repo customization

The template ships polyglot defaults. Per-repo:

  • AGENTS.md — fill in stack, build/test commands
  • Makefile — adjust targets if needed
  • .pre-commit-config.yaml — uncomment ruff (Python) or prettier (JS/TS) blocks
  • .github/dependabot.yml — uncomment pip/npm/swift block matching the repo
  • release-please-config.json — change release-type from simple to python / node if you want auto-version-bumping in source files