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

# Publish a collection of demos

> Publish a GitHub-backed demo hub by merging changes to the branch Inkly watches.

Use a hosted hub when you want a live demo site that updates as your demo source changes.

There is no `inkly publish hub` command. A hub is published by connecting its GitHub repo to Inkly. After the repo is synced, every change merged to the connected branch, usually `main`, is automatically published or updated on the Inkly platform.

## How hub publishing works

<Steps>
  <Step title="Preview locally">
    Run the hub locally before you publish:

    ```bash theme={null}
    inkly dev
    ```
  </Step>

  <Step title="Commit the hub changes">
    Commit changes to `inkly.json`, `demos/<slug>/demo.config.json`, text content, and any assets you want GitHub to store.
  </Step>

  <Step title="Merge to the connected branch">
    Open a pull request and merge it to the branch Inkly watches.
  </Step>

  <Step title="Let Inkly update the hub">
    Inkly reads the updated branch and refreshes the hosted hub and demo URLs.
  </Step>
</Steps>

## What the CLI does

Use the CLI to create, preview, polish, and prepare the hub before you merge changes. The CLI is part of the publishing workflow, but it does not publish the live hub directly.

Use `inkly snapshot` only when you want a frozen link for one demo. A snapshot is separate from the live hosted hub.

## Assets

You do not need to run `inkly sync` to publish a hosted hub. Inkly can read committed local assets from the connected GitHub repo.

Run `inkly sync` only when you want to keep large screenshots, videos, or audio files out of GitHub. See [Sync assets](/cli/sync-assets).

## Set up hub sync

If your hub is not connected yet, connect it from the platform first. See [Set up Git sync](/platform/get-synced).

## Share or embed

After the hub is published, open it in the Inkly platform to copy the public sharing URL or fetch embed code. The public URL is available once the hub publishes, but the platform is where you get the ready-to-use inline embed and popup embed snippets.

See [Embed and share](/platform/embedding).

<Note>
  Use [Publish a demo](/cli/publish-a-snapshot) for a one-off share link. Use a GitHub-backed hosted hub when the collection should update from your source repo over time.
</Note>
