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.
facet login # choose "Paste a personal access token"facet whoami # confirm the identity
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.
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.
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.
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.
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.