> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agentfacets.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Publish a Facet

> Build, update, and publish your facets

Publishing takes a built facet to the registry so others can install it. The flow is: sign in, build, publish. This guide covers each step and the outcomes you might hit.

**Before you start:** a facet project with a valid `facet.json` and at least one asset (see [Create Your First Facet](/guides/create-your-first-facet)), and a registry account with a <Tooltip headline="Personal access token (PAT)" tip={<span>A revocable credential you mint in the web UI and use to authenticate the CLI to the registry — via <code>facet login</code> or the <code>FACET_TOKEN</code> environment variable.</span>}>personal access token (PAT)</Tooltip>  -- sign up at [agentfacets.io](https://agentfacets.io) and create a PAT in your account settings.

> **Publishing is authenticated and version-immutable.** The steps:
>
> ```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
> # 1. Authenticate (token from the FACET_TOKEN env var is preferred in CI):
> export FACET_TOKEN=fct_pub_…          # or run `facet login` interactively
> facet whoami                          # confirm the identity
>
> # 2. Build the artifact, then publish it:
> facet build
> facet publish
> ```
>
> A published `(name, version)` is **immutable** — to ship changes, bump
> `version` in facet.json (e.g. `facet modify facet --version 1.2.0`),
> rebuild, and publish again. In non-interactive contexts, run
> `facet build && facet publish` as two commands so a stale `dist/` never
> ships silently.
>
> See [`facet publish`](/cli/authoring/publish),
> [`facet build`](/cli/authoring/build), and
> [`facet login`](/cli/login).
