* feat: add openclaw promos CLI for ClawHub promotional model offers * fix: harden promos claim auth validation and sanitize remote promo text * fix: enforce promo window client-side and validate slug contract * fix: shell-safe model ref contract and explicit --api-key override * fix: hold promotion aliases to the models alias contract * docs: document argv-credential contract and env alternative for promos claim * fix: enforce provider plugin enablement on the credential-reuse claim path * fix: require plugin install before credential-reuse shortcut in promos claim * fix: run runtime plugin repair on promo defaults and harden identifier parsing * fix: distinct message for contract-invalid promo aliases * fix(cli): validate promotion plugin contracts * fix(cli): recheck promotion window before claim * feat(cli): surface ClawHub promotions in models list via the hosted feed Passive discovery for promotional model offers. A cadence-gated (24h), fail-silent conditional GET of ClawHub's immutable promotions feed snapshot (If-None-Match -> 304, short 2.5s timeout, unauthenticated so CDN caches stay unfragmented) is cached in two new shared-state-DB tables, fully separate from update_check_state. models list renders an 'Available via promotion' group for live offers whose models are not in the user's configured set (including the zero-row fresh-install path), tags claimed models promo / promo ended from provenance recorded at claim time, and prints a one-time notice per newly seen offer; promos list and claim mark offers as seen. Machine outputs stay clean, snapshot sequence is monotonic against stale edges, and claims still revalidate against the live API so the kill switch always wins. * style: satisfy lint on promotions feed additions no-useless-fallback-in-spread on the optional request headers and no-map-spread in claim-provenance row mapping. * fix(cli): harden promotions feed cache * fix(cli): honor live promotion validity
3.4 KiB
summary, read_when, title
| summary | read_when | title | ||
|---|---|---|---|---|
| CLI reference for `openclaw promos` (list and claim promotional model offers) |
|
Promos |
openclaw promos
Discover and claim promotional model offers published on ClawHub. Claiming a promotion configures the provider (auth and plugin, when needed) and registers the promotion's models — without re-running onboarding and without changing your default model unless you say so.
Related:
- Default model and fallbacks: Models
- Provider auth setup: Getting started
Commands
openclaw promos list
openclaw promos claim <slug>
openclaw promos claim <slug> --api-key <key> --set-default
openclaw promos list
Lists promotions that are currently live, with their models, the suggested
default, time remaining, and the exact claim command. --json prints the raw
payload.
openclaw promos claim <slug>
Claims a live promotion:
- Fetches the promotion from ClawHub and verifies it is inside its window.
- Validates the promotion's provider, auth choice, and declared plugin packages against your installed OpenClaw version. Unknown ids or package mismatches are refused — a promotion can never make the CLI run anything it does not already know how to do.
- Reuses your existing provider credentials when you have them. Otherwise it
walks the provider's normal auth flow (printing the promotion's signup URL
for a free key first).
--api-key <key>completes API-key auth without prompts, matching theopenclaw onboardnon-interactive flags; to keep the key off the command line, export the provider's environment variable instead (for exampleOPENROUTER_API_KEY) — existing env credentials are detected automatically and no flag is needed. - Registers the promotion's models with their aliases. Existing aliases are never overwritten.
- Offers to set the promotion's suggested model as your default —
--set-defaultskips the question; otherwise nothing about your defaults changes.
When the promotion's window ends, the provider stops serving the free models;
your configuration and credentials are untouched. Switch back anytime with
openclaw models set <model>.
Passive discovery in models list
openclaw models list also surfaces promotions without you asking ClawHub
directly:
- Live offers whose models you have not configured appear in an "Available via promotion" group below the table, each with its claim command.
- Models you registered through
promos claimcarry apromotag, which flips topromo endedonce the offer's window passes. - The first time a new offer is seen, a one-time notice points at
openclaw promos list. Offers you have already listed or claimed are never announced again.
This reads a locally cached copy of ClawHub's hosted promotions feed
(normally refreshed once a day with a conditional request, or earlier when the
cached snapshot expires; refresh failures are silently skipped). A stale
refresh waits at most 2.5 seconds and never breaks the listing. --json and
--plain output stay machine-clean: no promotion sections or notices.
Claiming always revalidates against the live ClawHub API, so an offer withdrawn
early is refused even while a cached copy still shows it.