Repo Blueprint¶
GitHub repositories that test, release, secure and update themselves — from one copier copy.
Repo Blueprint is a Copier template for ten kinds of projects: Home Assistant integrations, Nextcloud apps, GitHub Actions, Python and Node packages, Chrome extensions, Electron apps, Cloudflare Workers, container images and repositories without a build. A new repository starts with more than 30 workflows, and a bot brings it up to every new release of the blueprint.
- Tested on every change.
scripts/check.shruns the same checks on your machine and in the CI, with full coverage of the code. The PR coach explains every check that fails, and the fix bot commits what a command can fix. - Released and signed by a bot. Merging the release pull request publishes the release with SBOM and signed provenance of SLSA Build Level 3, container images too, then verifies it as users can.
- Secure from the first commit. CodeQL, OpenSSF Scorecard, a secret scan and an audit of the workflows run from the start, every action is pinned to a commit hash, and about 100 answers of OpenSSF Best Practices and of its OSPS Baseline are filled in.
- Up to date by itself. Renovate updates the dependencies, the settings bot keeps the settings as code, and the blueprint bot brings every release of the blueprint as a pull request that its checks test before it merges; each public repository made with the blueprint takes every release this way.
Start a repository Compare Read the guide
How a repository looks after itself¶
Every change, yours or a bot's, is a pull request that merges once every check passes, and the release bot makes a signed release of what reaches main; three bots keep the repository current on their own. In the pictures, blue is the blueprint and its bots, orange is you and what is yours, and green is what comes out.
The website of every repository shows all of it on the page Automation, which it writes from the workflows at every build: what each one does and what starts it, which checks a pull request needs, and which workflows hold a secret.
What a new repository gets¶
-
Checks
scripts/check.shon every change, the same locally and in the CI: tests with full coverage, on every core in Python projects, types, lint and packaging. The workflows, the license of every file, the Markdown, the sign-off of every commit, the signature of every commit where the rules require one and the title of every pull request are checked as well. A passing error of a download fails no run: every download tries again. -
PR coach
Every check that fails says what it found, why that matters and how to fix it, with the commands to run: in the check, and in one comment on the pull request that follows every push, also on a pull request from a fork. What a command can fix, the pull request fixes by itself: the fix bot commits it, suggests it on a fork, and keeps
mainfixed. -
Security
CodeQL, the taint analysis of Psalm for the PHP of a Nextcloud app, OpenSSF Scorecard, dependency review, a secret scan, SBOMs of what each release ships, the security audit of the workflows, every lock file against the OSV database and the answers of OpenSSF Best Practices that the blueprint guarantees. Every action is pinned to a commit hash.
-
Releases
A pull request with the next version, from the titles of the merged pull requests, and the changelog as its notes. Merging it publishes the release with its package, SBOM and signed provenance (SLSA Build Level 3), and verifies it as its users can.
-
Dependencies
Renovate, which the blueprint runs a few times a day: actions and dependencies a week after their release and an image whose registry gives no date of its release, and the packages of Playwright that start the browsers of such an image, at its next run, on Mondays, and at once an update that fixes a vulnerability or the new commit of a branch that an action follows. Every update, a major one too, and the weekly refresh of the lock files from versions a week old, merge themselves once every check passes. Renovate keeps no issue open.
-
Issues
The issue assistant: a first analysis of every new issue by an AI that only reads, labels, duplicates, reminders, and closing with the release that ships the fix. Each new release of the assistant reaches every repository by itself, once a bot has verified that its release workflow made it. A bot that fails on
mainopens one issue of its own, which closes once the bot passes again. -
Website
The documentation in
docs/as a website with search and a light and a dark theme, in English and German. Every pull request builds it strictly and checks every link and anchor of the built pages, every change ofmainpublishes it on GitHub Pages and signs it. -
Diagrams
Every diagram as a picture that every reader sees, also in the GitHub app and the stores, drawn from its Mermaid source; the website shows the same pictures, so a page with a diagram stays light. The bots fix them by themselves: in a pull request, on
mainand after an update of the renderer. -
Screenshots
The pictures of the project renew themselves: after a change of what they show, after every release and every week, the screenshot bot runs
scripts/screenshots.shand keeps one pull request with the pictures whose pixels changed, which merges itself. A new repository photographs its website and, by its kind, its integration or its app from the start. -
Settings as code
Merges, rulesets, security, Actions, environments, variables, labels and GitHub Pages in
.github/repository.toml. The settings bot applies them after every change and every week. -
Updates
After every release and every week, and within a day for a repository that the Rollout doesn't reach, the blueprint bot verifies the release, which must be immutable and signed by the release workflow of the blueprint, then runs
copier updateand keeps one pull request current. Without conflicts, it merges itself once every check passes; the files of the project and your commits on its branch are never overwritten. -
Community
README, contributing guide, code of conduct, security policy and security design, governance, issue forms, records of the decisions, and discussions with an announcement of every release.
-
Coding agents
AGENTS.mdgives Claude Code, Codex, GitHub Copilot and Cursor the commands, the rules of pull requests and the changelog, and which files belong to the project and which to the blueprint. The notes of the project join it from.github/agents.project.md.
The guide lists every area, with the PR coach, the coverage of every pull request, mutation tests, flaky tests, cancelled checks, failed releases, the clean-up and the dev container as well.
Kinds of projects¶
-
Home Assistant integration
Ruff, mypy, tests, HACS and hassfest; a zip asset for HACS.
-
Nextcloud app
php-cs-fixer, Psalm with its taint analysis and PHPUnit in random order with every line covered, the tools on PHP 8.3 and the code on PHP 8.2 as well; a signed package for the App Store.
-
GitHub Action
A composite action with Ruff, mypy, tests and a run of the action; release tags and a moving major tag.
-
Python package
Ruff, mypy, tests and a build with Hatchling; PyPI with trusted publishing.
-
Node package
TypeScript, Biome, tsc and node:test with full coverage; npm with provenance.
-
Chrome extension
Manifest V3 in TypeScript, the manifest checked against the store and loaded in Chrome for Testing; every release to the Chrome Web Store, without a stored secret.
-
Electron app
A desktop app in TypeScript, started in Electron in every check; its installers for Windows, macOS and Linux built in every pull request and attested in every release, from which the installed app updates.
-
Cloudflare Worker
TypeScript with Wrangler, its tests in workerd with full coverage; Cloudflare's Workers Builds deploys each release, without a key in GitHub.
-
Container image
Alpine by digest, Hadolint, a build and a self-test; GHCR, multi-arch, with SBOM and provenance.
-
Repository without a build
The text files and shell scripts are checked, and the releases come without a package.
Every kind starts with a small working example and its tests, to be replaced with the real code. The guide names the stack of each kind.
Start a repository¶
Git with signing, Python 3.12 or later, uv and GitHub CLI 2.48 or later, signed in as an administrator of the account or organization that will own the repository (gh auth login):
uvx --from copier==9.19.1 copier copy gh:Dennis-Otto/repo-blueprint my-project
cd my-project
python3 .github/blueprint.py create
With pipx in place of uv, the first line is pipx run --spec copier==9.19.1 copier copy gh:Dennis-Otto/repo-blueprint my-project, and a Copier of your own, Copier 9.8 or later, runs copier copy gh:Dennis-Otto/repo-blueprint my-project; on Windows, py -3 runs Python in place of python3. Copying runs no code of the blueprint: the template has no tasks, migrations or Jinja extensions, so Copier needs no --trust.
Copier asks for the name, a one-sentence description, the kind of project, the GitHub account or organization that owns it, the license (MIT, MIT-0, BSD-3-Clause, Apache-2.0, GPL-3.0-or-later or AGPL-3.0-or-later), a few details of the kind and the release app of the owner, which may stay empty until app register registers it. The homepage is the website that the Docs workflow publishes on GitHub Pages, unless you name another or none, and the README, the About box, the issue forms and the manifests link it; each kind starts with topics of its own, such as home-assistant, hacs, which HACS needs. Copier refuses an answer that would break a file, such as a name with """ or a backslash, or that GitHub or the App Store wouldn't take.
create makes the repository of the copy, with no checkout of the blueprint: every copy brings blueprint.py in .github/. It takes the owner and the name from the answers of Copier, and its preflight first checks Python, Git and its signing, GitHub CLI and its sign-in, owner and name; a finding marked with ✘ stops it before anything is made, with the command that fixes it. Then create runs git init --initial-branch=main, commits the files with a sign-off, the scripts and the hook as executable on Windows too, creates the repository with gh repo create and pushes to it, public unless you add --private (green on GitHub Free too), has GitHub register every workflow (why), then applies the settings as code and prints the checklist: what is left for a person, such as the release app and the secrets, and which steps are done.
The guide describes how your own account gets its release app and keeps its answers, and the page Your own account walks through a repository of your own step by step, with Renovate in the repository or as the Mend app and the issue assistant with or without AI; the guide also says what each repository needs once, and how an existing repository takes the blueprint.
Made with the blueprint¶
Seven public repositories follow the blueprint, each with code of its own and the checks and bots of the blueprint; every release of the blueprint reaches them as a pull request:
- HomeDarts for Autodarts, a Home Assistant integration: local real-time board control, games, tournaments and statistics, without a cloud account.
- Player Switch for Autodarts, a Chrome extension in TypeScript: a shared Autodarts display where everyone plays under their own account and a tap on a tile switches players, without signing in again.
- Issue assistant, a GitHub Action: a first analysis of every new issue by an AI that only reads, checked by a job without AI before it posts.
- Paperless Sync, a Nextcloud app: the documents of Paperless-ngx in Nextcloud Files, by correspondent, type and year.
- Paperless Unified Search, a Nextcloud app: the full-text search of Paperless-ngx in the unified search of Nextcloud.
- Repo Pager, a Cloudflare Worker in TypeScript: a private Telegram pager that each maintainer runs for their own repositories, which tells them only what needs them and acts on it with a button.
- dennis-otto.github.io, a repository without a build: the website with every project of its owner.
The dashboard shows each of them at a glance: the release of the blueprint it is on, its checks, its releases and its Scorecard.
Why Repo Blueprint¶
- Rather than a template repository of GitHub: Use this template copies the files once, without the settings, and nothing follows them later. The blueprint sets the rulesets, the security and the environments as code, and brings every improvement as a pull request.
- Rather than Cookiecutter and cruft: the hooks of a Cookiecutter template run code on your machine, and
cruft updatewaits until someone runs it. Copier runs none of the blueprint's code, so it needs no--trust;blueprint.py create, which you run next, is a file of the copy that you can read first. And the bot of the blueprint updates every repository by itself. - Rather than another Copier template, such as copier-uv or scientific-python/cookie, which serve Python projects well: the blueprint brings one standard to Home Assistant, Nextcloud, GitHub Actions, Node and containers too, with signed releases of SLSA Build Level 3, SBOMs and VEX, and tests each release on every kind and the real repositories before rollout.
- Rather than projen: projen writes the files of a project from code that runs at every synthesis, above all for TypeScript, AWS CDK and jsii. The blueprint needs no code of its own in the project: it keeps its own files current and leaves those of the project to you.
The comparison puts them side by side, also where another tool fits better.
Learn more¶
-
Guide
Everything a new repository gets, the settings as code, the updates and what belongs to a project.
-
Comparison
The blueprint beside GitHub template repositories, Cookiecutter with cruft, other Copier templates and projen, also where they fit better.
-
Roadmap
Where the blueprint is heading in the next twelve months, and what it will not do.
-
Security design
What the blueprint protects, what it trusts, the threats with their countermeasures, and the risks that remain.
-
Decisions
The decisions that shape the blueprint, each with its reasons.
-
Releases and changelog
Every release with its notes on GitHub, and the changes of each version.
-
Dashboard
Every public repository of the owner at a glance: the release of the blueprint it is on, its releases, pull requests, runs, website, Scorecard and health, with the same data as JSON and a feed of every release.
