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

# Publish a package

> Share a component, system, or library through the registry

Once you've built something reusable, you can publish it to the NanoForge registry so other projects
can `nf install` it.

**1. Authenticate**

Log in with your API key. Authentication is global by default; use `-l` to scope it to the
current project only:

```bash theme={null}
nf login --api-key <your-api-key>
```

**2. Publish**

From the package directory:

```bash theme={null}
nf publish
```

**3. Remove a published package (if needed)**

`bash nf unpublish `

**4. Log out (optional)**

```bash theme={null}
nf logout
```

> [!NOTE]
>
> All four commands are documented together under [registry commands](https://docs.nanoforge.eu/docs/cli/commands/registry.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.