Command Palette

Search for a command to run...

Templates / Publishing Templates

Publish your template to the registry

Publishing makes your template available to anyone with access to the Anesis registry. You point the CLI at a GitHub URL, and the backend does the rest — it fetches the directory tree, reads your manifest, and creates the registry entry.

Requires anesis loginGitHub URLCommit SHA tracking

Authentication required

Both anesis template publish and anesis template update require a saved login session.

Run anesis login before publishing. The CLI sends your auth token with the request so the backend can associate the template with your account. See the Authentication page for details on the login flow.

Publishing a template

Pass the GitHub URL of your template directory. Both repo root and subdirectory URLs are accepted.

# Publish a template whose manifest is at the repo root
anesis template publish https://github.com/owner/repo

# Publish a template in a subdirectory
anesis template publish https://github.com/owner/repo/tree/main/templates/react-vite-ts

Visibility and private repositories

Publish and update both accept the same visibility flags.

  • --visibility <public|private|org-private> — defaults to public when omitted.
  • --credential-id <uuid> — required to read a private GitHub repository during publish.
  • --org-id <uuid> — legacy organization target, kept only for backwards compatibility.
# Publish a private repo, referencing a stored GitHub credential
anesis template publish https://github.com/owner/repo \
  --visibility private --credential-id <uuid>

Updating a template

When you push new changes to your GitHub repo, run update to sync the registry entry with the latest commit.

# Update an existing registry entry
anesis template update https://github.com/owner/repo/tree/main/templates/react-vite-ts
  • Use the same URL that was passed to anesis template publish.
  • The backend re-fetches the tree, re-reads the manifest, and updates the stored commit SHA.
  • Users who already have the old version cached will get the new version on their next anesis template install or anesis template update.

What happens when you publish

The CLI and backend work together to register your template.

  1. Validate the URL locally. The CLI checks that the URL is a valid github.com URL with at least an owner/repo path before sending anything to the server.
  2. Send to the backend. The CLI sends the URL to the backend as JSON. Your auth token is included in the request.
  3. Backend fetches the tree. The backend fetches the GitHub directory tree, reads anesis.template.json from the published path, and validates the manifest.
  4. Registry entry is created. The template is stored in the registry with its current commit SHA. The commit SHA is used by the CLI to skip re-downloads when nothing has changed.

GitHub URL rules

The CLI validates the URL locally before sending it to the backend.

  • The host must be github.com — other Git hosts are not supported.
  • The path must contain at least owner/repo.
  • To point at a subdirectory, use the GitHub /tree/<branch>/<path> URL format — the same URL shown in your browser when you navigate into a folder.
  • Both the repository root URL and subdirectory URLs are valid.