|
| 1 | +--- |
| 2 | +summary: "CLI reference for `openclaw promos` (list and claim promotional model offers)" |
| 3 | +read_when: |
| 4 | + - You want to try a free promotional model offer from ClawHub |
| 5 | + - You are configuring a provider through a promotion instead of onboarding |
| 6 | +title: "Promos" |
| 7 | +--- |
| 8 | + |
| 9 | +# `openclaw promos` |
| 10 | + |
| 11 | +Discover and claim promotional model offers published on ClawHub. Claiming a |
| 12 | +promotion configures the provider (auth and plugin, when needed) and registers |
| 13 | +the promotion's models — without re-running onboarding and without changing |
| 14 | +your default model unless you say so. |
| 15 | + |
| 16 | +Related: |
| 17 | + |
| 18 | +- Default model and fallbacks: [Models](/cli/models) |
| 19 | +- Provider auth setup: [Getting started](/start/getting-started) |
| 20 | + |
| 21 | +## Commands |
| 22 | + |
| 23 | +```bash |
| 24 | +openclaw promos list |
| 25 | +openclaw promos claim <slug> |
| 26 | +openclaw promos claim <slug> --api-key <key> --set-default |
| 27 | +``` |
| 28 | + |
| 29 | +## `openclaw promos list` |
| 30 | + |
| 31 | +Lists promotions that are currently live, with their models, the suggested |
| 32 | +default, time remaining, and the exact claim command. `--json` prints the raw |
| 33 | +payload. |
| 34 | + |
| 35 | +## `openclaw promos claim <slug>` |
| 36 | + |
| 37 | +Claims a live promotion: |
| 38 | + |
| 39 | +1. Fetches the promotion from ClawHub and verifies it is inside its window. |
| 40 | +2. Validates the promotion's provider, auth choice, and declared plugin packages |
| 41 | + against your installed OpenClaw version. Unknown ids or package mismatches are |
| 42 | + refused — a promotion can never make the CLI run anything it does not already |
| 43 | + know how to do. |
| 44 | +3. Reuses your existing provider credentials when you have them. Otherwise it |
| 45 | + walks the provider's normal auth flow (printing the promotion's signup URL |
| 46 | + for a free key first). `--api-key <key>` completes API-key auth without |
| 47 | + prompts, matching the `openclaw onboard` non-interactive flags; to keep the |
| 48 | + key off the command line, export the provider's environment variable |
| 49 | + instead (for example `OPENROUTER_API_KEY`) — existing env credentials are |
| 50 | + detected automatically and no flag is needed. |
| 51 | +4. Registers the promotion's models with their aliases. Existing aliases are |
| 52 | + never overwritten. |
| 53 | +5. Offers to set the promotion's suggested model as your default — |
| 54 | + `--set-default` skips the question; otherwise nothing about your defaults |
| 55 | + changes. |
| 56 | + |
| 57 | +When the promotion's window ends, the provider stops serving the free models; |
| 58 | +your configuration and credentials are untouched. Switch back anytime with |
| 59 | +`openclaw models set <model>`. |
| 60 | + |
| 61 | +## Passive discovery in `models list` |
| 62 | + |
| 63 | +`openclaw models list` also surfaces promotions without you asking ClawHub |
| 64 | +directly: |
| 65 | + |
| 66 | +- Live offers whose models you have not configured appear in an |
| 67 | + "Available via promotion" group below the table, each with its claim |
| 68 | + command. |
| 69 | +- Models you registered through `promos claim` carry a `promo` tag, which |
| 70 | + flips to `promo ended` once the offer's window passes. |
| 71 | +- The first time a new offer is seen, a one-time notice points at |
| 72 | + `openclaw promos list`. Offers you have already listed or claimed are never |
| 73 | + announced again. |
| 74 | + |
| 75 | +This reads a locally cached copy of ClawHub's hosted promotions feed |
| 76 | +(normally refreshed once a day with a conditional request, or earlier when the |
| 77 | +cached snapshot expires; refresh failures are silently skipped). A stale |
| 78 | +refresh waits at most 2.5 seconds and never breaks the listing. `--json` and |
| 79 | +`--plain` output stay machine-clean: no promotion sections or notices. |
| 80 | +Claiming always revalidates against the live ClawHub API, so an offer withdrawn |
| 81 | +early is refused even while a cached copy still shows it. |
0 commit comments