Publishing to Cosmo
Ship a widget or wallpaper from the Publish page—GitHub automation or a ZIP upload.
Everything described here happens in the Cosmo web app on Publish (/publish). Sign in, open that page, and follow the labels on the form—you only need this doc when you want the full picture before you click around.
Widgets
You can ship a widget in one of two ways. Pick Widget at the top of the Publish page, then use either path below (the UI asks you to choose a repo or a ZIP, not both).
From GitHub (recommended for repos)
Use this when your widget source lives in GitHub and you want releases to drive publishing.
- Connect your GitHub account (Connect GitHub Account).
- Install the Cosmo Widget Publisher app on the repo you care about. If the repo list is empty, use Add Repositories (or the “adjust authorizations” link) to grant access.
- Pick the repository, then choose a Workflow Trigger:
- On Release (Recommended) — publish when you create a GitHub Release.
- On Version Bump — publish when a new version appears in your widget config.
- Manual Only — the workflow is installed; you run it from the Actions tab when you want.
- Submit the form. Cosmo adds the publish workflow and repository secret your CI run needs. After that, publishing is driven from GitHub (create a release or run the workflow), not by re-submitting this form.
Build commands
The Build Settings section on the page shows typical defaults (install/build/output paths). Today, wiring a repo through Publish does not send custom build commands to Cosmo—your repo’s generated workflow is what actually builds the widget. If you need a non-default layout, adjust the workflow in the repo after it is created.
From a ZIP (manual upload)
Use this when you already have a packaged widget archive (for example from your own build pipeline or the CLI).
- Under Or upload manually, choose Select Widget File (ZIP).
- Wait for the in-browser check to finish. You should see name, version, config schema, widget identity, and file checks (
index.htmlorassets/, optional README, preferences template, previews). - Fix any reported issues in the ZIP, then fill in Description and click Publish Widget.
Your ZIP must include a valid widget.config.json at the root of the packaged output (same layout you would ship to users). Required fields and optional id behavior are documented in Widget configuration. The archive must contain either index.html or a non-empty assets/ directory under that same root.
Publishing a new version of something you already shipped
Cosmo keeps one marketplace record per widget and attaches each upload as a version.
- GitHub-linked widgets: bump the version in your project and publish again using your chosen trigger (release, version bump, or manual workflow).
- ZIP widgets: scroll to My Published Widgets, click Upload New ZIP Version on the right row, then select your ZIP and publish. If your config uses an explicit widget
id, it must match the widget you are updating.
Wallpapers
Choose Wallpaper on Publish, then:
- Enter Title and Description.
- Choose an image or video (supported types are noted next to the file field).
- Click Publish.
Wallpapers do not use widget.config.json or the widget ZIP layout.
While you are still building locally
Developer Mode is for trying a widget on your machine. Publish is for versions you want in the marketplace. Stay in Developer Mode until you have a build you are ready to ship.