Skip to main content
Publishing takes a built facet to the registry. Sign in, build, publish. You need a facet project with a valid facet.json (see Create a Facet) and a registry account with a from agentfacets.io.

Authenticate

facet login verifies the token against the registry before saving it, so a typo fails now rather than at publish time. facet whoami prints your username, email, and tier.
In CI, skip facet login and set FACET_TOKEN. It takes precedence over the saved credentials file.

Build, then publish

facet build writes dist/<name>-<version>.facet. facet publish validates the manifest, finds that archive, re-verifies its integrity, and uploads it under the name and version embedded in the artifact. It publishes what is in dist/, which is why you build first.

When the build and source disagree

If dist/ was built from a different facet.json than the one on disk, publish detects the drift and asks what to do:
  • Identity drift: a different name or version, usually because you bumped the version without rebuilding. Build and publish current source, publish the existing artifact, or cancel.
  • Content drift: same name and version, different content. Rebuild and publish, or publish the existing artifact unchanged.
See drift semantics.
Without a terminal, both cases warn on stderr and ship the existing artifact. Run facet build and facet publish as separate commands in CI so a stale dist/ cannot publish silently.

Publish outcomes

A publish goes live, is queued for review (still a success, and it appears once approved), or is rejected because the version already exists. See publish outcomes.

Ship a new version

A published name and version pair is immutable, so every change ships as a new version:
If you forget to rebuild, publish catches the identity drift and offers to build for you.

Changing visibility

The private flag is manifest content, so changing it needs a new version:
Omitting private keeps a facet public. Who can see or download a private facet is enforced by the registry. See Private Facets for scopes and access.

Sign out

facet logout deletes the local credentials file. It makes no server call, so revoke tokens in the web UI.
If FACET_TOKEN is set, it keeps authenticating after logout. Run unset FACET_TOKEN to sign out of the current shell.
FACET_TOKEN and FACET_REGISTRY_URL are documented in the environment reference.