@doguyilmaz/tapster 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +66 -187
  2. package/dist/cli.js +643 -197
  3. package/package.json +30 -4
package/README.md CHANGED
@@ -1,216 +1,95 @@
1
+ <p><img src="https://raw.githubusercontent.com/doguyilmaz/tapster/main/site/public/logo-512.png" width="112" alt="The tapster octopus, a courier carrying sealed parcels"></p>
2
+
1
3
  # tapster
2
4
 
3
5
  tapster turns your Homebrew tap into the one place that signs, notarizes and publishes the releases of all your
4
- projects. Each project only builds and opens a draft release. It holds no signing certificate, no notary key and no
5
- tap token.
6
-
7
- It covers command line tools written in Go (with GoReleaser) or Bun. Releases get Developer ID signatures, Apple
8
- notarization, a Homebrew cask and, with Windows builds, a Scoop manifest. It also covers macOS apps that update
9
- through Sparkle: the hub signs every piece of code in the app, builds and notarizes the DMG and signs the update feed.
10
- Command line tools with Linux builds can also ship to apt and dnf from the hub's GitHub Pages site.
11
-
12
- ## How it works
13
-
14
- ```
15
- project (push tag v1.2.3) hub: you/homebrew-tap
16
- builds, attests, no secrets runs tapster on a schedule or when rung
17
- -> draft release + checksums.txt -> signs and notarizes the macOS binaries
18
- replaces the archives, publishes the release
19
- writes Casks/<name>.rb and bucket/<name>.json
20
- ```
21
-
22
- 1. A project pushes a tag. Its workflow builds the archives, attests them and opens a draft release with
23
- `checksums.txt`.
24
- 2. The hub's `tapster` workflow finds drafts that are ready. It downloads them and checks every file against
25
- `checksums.txt` and the project's build attestation. Then it signs and notarizes the macOS binaries.
26
- 3. It swaps the signed archives into the draft, publishes the release and commits the cask and the Scoop manifest to
27
- the hub.
28
-
29
- The design, including the security model, is in
30
- [docs/superpowers/specs/2026-10-18-tapster-design.md](docs/superpowers/specs/2026-10-18-tapster-design.md). Apps are in
31
- [docs/superpowers/specs/2026-10-19-tapster-phase2-design.md](docs/superpowers/specs/2026-10-19-tapster-phase2-design.md),
32
- the doorbell and Linux packages in
33
- [docs/superpowers/specs/2026-10-19-tapster-phase3-design.md](docs/superpowers/specs/2026-10-19-tapster-phase3-design.md).
6
+ projects. Each project builds its files and opens a draft release. It holds no signing certificate, no notary key and
7
+ no tap token.
34
8
 
35
- ## Set up a hub
9
+ **Tutorial and docs: [tapster.doguyilmaz.com](https://tapster.doguyilmaz.com/)**
36
10
 
37
- You need [Bun](https://bun.sh) and the GitHub CLI (`gh auth login`). tapster serves repositories of a personal
38
- account. To sign software for macOS you also need a Developer ID Application certificate exported as `.p12` and an App
39
- Store Connect API key (`.p8`); a hub that ships only Linux or Windows builds needs neither.
11
+ ## Set it up in your browser
40
12
 
41
- ```sh
42
- gh repo clone you/homebrew-tap && cd homebrew-tap
43
- bunx @doguyilmaz/tapster init
44
- ```
45
-
46
- `init` protects the hub, creates a GitHub App for it and stores the App key and, if you sign for macOS, your Apple
47
- credentials as secrets of a `tapster` environment that only the `main` branch can open. It checks the certificate type
48
- and expiry and, on macOS, asks Apple whether the notary key works before storing it. It never prints them. Then it
49
- writes `tapster.yml`, the workflow and a README; review and commit them. If it stops halfway, run it again: it skips
50
- what is done. A private hub needs GitHub Pro for environments.
51
-
52
- The workflow pins the exact tapster that ran `init`. The hub looks for drafts every 10 minutes. A private hub looks
53
- every hour, because GitHub bills each of its runs as at least a minute; `--every <minutes>` changes it. To move a hub to a newer
54
- tapster, run `bunx @doguyilmaz/tapster@<version> init --workflow` and review the diff. If the hub has a doorbell, run
55
- `init --rotate doorbell` too, so the Worker gets the same version and schedule. A hub that moves to this version from
56
- an earlier one refuses each project until you run `tapster add` in it once, which protects its branches and tags.
57
-
58
- ## Add a project
59
-
60
- Inside a clone of the project:
13
+ You need [Bun](https://bun.sh) and the GitHub CLI, signed in with `gh auth login`. Signing for macOS also needs an Apple
14
+ Developer account.
61
15
 
62
16
  ```sh
63
- bunx @doguyilmaz/tapster add
17
+ bunx @doguyilmaz/tapster setup
64
18
  ```
65
19
 
66
- - **Go with GoReleaser:** `add` turns on draft releases, names the checksum file `checksums.txt`, removes
67
- `notarize`, `homebrew_casks`, `brews` and `scoops`. It adds an attestation step to the release workflow
68
- (`--workflow` names it if it is not `release.yml`).
69
- - **Bun:** `add` writes a release workflow whose build job cross-compiles every target without write access; a second
70
- job attests the archives and opens the draft.
71
-
72
- `add` asks once which hub publishes the project and remembers it. It then:
73
-
74
- 1. protects the project so that only you can create, move or delete its branches and tags (a stolen App key could
75
- otherwise tag code that the hub would sign). GitHub does not let personal repositories exempt Dependabot, so
76
- `--allow-dependabot` leaves its `dependabot/...` branches open instead and adds `protection: dependabot` to the
77
- entry, so the hub accepts that opening only where you wrote it down;
78
- 2. opens a pull request on the hub with the project's entry, checked the way the hub checks it;
79
- 3. opens the App's install page with the project selected, for one click;
80
- 4. points the release workflow at the doorbell, if the hub has one.
81
-
82
- Releases that a workflow tags by itself still work: `add --auto-tag` gives the project a deploy key that only its
83
- default branch can use and prints the step that pushes the tag with it.
84
-
85
- ## Apps
20
+ A page opens in your browser, served by your own computer. It walks you through every step and shows what each one
21
+ changes on GitHub:
86
22
 
87
- An app project builds the app in its own workflow and signs it ad hoc. It hands the app over as
88
- `<App>-<version>.app.tar.gz` in a draft release. `tapster add` finds an XcodeGen `project.yml` or an `Info.plist`
89
- with `SUFeedURL`, writes that workflow and prints the hub entry. The build job can only read the repository. A second
90
- job attests the archive and opens the draft.
23
+ 1. **Choose or create your tap.** It becomes your hub.
24
+ 2. **Protect it, create its GitHub App and store your Apple files.** Drop the `.p12` and `.p8`; your password manager
25
+ can keep the `.p12` password.
26
+ 3. **Write the hub files.** tapster commits them to your tap through GitHub; you need no clone of it.
27
+ 4. **Add your projects.** tapster finds the projects cloned on your computer, prepares their release workflows, protects
28
+ them and proposes them to the hub.
91
29
 
92
- The hub then:
30
+ Then push a tag in a project. The [tutorial](https://tapster.doguyilmaz.com/tutorial/before/) shows every step.
93
31
 
94
- 1. checks the app before anything is signed: both version keys equal the tag, the bundle id, the feed address, the
95
- pinned public key, the embedded Sparkle version and every nested bundle's identifier and name;
96
- 2. signs every piece of code inside out with identifiers and entitlements it chooses itself (`code` in `tapster.yml`);
97
- 3. builds the DMG without Finder, then signs, notarizes and staples it;
98
- 4. signs the DMG and the appcast with the app's Sparkle key;
99
- 5. publishes the DMG, the feed and `checksums.txt`, removes the unsigned archive and writes the cask.
32
+ Prefer a terminal? Run `bunx @doguyilmaz/tapster init` in a clone of your tap and `bunx @doguyilmaz/tapster add` in
33
+ each project. See [Set up from a terminal](https://tapster.doguyilmaz.com/guides/terminal/).
100
34
 
101
- The app must ask Sparkle for signed feeds. Set both keys in its `Info.plist`:
35
+ ## How it works
102
36
 
103
- ```xml
104
- <key>SURequireSignedFeed</key><true/>
105
- <key>SUVerifyUpdateBeforeExtraction</key><true/>
106
37
  ```
107
-
108
- Store each Sparkle key once, from the Mac that holds it in its login keychain:
109
-
110
- ```sh
111
- bunx @doguyilmaz/tapster init --sparkle <label> --account <keychain account>
38
+ project (push tag v1.2.3) hub: you/homebrew-tap
39
+ builds, attests, holds no keys runs tapster on a schedule or when rung
40
+ -> draft release + checksums.txt -> checks every file against the project's build
41
+ signs and notarizes the macOS code
42
+ publishes the release
43
+ writes the cask, the Scoop manifest and the apt and dnf repositories
112
44
  ```
113
45
 
114
- It reads the key without showing it, checks it against the public key pinned in `tapster.yml`, asks you to confirm an
115
- offline backup and stores it as the `SPARKLE_KEY_<LABEL>` secret. For a new app, `init --sparkle <label> --new` makes
116
- the key, keeps it in your login keychain where Sparkle's own tools find it and prints the public key for
117
- `SUPublicEDKey`. Apps that share a key share a label. Files that must
118
- stay in every release unchanged, such as a frozen feed for old builds, go under `carry` with their digest.
46
+ It publishes Go tools built with GoReleaser, command line tools written for Bun and Mac apps that update with Sparkle.
47
+ Users install them with Homebrew, Scoop, apt or dnf. When something needs you, such as a certificate that expires
48
+ soon, the hub opens an issue and closes it once all is well.
119
49
 
120
- ## Faster releases
50
+ ## Your keys stay in your accounts
121
51
 
122
- The hub checks for drafts every 10 minutes. To start it within a minute instead, deploy the doorbell, a small
123
- Cloudflare Worker on the free plan:
52
+ tapster has no server. Your Apple certificate, notary key and App key are secrets of your hub's `tapster` environment,
53
+ which only its `main` branch can open. Projects hold no signing keys. No one else, including tapster's author, ever
54
+ receives them. tapster's own code uses them only inside your hub's runs, at the commit your hub workflow pins. Read the
55
+ [security model](https://tapster.doguyilmaz.com/reference/security/).
124
56
 
125
- ```sh
126
- bunx @doguyilmaz/tapster init --doorbell
127
- ```
128
-
129
- It signs you in to Cloudflare with Wrangler, creates a second GitHub App that may only start the hub's workflow, deploys
130
- the Worker with that App's key and tells every project where the doorbell is. A project's release workflow then rings
131
- it after opening the draft: it sends a short-lived GitHub token that proves which repository and tag it comes from, and
132
- the Worker starts the hub. The Worker also starts the hub on the schedule's interval when no run started in that time,
133
- because GitHub runs schedules on a best effort basis. It turns the workflow back on if GitHub paused it for
134
- inactivity; a workflow you disabled stays off.
57
+ ## The Action
135
58
 
136
- ## apt and dnf
137
-
138
- Set `linux: true` on a command line tool with Linux builds and name a maintainer once:
59
+ You do not write the hub workflow yourself: the setup writes it and pins this Action by commit. If you added the Action
60
+ from the Marketplace first, run it once. With no `mode` it runs a guide: its run summary checks your repository and
61
+ shows the next step.
139
62
 
140
63
  ```yaml
141
- linux: { maintainer: "Your Name <you@example.com>" }
142
- packages:
143
- - name: aims
144
- linux: true
145
- ```
146
-
147
- Then make the signing key and turn on GitHub Pages for the hub:
148
-
149
- ```sh
150
- bunx @doguyilmaz/tapster init --linux
151
- ```
152
-
153
- The key also stays in your login keychain (or the Secret Service on Linux), because GitHub never gives secrets back.
154
- `init --rotate linux` makes a new one; the old key keeps signing next to it until `init --rotate linux --finish`, so
155
- apt and dnf users can fetch the new key first.
156
-
157
- After each release the hub builds a `.deb` and an `.rpm` per architecture from the published Linux archives. A second
158
- job, which holds the key, checks every package against those archives itself, signs the rpms and the repository
159
- metadata and publishes the site. The site's front page shows users the two commands to add the repository.
160
-
161
- ## Check the setup
162
-
163
- ```sh
164
- bunx @doguyilmaz/tapster doctor
64
+ on: workflow_dispatch
65
+ jobs:
66
+ guide:
67
+ runs-on: ubuntu-24.04
68
+ steps:
69
+ - uses: doguyilmaz/tapster@v1.1.0
165
70
  ```
166
71
 
167
- `doctor` runs in the hub clone. It reads the hub as it is on GitHub's `main` branch and checks every setting the hub's
168
- security depends on: the workflow against the template, the environment, the rulesets, the Actions policy, who else
169
- can push, the projects' protection and whether the hub ran in the last day. Each finding names the command that fixes
170
- it.
171
-
172
- A draft the hub will not publish turns the run red once and gets the reason at the top of its release notes, where the
173
- project's owner sees it.
174
-
175
- ## Security
176
-
177
- - **One place for credentials.** The Apple certificate, the notary key and the App key live only in the hub's
178
- `tapster` environment. Only workflows on `main` can open it. Projects hold nothing.
179
- - **A stolen App key is not enough.** The App can write to the projects, so every project lets only you create or move
180
- branches and tags. The hub signs a draft only when its tag exists and the draft and its files come from the
181
- project's own workflow. tapster runs only from the hub workflow on `main`, stops when the App is installed on the hub
182
- and stops when anyone but you changed `tapster.yml` or a workflow since your last push.
183
- - **Nothing printed.** tapster reads each credential once, registers it and every derived value with the runner's
184
- masking and removes it from the environment. On every change its CI runs each stage with known fake credentials:
185
- the success path, GitHub errors (404, 422, 5xx and dropped connections), a broken certificate and a rejected
186
- signature. It searches every log line for the fake values, in plain text and encoded. A second run uses them as real
187
- secrets and fails if a tapster step prints anything the runner had to mask.
188
- - **Short-lived access.** The hub reaches each project with an App token limited to that repository, revoked when the
189
- work is done. Checking attestations gets a token that can only read them.
190
- - **Only checked builds are signed.** Every file must match `checksums.txt`. Public projects must attest their
191
- archives in their own release workflow. The hub verifies that before signing and checks the files once more right
192
- before it publishes.
193
- - **Only tapster's code sits next to a writing token.** Signing jobs hold no attestation rights; a separate job attests.
194
- The hub runs no Homebrew; tapster's own CI checks the casks it renders with `brew style` and `brew audit`. The hub
195
- allows only GitHub's actions and tapster's, pinned by commit.
196
- - **Sparkle keys stay in the hub.** Only the step that signs the feed sees them. The key never reaches a command line
197
- or a file. The hub refuses a key whose public half differs from the one installed copies trust.
198
- - **Keys tapster makes are kept.** Sparkle and Linux keys that tapster creates are also saved in your keychain, where
199
- every app must ask before reading them.
200
- - **Packages are checked before they are signed.** The job that builds the Linux packages has no key. The job that signs
201
- them rebuilds what each one must contain from the release and refuses scripts, dependencies, extra files or changed
202
- files.
203
- - **The doorbell can only knock.** Its App may start the hub's workflow and nothing else. It accepts only GitHub's own
204
- tokens from your repositories, made for its address.
205
-
206
- ## Limits
207
-
208
- - tapster serves personal accounts, not organizations.
209
- - Signing macOS code needs macOS runners, which are free for public repositories. Runs that sign nothing for macOS use
210
- Ubuntu.
211
- - The hub publishes private projects too, but a cask, a Scoop manifest or an apt and dnf package can only point at a
212
- public project, because users download without a token.
213
- - Homebrew asks users to trust a tap before it loads casks from it (`brew trust you/tap`); the hub's README says so.
72
+ To move a hub to a newer release, see [Upgrade tapster](https://tapster.doguyilmaz.com/guides/upgrade/).
73
+
74
+ ## Docs
75
+
76
+ - [Tutorial](https://tapster.doguyilmaz.com/tutorial/before/): from an empty tap to an installed release
77
+ - Guides: [Set up from a terminal](https://tapster.doguyilmaz.com/guides/terminal/),
78
+ [GoReleaser](https://tapster.doguyilmaz.com/guides/goreleaser/),
79
+ [Bun](https://tapster.doguyilmaz.com/guides/bun/),
80
+ [Mac apps with Sparkle](https://tapster.doguyilmaz.com/guides/sparkle/),
81
+ [apt and dnf](https://tapster.doguyilmaz.com/guides/linux/),
82
+ [the doorbell](https://tapster.doguyilmaz.com/guides/doorbell/),
83
+ [workflow tags](https://tapster.doguyilmaz.com/guides/auto-tag/),
84
+ [Dependabot](https://tapster.doguyilmaz.com/guides/dependabot/),
85
+ [key rotation](https://tapster.doguyilmaz.com/guides/rotate/),
86
+ [upgrades](https://tapster.doguyilmaz.com/guides/upgrade/)
87
+ - Reference: [Commands](https://tapster.doguyilmaz.com/reference/commands/),
88
+ [tapster.yml](https://tapster.doguyilmaz.com/reference/config/),
89
+ [Security](https://tapster.doguyilmaz.com/reference/security/),
90
+ [Troubleshooting](https://tapster.doguyilmaz.com/reference/troubleshooting/)
91
+
92
+ The design documents are in [docs/superpowers/specs](docs/superpowers/specs).
214
93
 
215
94
  ## License
216
95