How to make a generator private
Change a generator's visibility on SKMTC Hub from the settings page or the API, and what changes for the people who install it.
When to use this
You published a generator to the hub and want to take it out of public view — it is internal to your organization, or it is not ready. A generator published to the registry is public until you change it.
Prerequisites
- Write access to the generator: you own the account, you own the org that owns it, or you were added as a writer. Org membership on its own gives read access only.
- For the API path, a personal access token with the
write:catalogscope, minted underSettings → Access tokenson the hub.
What changes when a generator is private
- The generator leaves search and public listings on the hub.
- The registry stops serving the package to anyone without read
access.
skmtc install,skmtc bundleanddeno addfail for those people. A bundle that was already built does not fetch from the registry, so it keeps running until it is rebuilt. - People with read access — the account's org members, collaborators, and you — see and install it as before.
- The change reaches the registry within about a minute.
Making a private generator public again reverses all of this.
From the hub
- Open the generator's Settings tab:
https://skmtc.dev/ACCOUNT/generators/GENERATOR/settings. The tab shows only if you have write access. - In the Danger zone, next to Change generator visibility, select Change visibility. The row states the current visibility.
- Read the consequences in the dialog, type the generator's full name
(
ACCOUNT/GENERATOR) in the confirmation field, and select I understand, change generator visibility. Submitting with the wrong name shows a message under the field and changes nothing.
The dialog closes and the row reads "This generator is currently private."
From the API
curl -X PATCH https://api.skmtc.dev/v1/generators/ACCOUNT/GENERATOR \
-H "Authorization: Bearer $SKMTC_HUB_TOKEN" \
-H "Content-Type: application/json" \
-d '{"visibility":"private"}'Replace the following:
ACCOUNT: the account that owns the generator.GENERATOR: the generator's slug.SKMTC_HUB_TOKEN: a personal access token withwrite:catalog.
The response is the updated generator. Check the two fields that matter:
{
"slug": "GENERATOR",
"visibility": "private",
"viewer": { "canRead": true, "canWrite": true, "canAdmin": true }
}viewer is your own effective access on the generator. To make it
public again, send {"visibility":"public"}.
Errors
| Status | Meaning |
|---|---|
401 | No token, or the token is not valid. |
403 | The token lacks write:catalog, or you do not have write access to this generator. |
404 | No generator with that account and slug on the hub, or you cannot read it. |
Verification
Read the generator without a token:
curl -s -o /dev/null -w '%{http_code}\n' \
https://api.skmtc.dev/v1/generators/ACCOUNT/GENERATORA private generator answers 404; a public one answers 200.