# Publish a Wallpaper

The publish command builds, encrypts, and uploads your wallpaper to the Fluxlay store, making it available for other users to install. If you only want to create a local build for your own testing, use the `build` command instead.

## Publish Command

<PackageManagerCommand type="exec" command="fluxlay publish" />

Or specify a directory:

<PackageManagerCommand type="exec" command="fluxlay publish ./my-wallpaper" />

## What Happens

1. Validates `fluxlay.yaml`.
2. Generates a random content encryption key.
3. Registers the wallpaper version with the API (returns a version ID and upload URL).
4. Builds the wallpaper (Vite for `kind: web`; copies the source file for `kind: video` / `image`).
5. Encrypts and packages the content.
6. Uploads the package to cloud storage.
7. Confirms the upload with the API.
8. If `description` is set in `fluxlay.yaml`, sends the manifest's `name` and `description` to the store so the listing matches your repository. A failure here doesn't roll back the publish — only the listing isn't refreshed.

## First Publish

On the first publish, the wallpaper is registered with the slug from `fluxlay.yaml`. Subsequent publishes create new versions under the same slug.

## Requirements

- You must be logged in (`fluxlay login`).
- A valid `fluxlay.yaml` with a unique `slug`.
- Onboarding must be completed on your account.
