@wix/himalaya-cli 0.1286.0 → 0.1288.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/cli.mjs +24 -19
  2. package/dist/preview-assets.generated.bin +0 -0
  3. package/guides/cms-collections.md +2 -2
  4. package/guides/creating-wix-sites.md +10 -5
  5. package/guides/getting-started.md +7 -3
  6. package/guides/headless-business-to-himi-app.md +1 -1
  7. package/guides/headless-loop.md +21 -4
  8. package/guides/himi-mcp.md +4 -1
  9. package/guides/himi-skill.md +7 -3
  10. package/guides/push-cli-onboarding.md +11 -2
  11. package/guides/qa-builds.md +1 -0
  12. package/guides/wix-business-context.md +1 -1
  13. package/guides/wix-site-http-functions.md +2 -2
  14. package/guides/wix-site-to-himi-app.md +4 -3
  15. package/package.json +2 -2
  16. package/templates/beauty-salon/README.md +1 -0
  17. package/templates/beauty-salon-owner/README.md +1 -0
  18. package/templates/branded-lite/README.md +1 -0
  19. package/templates/community-club/README.md +1 -0
  20. package/templates/community-club-owner/README.md +1 -0
  21. package/templates/events-meetups/README.md +1 -0
  22. package/templates/events-meetups-owner/README.md +1 -0
  23. package/templates/gym-fitness/README.md +1 -0
  24. package/templates/gym-fitness-owner/README.md +1 -0
  25. package/templates/himi-chat/README.md +1 -0
  26. package/templates/nonprofit-cause/README.md +1 -0
  27. package/templates/nonprofit-cause-owner/README.md +1 -0
  28. package/templates/owner-lite/README.md +1 -0
  29. package/templates/podcast-creator/README.md +1 -0
  30. package/templates/podcast-creator-owner/README.md +1 -0
  31. package/templates/portfolio-creative/README.md +1 -0
  32. package/templates/portfolio-creative-owner/README.md +1 -0
  33. package/templates/restaurant/README.md +1 -0
  34. package/templates/restaurant-owner/README.md +1 -0
  35. package/templates/retail-store/README.md +1 -0
  36. package/templates/retail-store-owner/README.md +1 -0
  37. package/templates/surface-showcase/README.md +1 -0
  38. package/templates/yoga-studio/README.md +1 -0
  39. package/templates/yoga-studio-owner/README.md +1 -0
package/dist/cli.mjs CHANGED
@@ -7528,6 +7528,7 @@ function buttonVariant(style) {
7528
7528
  var SYSTEM_FONT_FAMILY, TONAL_ELEVATION_ALPHA, BUTTON_MIN_HIT_TARGET, nonNegative, nonEmpty, own, COLOR_TOKEN_PROPS, TYPOGRAPHY_TOKEN_PROPS, BUTTON_VARIANTS;
7529
7529
  var init_tokens = __esm({
7530
7530
  "../../core/ts/src/tokens.ts"() {
7531
+ "use strict";
7531
7532
  SYSTEM_FONT_FAMILY = "$system";
7532
7533
  TONAL_ELEVATION_ALPHA = [0, 0.05, 0.08, 0.11, 0.12, 0.14];
7533
7534
  BUTTON_MIN_HIT_TARGET = 44;
@@ -21399,6 +21400,10 @@ var init_known = __esm({
21399
21400
  // HimalayaCoreHealth / :core-runtime-health when the release declares it, and the shell's boot
21400
21401
  // installs the store only when those modules are linked (`#if canImport` / Class.forName).
21401
21402
  godot: "needs the opt-in Godot SPM product linked into the shell",
21403
+ // Hand-wired like base44 and godot until the RFC 0044 Phase 2 follow-up moves it onto the generic
21404
+ // himalaya:modules:* blocks; a dist build cannot link the WebRTC engine, so it must not bake the
21405
+ // microphone permission over a core whose verbs answer `not_linked`.
21406
+ calls: "needs the opt-in HimalayaCoreCalls / :himalaya-core-calls WebRTC engine linked into the shell",
21402
21407
  wix_platform: "needs the shell's boot to configure it with a Wix API client and launch services",
21403
21408
  himi_apps: "is a multi-app host surface (Himi Player), not something one app's binary serves",
21404
21409
  // Both answer FOR an app id, which the shell's boot configures (`configure(appId:)`) before
@@ -147512,25 +147517,25 @@ var init_preview_assets_generated = __esm({
147512
147517
  "../../packages/serve/src/preview-assets.generated.ts"() {
147513
147518
  init_preview_assets_format();
147514
147519
  PREVIEW_ASSET_MANIFEST = [
147515
- { key: "assets/index-BynCGh_e.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1233760, sha256: "d40489dde38e381b7a12a15594e20b9d6ea29bff761fc9a2a7e9b3a6825a334d" },
147516
- { key: "assets/pdf-CSx9d6Ik.js", contentType: "application/javascript; charset=utf-8", offset: 1233768, length: 488199, sha256: "5b5ef5de3805f1f6b1684ff2d5b61a10c86846262a54e5ceaf5f0691327133f0" },
147517
- { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1721967, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
147518
- { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1722040, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
147519
- { key: "assets/pdfDocument-C0FckwGm.js", contentType: "application/javascript; charset=utf-8", offset: 3039074, length: 2858, sha256: "94229686063333a7b0508e04ed86204424990a1f9c009fdb38cc92a5470bd815" },
147520
- { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3041932, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
147521
- { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3046542, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
147522
- { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3535126, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
147523
- { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3626050, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
147524
- { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3717034, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
147525
- { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3808014, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
147526
- { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3898886, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
147527
- { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3989866, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
147528
- { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4098502, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
147529
- { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4207586, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
147530
- { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4316634, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
147531
- { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4424334, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
147532
- { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4512442, length: 4947, sha256: "aed86e7bc0cdd626f7b05cfb4e222718f755959af62153fa7fd8253337af3e8e" },
147533
- { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4517389, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
147520
+ { key: "assets/index-C1BOKgEl.js", contentType: "application/javascript; charset=utf-8", offset: 8, length: 1233862, sha256: "bf7973c8776a50b514dd47cb1ba0813658274f4604b74c29a666a13b63630fcb" },
147521
+ { key: "assets/pdf-nW54Zt8m.js", contentType: "application/javascript; charset=utf-8", offset: 1233870, length: 488199, sha256: "389f3ff819e70116c2f8a6e09a042a4548479b19b2c5b2f4641f697b5495dfe6" },
147522
+ { key: "assets/pdf.worker.min-BQa_JDET.js", contentType: "application/javascript; charset=utf-8", offset: 1722069, length: 73, sha256: "41bcfda4f3c8c0a81c785ea87c69afc8e7d0ed8c333324aee94c273d881bb6aa" },
147523
+ { key: "assets/pdf.worker.min-BmVo14Nb.mjs", contentType: "application/javascript; charset=utf-8", offset: 1722142, length: 1317034, sha256: "a33cfe728c584fdba4fcc1fd54bcdc2f9f2f13889ddbb5b2bd1d0f8cbe49b84e" },
147524
+ { key: "assets/pdfDocument-DC7vQpq0.js", contentType: "application/javascript; charset=utf-8", offset: 3039176, length: 2858, sha256: "0eed7fd01c84816ac91459f223f770c06e614d5bf00ecc15c2e75372074a794d" },
147525
+ { key: "fonts/Roboto-LICENSE.txt", contentType: "application/octet-stream", offset: 3042034, length: 4610, sha256: "994062dd7af4186a739de55dd9e151c63b6301f8e2cbafc608d35c2e87da0cd2" },
147526
+ { key: "fonts/Roboto-Variable.ttf", contentType: "font/ttf", offset: 3046644, length: 488584, sha256: "d7598e12c5dbef095ff8272cfc55da0250bd07fbdecbac8a530b9b277872a134" },
147527
+ { key: "fonts/WixMadeforDisplay-Bold.ttf", contentType: "font/ttf", offset: 3535228, length: 90924, sha256: "ec4c7d63772d980d6e147b2df6215fd2737e4b04cebe0cf7e11dc695fb63cdcf" },
147528
+ { key: "fonts/WixMadeforDisplay-ExtraBold.ttf", contentType: "font/ttf", offset: 3626152, length: 90984, sha256: "bf4c16a2774edd38a921edf3099469866cd74c094fd596f3fa4e81f54a04dfaa" },
147529
+ { key: "fonts/WixMadeforDisplay-Medium.ttf", contentType: "font/ttf", offset: 3717136, length: 90980, sha256: "368faca44fb9f7207e4af784e94750b1ee59c1098b8689e0f4a918926f244fb5" },
147530
+ { key: "fonts/WixMadeforDisplay-Regular.ttf", contentType: "font/ttf", offset: 3808116, length: 90872, sha256: "97ed8f1a6772abe26e3d8af5cecfc4b02faa94497d585b0398b5053b739a70c1" },
147531
+ { key: "fonts/WixMadeforDisplay-SemiBold.ttf", contentType: "font/ttf", offset: 3898988, length: 90980, sha256: "642feab8a48ddf6c7a89d7c2a7c0edfa0e6e773f671287e460e222703563191e" },
147532
+ { key: "fonts/WixMadeforText-Bold.ttf", contentType: "font/ttf", offset: 3989968, length: 108636, sha256: "37c179b4fefb63ea9637322b84583a2df53aa226c150294eea1675c14b1b8e29" },
147533
+ { key: "fonts/WixMadeforText-ExtraBold.ttf", contentType: "font/ttf", offset: 4098604, length: 109084, sha256: "62e2fe4718129f36ecdb0ae4de385bd6b81ecc876146447167c6c140fad699a9" },
147534
+ { key: "fonts/WixMadeforText-Medium.ttf", contentType: "font/ttf", offset: 4207688, length: 109048, sha256: "4ecf270136af928612c76fe4ebade91d8156975e5ea4c0cf9225501dd1788e02" },
147535
+ { key: "fonts/WixMadeforText-Regular.ttf", contentType: "font/ttf", offset: 4316736, length: 107700, sha256: "dee56f09fd3efc127c1ea95557edc74110c1460a46287da36e0af25efd341ef5" },
147536
+ { key: "fonts/WixMadeforText-SemiBold.ttf", contentType: "font/ttf", offset: 4424436, length: 88108, sha256: "dced97a77624bc5f8b1ae65850360908297f4588e09feb6f22792d29dc7e765b" },
147537
+ { key: "index.html", contentType: "text/html; charset=utf-8", offset: 4512544, length: 4947, sha256: "ba8ef2bfec69fc7aae1d8e26e0de3addd4ab818457dde425e7a07221667578aa" },
147538
+ { key: "t5-frame.html", contentType: "text/html; charset=utf-8", offset: 4517491, length: 17344, sha256: "d057298d75e7373e5e2c4d11b7d1bcbea88e03af555ba63d97641c78509c58e4" }
147534
147539
  ];
147535
147540
  }
147536
147541
  });
Binary file
@@ -356,7 +356,7 @@ before declaring it, rather than guessing; the scan will not invent one for you.
356
356
  `tooManyToCount`, one page is taken as the whole listing.
357
357
 
358
358
  **The scan is owner-scoped, and there is no tokenless alternative.** It needs
359
- `--site <msid>` (or `WIX_SITE_ID`) and owner auth via `wix token`, because enumerating
359
+ `--site <msid>` (or `WIX_SITE_ID`) and owner auth via `wix token` or `WIX_API_KEY`, because enumerating
360
360
  collections is `GET /data/v2/collections`, which requires the *Manage Data
361
361
  Collections* scope. A visitor/anonymous token can read the **items** of an
362
362
  `ANYONE`-read collection whose id you already have, but it can never list collections —
@@ -488,7 +488,7 @@ survive — you are not limited to strings.
488
488
  | `skipped: already has N items` | Seeding a non-empty collection. | Intended. Pass `--force` only if you really mean to add rows alongside existing content. |
489
489
  | Screen renders empty on the preview, no error | `readRole: "SITE_MEMBER"` on an app that boots as a visitor. | Use `readRole: "ANYONE"`, or gate the screen behind a login. `himi validate` warns about this. |
490
490
  | `no Wix site selected` | No `--site` and no `WIX_SITE_ID`. | Pass one. Never guessed — a wrong msid means writing into someone else's data. |
491
- | `could not run wix token --site …` | Wix CLI missing or not logged in. | `npm i -g @wix/cli && wix login`. `WIX_TEST_TOKEN` overrides for CI. |
491
+ | `could not run wix token --site …` | Wix CLI missing or not logged in. | `npm i -g @wix/cli && wix login` — or, on a server with no browser, `export WIX_API_KEY` (a Wix account API key with All permissions; no Wix CLI needed). |
492
492
  | Collection exists but the app shows nothing | The collection is empty, or `readRole` blocks the app's identity. | `himi cms query` shows `itemCount`; check the permissions table above. |
493
493
  | A member sees only the rows they created, not ones addressed to them | `readRole: "SITE_MEMBER_AUTHOR"` is the **author's** read; a counterparty is not the author. | Expected. Serve the pair through a server-side door — see [Member-private data](#member-private-data-needs-a-row-level-read). |
494
494
 
@@ -27,8 +27,8 @@ This is the whole design, and the reason there are two transports:
27
27
 
28
28
  | # | Call | Scope | Gives you |
29
29
  |---|---|---|---|
30
- | 1 | `POST /funnel/projects/v1/create` | **account** — `wix token`, no `--site` | `metaSiteId`, `siteId`, `templateId`, `apps[]` |
31
- | 2 | `POST /oauth-app/v1/oauth-apps` | **site** — `wix token --site <msid>` | `oAuthApp.id`, i.e. the headless `clientId` |
30
+ | 1 | `POST /funnel/projects/v1/create` | **account** — `wix token`, no `--site`; headless: `WIX_API_KEY` + `WIX_ACCOUNT_ID` | `metaSiteId`, `siteId`, `templateId`, `apps[]` |
31
+ | 2 | `POST /oauth-app/v1/oauth-apps` | **site** — `wix token --site <msid>`; headless: `WIX_API_KEY` | `oAuthApp.id`, i.e. the headless `clientId` |
32
32
 
33
33
  Step 1 has no site to be scoped to yet, so it needs the account identity
34
34
  (`tools/himi-cli/src/wix-account.ts`). Step 2 needs the msid from step 1, so it uses the
@@ -36,8 +36,9 @@ per-site owner transport (`tools/himi-cli/src/wix-owner.ts`).
36
36
 
37
37
  Verified: the plain account token is accepted on both `/funnel/projects/v1/create` and
38
38
  `POST /site-list/v2/sites/query` with **no** `wix-account-id` header and **no** API key.
39
- `WIX_API_KEY` + `WIX_ACCOUNT_ID` stay supported as a fallback for identities whose token
40
- lacks the permission — both halves must be present or the key path is ignored.
39
+ `WIX_API_KEY` + `WIX_ACCOUNT_ID` is the headless path (no `wix login`, no browser), and also
40
+ covers an identity whose token lacks the permission — both halves must be present or the key
41
+ path is ignored.
41
42
 
42
43
  On a server with no `wix login`, set both halves for step 1. Step 2 then reuses
43
44
  `WIX_API_KEY` alone with `wix-site-id`, so the whole command runs without a browser. See
@@ -341,9 +342,13 @@ client you can ship. This is the question the dashboard answers only by eye.
341
342
  ### Auth is SITE-scoped, and owner-only
342
343
 
343
344
  `wix token --site <msid>` (`ownerTransport`), not the account token step 1 uses: minting a
344
- client is an owner-of-that-site operation. `wix token --site` mints happily for a site the
345
+ client is an owner-of-that-site operation. With `WIX_API_KEY` set, the key replaces
346
+ `wix token --site` (sent with `wix-site-id`); the key needs **All permissions** — with only
347
+ "All site permissions" this API answered a bare 403 (verified 2026-10-11). `wix token --site` mints happily for a site the
345
348
  logged-in account does not own and the refusal only surfaces as a bare 403 here, so a
346
349
  401/403 is reported as owner scope by name, with the dashboard URL as the escape hatch.
350
+ Under `WIX_API_KEY` the error says so instead: there a 403 most often means the key lacks a
351
+ permission — grant it **All permissions** in the API Keys Manager before suspecting ownership.
347
352
 
348
353
  ### The route table (measured, 2026-09-10)
349
354
 
@@ -303,8 +303,9 @@ the complete decision order and examples.
303
303
  `/v1/telemetry/events`, `/v1/telemetry/logs`), and so does **`himi dist`**
304
304
  (a QA binary — see *Shipping* below), which you rarely need. Authenticate once with
305
305
  **`himi login --browser`**: it signs you in with your own Wix account and stores a scoped
306
- token, so nothing is ever hand-pasted. (`--wix` uses the machine's own Wix CLI credential
307
- instead — the mode a CI container can satisfy. Wix employees can use `--dpx`.)
306
+ token, so nothing is ever hand-pasted. (On a server or in CI, `--wix` presents a Wix account
307
+ API key from `WIX_API_KEY` instead — no browser, no Wix CLI; see `himi docs headless-loop`.
308
+ Wix employees can use `--dpx`.)
308
309
  Everything up to the push runs locally.
309
310
 
310
311
  ## Optional push notifications
@@ -325,7 +326,9 @@ himi notify status --content ./my-app --target wix --refresh --json
325
326
  ```
326
327
 
327
328
  **Browser login alone is not sufficient for site authorization today.** Setup and status
328
- also use the Wix CLI account credential; use the same customer account for both logins.
329
+ also use the Wix CLI account credential; use the same customer account for both logins. On a
330
+ server, `WIX_API_KEY` + `himi login --wix --target wix` covers setup and status with no browser;
331
+ `himi notify send` still needs `wix login`, because it reads members as a Wix user.
329
332
  The CLI verifies app ownership and site access. A new app can be claimed as part of confirmed
330
333
  setup. Existing public bindings are reused and the prompts collect missing values.
331
334
 
@@ -398,6 +401,7 @@ select the deployed customer target explicitly:
398
401
  ```sh
399
402
  himi login --browser --target wix
400
403
  wix login
404
+ # no browser? export WIX_API_KEY, then run himi login --wix --target wix instead of the two lines above
401
405
  himi dist --app <app> --release <release-id> --site <owned-site-id> \
402
406
  --platform ios,android --signing byo --android-signing qa-keystore --wait --target wix
403
407
  ```
@@ -81,7 +81,7 @@ for a reply that cannot arrive. The invoking brief plus the credentials already
81
81
  (dispatch comment, env, supplied brief), and what remains out of scope.
82
82
  - Do not infer extra side effects (promote live, `himi dist`, CMS writes) from a brief
83
83
  that only authorized plan + draft preview.
84
- - `himi login --wix` / env tokens replace `himi login --browser`. Never prompt.
84
+ - `WIX_API_KEY` + `himi login --wix --target wix` (or a `HIMI_CONTROL_TOKEN`) replace `himi login --browser`. Never prompt.
85
85
  - The customer-entry `skill.md` journey still applies; this paragraph is how its
86
86
  approval gates map when the "customer" is the dispatch, not a chat turn.
87
87
 
@@ -31,7 +31,8 @@ himi --version # MUST print a version (>= 0.200). A help banner = an ancient C
31
31
  > spelling — full mapping in `himi docs wix-api-usage`. That SDK install is **VPN-gated** — it
32
32
  > publishes only to the internal registry — while the CLI install above is not.
33
33
  > `push` / `promote` need a control token at runtime rather than a VPN: get one with
34
- > `himi login --browser --target wix` (step 5), no hand-pasted secret.
34
+ > `himi login --browser --target wix` (step 5), no hand-pasted secret — or, on a server with no
35
+ > browser, `WIX_API_KEY` + `himi login --wix --target wix`.
35
36
 
36
37
  ## 2. Scaffold + author
37
38
 
@@ -337,18 +338,34 @@ than silently passed. Full reference: `himi docs testing-himi-apps`.
337
338
 
338
339
  First time (or once your token expires), get a scoped token — **`himi login --browser`**
339
340
  signs you in with your own Wix account and stores it in `~/.himalaya/serve-targets.json`,
340
- so `push` / `promote` never need a hand-pasted secret. (`--wix` uses the machine's own Wix
341
- CLI credential, for a CI container with no browser; Wix employees can use `--dpx`.)
341
+ so `push` / `promote` never need a hand-pasted secret. (On a server or in CI with no browser,
342
+ export a Wix account API key as `WIX_API_KEY` and use `--wix` — no Wix CLI needed; see
343
+ *Headless* below. Wix employees can use `--dpx`.)
342
344
 
343
345
  ```sh
344
346
  himi login --browser --target wix # sign in with your Wix account; stores a scoped token
345
- # (himi logout clears it; --wix for a CI container)
347
+ # (himi logout clears it; --wix + WIX_API_KEY on a server)
346
348
  ```
347
349
 
348
350
  > Name the target: `--browser` pairs with `--target wix`. `himi push` already defaults to it,
349
351
  > but `promote` and the read-back commands below do not — pass it there too, or set it as your
350
352
  > default target. (Wix employees signing in with `--dpx` use `--target bo` instead.)
351
353
 
354
+ **Headless — a server, CI job or agent container with no browser.** Use a Wix account API key
355
+ (manage.wix.com/account/api-keys, created by the account owner; grant it **All permissions**):
356
+
357
+ ```sh
358
+ export WIX_API_KEY=IST.… # the key; site commands (cms, site client, data's Wix collections, …) use it directly
359
+ export WIX_ACCOUNT_ID=… # only for account calls: himi site list / site create
360
+ himi login --wix --target wix # presents the key, stores a short-lived control token
361
+ ```
362
+
363
+ No `wix login` or Wix CLI is needed — except for `himi notify send`, which reads site members
364
+ as a Wix user and so still needs `wix login`. Or skip the login entirely: set
365
+ `HIMI_CONTROL_TOKEN` to a control token minted elsewhere. (`himi data` resources declared
366
+ under `data.kv` are not Wix calls: they still need `HIMI_DATA_ADMIN_URL` and
367
+ `HIMI_DATA_ADMIN_TOKEN`.)
368
+
352
369
  ```sh
353
370
  himi push --draft # LINTS first, then publishes a DRAFT; prints web + agent-preview URLs
354
371
  himi push --draft --force # publish even if lint found errors
@@ -103,7 +103,10 @@ site's CMS, or create a Wix site. Those spend money, handle credentials, or chan
103
103
  see, so they stay commands a person runs. Publishing needs a sign-in first: `himi_login` opens the
104
104
  browser sign-in for the user, or run `himi login --browser` in a terminal. Either way the server
105
105
  never asks for or sees a credential — the browser hands a scoped token to a separate `himi login`
106
- process, which stores it on this machine. A tool input that starts with `-` is refused, so nothing
106
+ process, which stores it on this machine. On a server with no browser, `himi login --wix` is the
107
+ exception to that guarantee: the CLI reads a Wix account API key from `WIX_API_KEY` in its own
108
+ environment and sends it to the owner plane to mint the token, so keep that key a secret of the
109
+ job, not of the MCP client. A tool input that starts with `-` is refused, so nothing
107
110
  can be passed through to a flag no tool offers.
108
111
 
109
112
  ## See the app inside your IDE
@@ -326,8 +326,9 @@ the complete decision order and examples.
326
326
  `/v1/telemetry/events`, `/v1/telemetry/logs`), and so does **`himi dist`**
327
327
  (a QA binary — see *Shipping* below), which you rarely need. Authenticate once with
328
328
  **`himi login --browser`**: it signs you in with your own Wix account and stores a scoped
329
- token, so nothing is ever hand-pasted. (`--wix` uses the machine's own Wix CLI credential
330
- instead — the mode a CI container can satisfy. Wix employees can use `--dpx`.)
329
+ token, so nothing is ever hand-pasted. (On a server or in CI, `--wix` presents a Wix account
330
+ API key from `WIX_API_KEY` instead — no browser, no Wix CLI; see `himi docs headless-loop`.
331
+ Wix employees can use `--dpx`.)
331
332
  Everything up to the push runs locally.
332
333
 
333
334
  ## Optional push notifications
@@ -348,7 +349,9 @@ himi notify status --content ./my-app --target wix --refresh --json
348
349
  ```
349
350
 
350
351
  **Browser login alone is not sufficient for site authorization today.** Setup and status
351
- also use the Wix CLI account credential; use the same customer account for both logins.
352
+ also use the Wix CLI account credential; use the same customer account for both logins. On a
353
+ server, `WIX_API_KEY` + `himi login --wix --target wix` covers setup and status with no browser;
354
+ `himi notify send` still needs `wix login`, because it reads members as a Wix user.
352
355
  The CLI verifies app ownership and site access. A new app can be claimed as part of confirmed
353
356
  setup. Existing public bindings are reused and the prompts collect missing values.
354
357
 
@@ -421,6 +424,7 @@ select the deployed customer target explicitly:
421
424
  ```sh
422
425
  himi login --browser --target wix
423
426
  wix login
427
+ # no browser? export WIX_API_KEY, then run himi login --wix --target wix instead of the two lines above
424
428
  himi dist --app <app> --release <release-id> --site <owned-site-id> \
425
429
  --platform ios,android --signing byo --android-signing qa-keystore --wait --target wix
426
430
  ```
@@ -18,6 +18,11 @@ The existing server requires two different credentials on both setup and status:
18
18
  2. A Wix account credential obtained through the Wix CLI (`wix login`, then Himi
19
19
  invokes `wix token`). Use the same customer account as the Himi app owner.
20
20
 
21
+ On a server with no browser, a Wix account API key covers both for setup and status:
22
+ `export WIX_API_KEY=IST.…` then `himi login --wix --target wix` (see `himi docs headless-loop`).
23
+ `himi notify send` is the exception — it reads members as a Wix user, so it still needs
24
+ `wix login`.
25
+
21
26
  **Browser login alone is not sufficient for site authorization today.** The command
22
27
  reports `wix_account_token_required` before opening key files or making setup requests
23
28
  when the second credential is unavailable. It does not substitute an employee credential
@@ -205,6 +210,7 @@ Use the app owner's account for both logins and explicitly select the deployed c
205
210
  ```sh
206
211
  himi login --browser --target wix
207
212
  wix login
213
+ # no browser? export WIX_API_KEY, then run himi login --wix --target wix instead of the two lines above
208
214
  himi dist --app <app> --release <release-id> --site <owned-site-id> \
209
215
  --platform ios,android --signing byo --android-signing qa-keystore --wait --target wix
210
216
  ```
@@ -228,7 +234,8 @@ key files and no Wix internal tooling:
228
234
 
229
235
  ```sh
230
236
  himi login --browser --target wix
231
- wix login
237
+ # no browser? export WIX_API_KEY, then run himi login --wix --target wix instead of the line above
238
+ wix login # still required: notify send reads members as a Wix user
232
239
  himi notify send --provider ping --target wix --content ./liftgear \
233
240
  --member-email member@example.com --title 'Route check' --body 'Tap to open' \
234
241
  --link 'himalaya-LiftGear://screen/himi_product?id=<itemId>' --dry-run
@@ -239,7 +246,9 @@ himi notify send --provider ping --target wix --content ./liftgear \
239
246
 
240
247
  `--content` supplies the app and site (or pass `--app` and `--site`). Log in to both CLIs as
241
248
  the owner of the app and the site. Himi also mints a site token with `wix token --site`; the
242
- server uses it only to look up the member by login email on that one site.
249
+ server uses it only to look up the member by login email on that one site. That token must
250
+ belong to a Wix USER, so `notify send` needs `wix login` even when `WIX_API_KEY` is set —
251
+ an API key is an app identity and the member lookup refuses it.
243
252
 
244
253
  Before anything is sent, the server checks:
245
254
 
@@ -179,6 +179,7 @@ select the deployed customer target for the paired QA build:
179
179
  ```sh
180
180
  himi login --browser --target wix
181
181
  wix login
182
+ # no browser? export WIX_API_KEY, then run himi login --wix --target wix instead of the two lines above
182
183
  himi dist --app <app> --release <release-id> --site <owned-site-id> \
183
184
  --platform ios,android --signing byo --android-signing qa-keystore --wait --target wix
184
185
  ```
@@ -231,7 +231,7 @@ returns `{ ok: true, context: { schemaVersion: 1, mode: "read-only", ... } }`.
231
231
  It reuses the business-book readers for identity, sampled owner/visitor Stores,
232
232
  Bookings, Events and Blog access, CMS permissions (no item samples), and Velo backend
233
233
  source. A client id is optional; without it visitor reads are `skipped`. Owner auth
234
- uses a site-scoped `WIX_TEST_TOKEN` (also without `--site`) or `wix token --site` as usual. Missing auth and failed reads
234
+ uses `WIX_API_KEY` (headless), a site-scoped `WIX_TEST_TOKEN` (also without `--site`), or `wix token --site` as usual. Missing auth and failed reads
235
235
  remain explicit and must not be interpreted as an empty site.
236
236
 
237
237
  This mode needs no URL or Chromium and never crawls pages, downloads media, uploads
@@ -13,8 +13,8 @@ invokes).
13
13
 
14
14
  ## Commands
15
15
 
16
- Owner token: `WIX_TEST_TOKEN` or `wix token --site` (keep the first ASCII line
17
- only). Site: `--site <msid>` or `WIX_SITE_ID`.
16
+ Owner token: `WIX_API_KEY` (headless — no Wix CLI), `WIX_TEST_TOKEN`, or
17
+ `wix token --site` (keep the first ASCII line only). Site: `--site <msid>` or `WIX_SITE_ID`.
18
18
 
19
19
  ```sh
20
20
  himi site function list --site <msid>
@@ -31,7 +31,7 @@ Source wins on conflict: [RFC 0048](../core/schema/RFC/0048-wix-site-context.md)
31
31
  | Required | Optional |
32
32
  |---|---|
33
33
  | Headless OAuth **client id** registered **on that site** | MSID (`--site`) — implied by the visitor token if omitted |
34
- | Public **site URL** (`https://…`) | Owner token (`WIX_TEST_TOKEN` / `wix token --site`) — **required** if the site has custom forms / CMS / Velo |
34
+ | Public **site URL** (`https://…`) | Owner token (`WIX_API_KEY` / `WIX_TEST_TOKEN` / `wix token --site`) — **required** if the site has custom forms / CMS / Velo |
35
35
  | App name / folder | |
36
36
 
37
37
  `--apply` without a client id + site URL is a skin, not an integration.
@@ -59,7 +59,7 @@ topic. Upgrade, or run the in-repo CLI (`node --import tsx tools/himi-cli/src/cl
59
59
  from a Himalaya checkout). `node --import tsx` only resolves `tsx` from that
60
60
  checkout — do not `cd` to the app folder first.
61
61
 
62
- Owner token: `wix token -s <msid>` may append a Unicode “Update available”
62
+ Owner token: on a server, `export WIX_API_KEY` and skip the Wix CLI. Otherwise `wix token -s <msid>` may append a Unicode “Update available”
63
63
  banner. Keep **only the first ASCII line** (`head -1`) or HTTP headers throw
64
64
  `Cannot convert argument to a ByteString`.
65
65
 
@@ -236,7 +236,8 @@ himi promote --app <app> --release <id> --target wix # the one push printed; n
236
236
 
237
237
  Self-serve is the default: `himi login --browser --target wix` signs in with the customer's own
238
238
  Wix account and stores a scoped token, so `push` / `promote` need no VPN and no pasted secret
239
- (`--wix` reuses the machine's Wix CLI credential, for a container with no browser). Wix
239
+ (`--wix` presents `WIX_API_KEY` — a Wix account API key — for a server or container with no
240
+ browser; see `himi docs headless-loop`). Wix
240
241
  employees can sign in with `himi login --dpx` instead and then use `--target bo`, the in-house
241
242
  alternative that does need the corporate network.
242
243
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.1286.0",
3
+ "version": "0.1288.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -70,5 +70,5 @@
70
70
  "artifactId": "himalaya-cli"
71
71
  }
72
72
  },
73
- "falconPackageHash": "9bef92b32e5ba74fc5d57743ad239e87468d3bc9069c8a1f37ac0fe1"
73
+ "falconPackageHash": "bd42a46efc6acd928d281e34114e4264f6040b60689689d098b49ab3"
74
74
  }
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -32,6 +32,7 @@ An unset feed shows a setup message instead of another publisher's episodes:
32
32
  himi render <screenId> --tree # render a screen right here, no device needed
33
33
  himi test # exercise every action your screens declare
34
34
  himi login --browser --target wix # sign in with your Wix account (once)
35
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
35
36
  himi push --draft # publish a DRAFT release + get preview links
36
37
 
37
38
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -21,6 +21,7 @@ Private mode / On-device uses the `on_device_ai` capability (Foundation Models /
21
21
  himi render <screenId> --tree # render a screen right here, no device needed
22
22
  himi test # exercise every action your screens declare
23
23
  himi login --browser --target wix # sign in with your Wix account (once)
24
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
24
25
  himi push --draft # publish a DRAFT release + get preview links
25
26
 
26
27
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -12,6 +12,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
12
12
  himi render <screenId> --tree # render a screen right here, no device needed
13
13
  himi test # exercise every action your screens declare
14
14
  himi login --browser --target wix # sign in with your Wix account (once)
15
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
15
16
  himi push --draft # publish a DRAFT release + get preview links
16
17
 
17
18
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -34,6 +34,7 @@ An unset feed shows a setup message instead of another publisher's episodes:
34
34
  himi render <screenId> --tree # render a screen right here, no device needed
35
35
  himi test # exercise every action your screens declare
36
36
  himi login --browser --target wix # sign in with your Wix account (once)
37
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
37
38
  himi push --draft # publish a DRAFT release + get preview links
38
39
 
39
40
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -12,6 +12,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
12
12
  himi render <screenId> --tree # render a screen right here, no device needed
13
13
  himi test # exercise every action your screens declare
14
14
  himi login --browser --target wix # sign in with your Wix account (once)
15
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
15
16
  himi push --draft # publish a DRAFT release + get preview links
16
17
 
17
18
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -26,6 +26,7 @@ site: `himi docs branded-lite-site-binding`.
26
26
  himi render <screenId> --tree # render a screen right here, no device needed
27
27
  himi test # exercise every action your screens declare
28
28
  himi login --browser --target wix # sign in with your Wix account (once)
29
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
29
30
  himi push --draft # publish a DRAFT release + get preview links
30
31
 
31
32
  Build, validate, render and test run entirely on your machine. Only `login` and
@@ -14,6 +14,7 @@ identity and navigation in `config.ts`, look and feel in `tokens.json`.
14
14
  himi render <screenId> --tree # render a screen right here, no device needed
15
15
  himi test # exercise every action your screens declare
16
16
  himi login --browser --target wix # sign in with your Wix account (once)
17
+ # no browser? export WIX_API_KEY, then himi login --wix --target wix
17
18
  himi push --draft # publish a DRAFT release + get preview links
18
19
 
19
20
  Build, validate, render and test run entirely on your machine. Only `login` and