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 --cloneOption C — GitHub UI: Go to the template repo on github.com → "Use this template" → "Create a new repository".
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 --fillAfter the PR merges, apply branch protection:
/path/to/anders-repo-template/scripts/protect-branch.sh <repo-name>| 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 |
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-pleasecannot open release PRs. - Security -> Private vulnerability reporting: enable private reports so security issues are not forced into public issues.
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-typefromsimpletopython/nodeif you want auto-version-bumping in source files