@clize/clize 0.32.0 → 0.33.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 (110) hide show
  1. package/README.md +19 -17
  2. package/dist/cli.js +484 -373
  3. package/dist/cli.js.map +1 -1
  4. package/dist/core/addresses.js +12 -11
  5. package/dist/core/addresses.js.map +1 -1
  6. package/dist/core/analytics.js +6 -5
  7. package/dist/core/analytics.js.map +1 -1
  8. package/dist/core/authz.js +6 -5
  9. package/dist/core/authz.js.map +1 -1
  10. package/dist/core/billing.js +83 -12
  11. package/dist/core/billing.js.map +1 -1
  12. package/dist/core/credentials.js +3 -1
  13. package/dist/core/credentials.js.map +1 -1
  14. package/dist/core/dns.js +3 -2
  15. package/dist/core/dns.js.map +1 -1
  16. package/dist/core/domain-health.js +74 -50
  17. package/dist/core/domain-health.js.map +1 -1
  18. package/dist/core/domains.js +74 -44
  19. package/dist/core/domains.js.map +1 -1
  20. package/dist/core/email-tx.js +8 -6
  21. package/dist/core/email-tx.js.map +1 -1
  22. package/dist/core/email.js +13 -12
  23. package/dist/core/email.js.map +1 -1
  24. package/dist/core/env-detect.js +7 -14
  25. package/dist/core/env-detect.js.map +1 -1
  26. package/dist/core/handle.js +33 -30
  27. package/dist/core/handle.js.map +1 -1
  28. package/dist/core/install.js +114 -56
  29. package/dist/core/install.js.map +1 -1
  30. package/dist/core/media.js +37 -36
  31. package/dist/core/media.js.map +1 -1
  32. package/dist/core/payments.js +5 -4
  33. package/dist/core/payments.js.map +1 -1
  34. package/dist/core/projects.js +38 -26
  35. package/dist/core/projects.js.map +1 -1
  36. package/dist/core/redirect.js +4 -3
  37. package/dist/core/redirect.js.map +1 -1
  38. package/dist/core/serve.js +2 -1
  39. package/dist/core/serve.js.map +1 -1
  40. package/dist/core/setup.js +11 -9
  41. package/dist/core/setup.js.map +1 -1
  42. package/dist/core/shop.js +17 -16
  43. package/dist/core/shop.js.map +1 -1
  44. package/dist/core/site.js +2 -1
  45. package/dist/core/site.js.map +1 -1
  46. package/dist/core/sites.js +41 -40
  47. package/dist/core/sites.js.map +1 -1
  48. package/dist/core/triage.js +39 -5
  49. package/dist/core/triage.js.map +1 -1
  50. package/dist/core/video.js +45 -43
  51. package/dist/core/video.js.map +1 -1
  52. package/dist/github.js +4 -3
  53. package/dist/github.js.map +1 -1
  54. package/dist/i18n/t.js +65 -0
  55. package/dist/i18n/t.js.map +1 -0
  56. package/dist/i18n/zh.js +1265 -0
  57. package/dist/i18n/zh.js.map +1 -0
  58. package/dist/index.js +61 -40
  59. package/dist/index.js.map +1 -1
  60. package/dist/lib/cloudflare.js +8 -7
  61. package/dist/lib/cloudflare.js.map +1 -1
  62. package/dist/lib/crypto.js +2 -1
  63. package/dist/lib/crypto.js.map +1 -1
  64. package/dist/lib/vercel.js +2 -1
  65. package/dist/lib/vercel.js.map +1 -1
  66. package/dist/lib/zone.js +2 -1
  67. package/dist/lib/zone.js.map +1 -1
  68. package/dist/mcp-profiles.js +5 -1
  69. package/dist/mcp-profiles.js.map +1 -1
  70. package/dist/providers/deploy/cloudflare.js +3 -2
  71. package/dist/providers/deploy/cloudflare.js.map +1 -1
  72. package/dist/providers/email/cloudflare-inbound.js +4 -3
  73. package/dist/providers/email/cloudflare-inbound.js.map +1 -1
  74. package/dist/providers/email/cloudflare-outbound.js +2 -1
  75. package/dist/providers/email/cloudflare-outbound.js.map +1 -1
  76. package/dist/providers/email/resend.js +3 -2
  77. package/dist/providers/email/resend.js.map +1 -1
  78. package/dist/providers/email/ses.js +3 -2
  79. package/dist/providers/email/ses.js.map +1 -1
  80. package/dist/providers/index.js +3 -2
  81. package/dist/providers/index.js.map +1 -1
  82. package/dist/providers/media/google.js +10 -9
  83. package/dist/providers/media/google.js.map +1 -1
  84. package/dist/providers/media/kie.js +12 -11
  85. package/dist/providers/media/kie.js.map +1 -1
  86. package/dist/providers/media/kunavo.js +10 -9
  87. package/dist/providers/media/kunavo.js.map +1 -1
  88. package/dist/providers/media/openai.js +5 -4
  89. package/dist/providers/media/openai.js.map +1 -1
  90. package/dist/providers/media/suno.js +7 -6
  91. package/dist/providers/media/suno.js.map +1 -1
  92. package/dist/providers/registrar/routing.js +2 -1
  93. package/dist/providers/registrar/routing.js.map +1 -1
  94. package/dist/providers/registrar/vercel.js +2 -1
  95. package/dist/providers/registrar/vercel.js.map +1 -1
  96. package/dist/providers/seo/dataforseo.js +5 -4
  97. package/dist/providers/seo/dataforseo.js.map +1 -1
  98. package/dist/providers/seo/gsc.js +5 -4
  99. package/dist/providers/seo/gsc.js.map +1 -1
  100. package/dist/remote.js +25 -22
  101. package/dist/remote.js.map +1 -1
  102. package/dist/selfcheck.js +23 -22
  103. package/dist/selfcheck.js.map +1 -1
  104. package/dist/state/file-store.js +17 -16
  105. package/dist/state/file-store.js.map +1 -1
  106. package/package.json +4 -3
  107. package/skills/clize/SKILL.md +171 -143
  108. package/skills/clize-seo/SKILL.md +2 -2
  109. package/skills/clize-site-build/SKILL.md +97 -41
  110. package/skills/clize-site-debug/SKILL.md +73 -45
package/README.md CHANGED
@@ -11,7 +11,7 @@ npm i -g @clize/clize
11
11
  clize install # wire clize into your coding agent (Claude Code / Codex)
12
12
  ```
13
13
 
14
- `clize install` is the step that makes your agent actually *reach for* clize — a binary on your `PATH` doesn't tell the agent it exists. By default it drops clize's skill (when to use it + the safety gates) into each agent's skills dir; the skill is lightweight — only its short description sits in context until something triggers it. It auto-detects Claude Code (`~/.claude`) and Codex (`~/.codex`); scope with `--claude` / `--codex`, preview with `--dry-run`. Add `--mcp` to also register the `clize-mcp` server — opt-in, because an MCP server's tool list stays in context every session.
14
+ `clize install` is the step that makes your agent actually *reach for* clize — a binary on your `PATH` doesn't tell the agent it exists. By default it drops clize's skill (when to use it + the safety gates) into each agent's skills dir; the skill is lightweight — only its short description sits in context until something triggers it. It auto-detects Claude Code (`~/.claude`), Codex (`~/.codex`) and Pi (`~/.pi`); Codex and Pi share the open `~/.agents/skills` directory, so any agent that reads it gets the skill too. Scope with `--claude` / `--codex` / `--pi`, preview with `--dry-run`. Add `--mcp` to also register the `clize-mcp` server — opt-in, because an MCP server's tool list stays in context every session.
15
15
 
16
16
  Update later with one command — pulls the latest release and refreshes the skill together:
17
17
 
@@ -21,18 +21,20 @@ clize update # or `clize update --check` to only check for a newer ve
21
21
 
22
22
  If something looks stale after an update, `clize doctor` prints what's installed vs what's actually running — CLI version (and the upgrade command that works for your install manager: volta / pnpm / asdf / …), skill drift, and control-plane reachability.
23
23
 
24
+ Output is English by default. `CLIZE_LANG=zh` (or a `zh*` system locale) switches the CLI, the MCP tool descriptions and the control plane's messages to Chinese; the dictionary lives in `src/i18n/zh.ts`.
25
+
24
26
  ## Quickstart (hosted)
25
27
 
26
28
  Log in and go — your agent never touches Cloudflare:
27
29
 
28
30
  ```bash
29
- clize login # browser authorize creates your account, saves a clize key
30
- clize check # connected to the hosted backend
31
- clize claim acme # free handle: acme.clize.app (site placeholder; add --email for support@)
32
- clize init --handle acme # bind this directory deploy / email send infer domain & from
33
- clize deploy ./site # ship a static site https://acme.clize.app
34
- clize status # who's waiting, this month's spend
35
- clize email inbox acme.clize.app # read what customers sent
31
+ clize login # browser authorize; the first login creates your account
32
+ clize claim acme --email # free identity: acme.clize.app + support@acme.clize.app
33
+ clize init --handle acme # bind this directory (deploy / send / inbox infer the rest)
34
+ clize email inbox --wait-for "verify" # the agent signs up somewhere with support@acme.clize.app and reads the code here
35
+ clize status # who is waiting (real people + codes only), this month's spend
36
+ clize email send --to a@b.com --subject "Re: …" --text "…" # draft only; add --confirm once you approve
37
+ clize deploy ./site # ship a static site → https://acme.clize.app
36
38
  ```
37
39
 
38
40
  ## Hosted — just log in
@@ -54,9 +56,9 @@ A few specifics worth knowing:
54
56
 
55
57
  | Area | Commands |
56
58
  |---|---|
57
- | **Claim** | `clize claim <slug>` — first-come, free `<slug>.clize.app` handle: name + site placeholder. A receiving `support@` is one more step (`--email` at claim time, or `clize email setup <handle>` later) — it is opt-in because each inbox costs 4 DNS records in the shared `clize.app` zone, and that zone is the whole platform's free-handle capacity |
59
+ | **Identity** | `clize claim <slug> --email` a first-come, free identity for your agent: `<slug>.clize.app` (site placeholder) plus a receiving `support@<slug>.clize.app`. Without `--email` you get the name and the site only (`clize email setup <handle>` opens the inbox later) — inbound is opt-in because each inbox costs 4 DNS records in the shared `clize.app` zone, and that zone is the whole platform's free-handle capacity |
58
60
  | **Domains** | `clize domain search / tlds / buy / import / list` |
59
- | **Email** | `clize email address add <addr>` opens a mailbox in one step (object + receiving) on any domain you own — as many per domain as you need (`ops@`, `sales@`, one per agent or per person); `--forward me@gmail.com` copies mail to a personal inbox, `--owner <member>` makes it someone's private mailbox. `support@<slug>.clize.app` is available on any claimed handle via `clize email setup <handle>` (or `clize claim <slug> --email`). Read with `inbox` (triaged: promos / notices / spam are filtered, `--all` shows everything) / `show` / `thread` / `search`, correct triage with `mark`, send with `send` (`--attach`). Mail is stored permanently and indexed. **Multi-user**: `clize members invite alice@corp.com --mailbox alice@<domain>` lets a person log in and use their own mailbox; owners/admins see every mailbox in the account. **Per-agent keys**: `clize email key create --scope read,send --address ops@<domain>`. See [MAILBOX.md](MAILBOX.md). |
61
+ | **Email** | The mailbox your agent signs up for services with and reads verification codes from (`clize email inbox [domain] --wait-for <text>` polls until the mail arrives), and the inbox real people write to. `clize email address add <addr>` opens a mailbox in one step (object + receiving) on any domain you own — as many per domain as you need (`ops@`, `sales@`, one per agent or per person); `--forward me@gmail.com` copies mail to a personal inbox, `--owner <member>` makes it someone's private mailbox. `support@<slug>.clize.app` is available on any claimed handle via `clize email setup <handle>` (or `clize claim <slug> --email`). Read with `inbox` (triaged: promos / notices / spam are filtered, `--all` shows everything) / `show` / `thread` / `search`, correct triage with `mark`, send with `send` (`--attach`). Mail is stored permanently and indexed. **Multi-user**: `clize members invite alice@corp.com --mailbox alice@<domain>` lets a person log in and use their own mailbox; owners/admins see every mailbox in the account. **Per-agent keys**: `clize email key create --scope read,send --address ops@<domain>`. See [MAILBOX.md](MAILBOX.md). |
60
62
  | **Send API** (server-callable) | `POST /v1/email/send` — transactional email from a long-running backend (fly.io / cron), Resend/Postmark-shaped, sending from a domain already in Clize (no second email vendor). Auth is a **scoped send key** (`clize_sk_…`: send-only, lockable to specific domains) — `clize email key create/list/revoke`. No `--confirm` (the human-review gate stays on interactive `email send`). Idempotency-Key, HMAC-signed delivery webhooks (bounce/complaint), RFC 8058 one-click unsubscribe + suppression lists (`email delivery-webhook / suppressions / messages`). See [EMAIL-API.md](EMAIL-API.md). |
61
63
  | **Media** | `clize gen image / video / music` — text→image (`gpt-image-2` / `nano-banana-2`, with `--ref` / `--mask` for image-to-image and inpainting), text/image→video (`veo`), text→music (`suno`); long tasks via `gen jobs / status`. Every spend is gated by `--confirm` (`gen budget` pre-approval for hosted is on the roadmap). Results land as local files, ready to `deploy` or `email --attach`. |
62
64
  | **Build · site** (hosted methods) | `clize build site start <brief>` — a hosted design system that briefs your agent on a cohesive style *before* it writes the site, so pages land with taste instead of AI-template sludge. Then `build site recommend / list / get / search / review` + `build site stack <stack>` for stack-specific guidance (React / Next / SwiftUI / …). The former `clize design …` spelling still works as a hidden alias. |
@@ -66,8 +68,8 @@ A few specifics worth knowing:
66
68
  | **Projects** | One project = one directory: `clize init --handle <slug>` binds it (the project record auto-creates on first `claim` / `buy`). `clize projects` to list / `new` / `move` / `rename` / `rm`; `-p <slug>` for one-off cross-project calls. Email send across projects is blocked (409); deploy instead **follows the target domain** — a stale `clize.json` checkout auto-routes to the domain's real project (and is written back to `clize.json`), and only an explicit mismatched `-p` is a 409. `status` / lists / spend scope to the checked-out project, and `status` flags any local↔remote drift. |
67
69
  | **Context** | `clize status [--assets]`, `clize context [address]` — rehydrate who's waiting + identity/knowledge at the start of a session |
68
70
  | **Billing** (hosted) | `clize balance` / `clize recharge --amount <usd>` — prepaid clize balance that domain/media spends draw from (Stripe top-up); `clize audit` for the spend log |
69
- | **Collect** (hosted) | `clize pay link --amount <usd>` — bill *your* customers, zero config: by default money lands in your clize balance (no fee — **balance funds are spendable on clize only, not withdrawable**). Connect your own Stripe once on the web dashboard (<https://clize.ai/app#/billing>) and payments switch to your Stripe automatically (`direct`, clize takes a fee pick this when you want cash out). Force a destination with `--mode direct\|balance`. `clize pay status` / `clize pay list`. |
70
- | **Shop & forms** (hosted) | `clize shop` — turn a deployed site into a storefront that takes real money: products live in a `_catalog.json` you deploy, carts check out via Stripe with **server-side pricing** against your deployed catalog (clients can't forge prices); one-time or subscriptions, shipping-address collection, `direct` or `balance` payout like `pay`. `clize shop status / orders / webhook` (orders proxy Stripeclize stores none). `clize data webhook` forwards form / waitlist submissions to your endpoint (clize doesn't store them). Inventory, refunds, tax stay with you + Stripe — clize is the shell and payment wiring, not a Shopify. |
71
+ | **Collect** (hosted) | `clize pay link --amount <usd>` — bill *your* customers, zero config: by default money lands in your clize balance (no fee — **balance funds are spendable on clize only, not withdrawable**). Direct payout to your own Stripe (`direct`, clize takes a fee) is **not yet enabled on the platform**; once it is, connecting Stripe on the web dashboard switches payments over automatically. Until then `--mode direct` is refused and every payment lands in your balance. `clize pay status` / `clize pay list`. |
72
+ | **Shop & forms** (hosted) | `clize shop` — turn a deployed site into a storefront that takes real money: products live in a `_catalog.json` you deploy, carts check out via Stripe with **server-side pricing** against your deployed catalog (clients can't forge prices); one-time or subscriptions, shipping-address collection, `direct` or `balance` payout like `pay`. clize holds the order layer — `clize shop orders / todo / fulfill / notify / refund / shipments / events / webhook` (paid sourced → shipped → delivered, 17TRACK tracking, buyer self-service at `/orders`) while the catalog ships with your site and stock, tax and shipping stay with you. `clize data webhook` forwards form / waitlist submissions to your endpoint (clize doesn't store them). clize is the shell, the order ledger and the payment wiring, not a Shopify. |
71
73
 
72
74
  Run `clize --help` for the full surface.
73
75
 
@@ -92,7 +94,7 @@ These gates run in plain text, so every spend and every outbound action is visib
92
94
 
93
95
  ## MCP
94
96
 
95
- A curated subset of the core — claim, domains & DNS, email, deploy, shop & forms, status/context, billing, collect (`pay`) — exposed as **29 MCP tools** for hosts that prefer structured tools over a shell. (Media generation and the `build` method packs stay CLI- and skill-driven, not MCP tools.) Opt-in (`clize install --mcp`), since an MCP server's tool list is a standing per-session context cost — the skill alone already lets the agent drive clize via the CLI. To register by hand:
97
+ A curated subset of the core — claim, domains & DNS, email, deploy, shop & forms, status/context, billing, collect (`pay`) — exposed as **32 MCP tools** for hosts that prefer structured tools over a shell. (Media generation and the `build` method packs stay CLI- and skill-driven, not MCP tools.) Opt-in (`clize install --mcp`), since an MCP server's tool list is a standing per-session context cost — the skill alone already lets the agent drive clize via the CLI. To register by hand:
96
98
 
97
99
  ```bash
98
100
  claude mcp add clize -- clize-mcp # Claude Code
@@ -103,19 +105,19 @@ Works in both modes — set `CLIZE_API_KEY` (and optionally `CLIZE_API_URL`) in
103
105
 
104
106
  ### One product line at a time — `clize-mcp --profile`
105
107
 
106
- All 29 tools sit in context every session, even when all you wanted was the inbox. `--profile <line>` starts the same server with only that line's tools **registered** — absent from `tools/list` rather than registered-then-hidden, so the ones you skip cost the host nothing:
108
+ All 32 tools sit in context every session, even when all you wanted was the inbox. `--profile <line>` starts the same server with only that line's tools **registered** — absent from `tools/list` rather than registered-then-hidden, so the ones you skip cost the host nothing:
107
109
 
108
110
  ```bash
109
- claude mcp add inbox -- clize-mcp --profile inbox # 10 tools instead of 29
111
+ claude mcp add inbox -- clize-mcp --profile inbox # 13 tools instead of 32
110
112
  ```
111
113
 
112
- A profile only subtracts: tool names, arguments and behaviour are identical across profiles, so switching one doesn't make the agent relearn the surface. `serverInfo.name` becomes `clize-<line>` so the host shows which line is connected. Without `--profile` nothing changes — all 29 tools, `serverInfo.name` = `clize`, which is what `clize install --mcp` still registers. An unknown value exits non-zero listing the valid ones instead of quietly serving the full set (a silent fallback would hand you 29 tools while you believed you had installed a subset).
114
+ A profile only subtracts: tool names, arguments and behaviour are identical across profiles, so switching one doesn't make the agent relearn the surface. `serverInfo.name` becomes `clize-<line>` so the host shows which line is connected. Without `--profile` nothing changes — all 32 tools, `serverInfo.name` = `clize`, which is what `clize install --mcp` still registers. An unknown value exits non-zero listing the valid ones instead of quietly serving the full set (a silent fallback would hand you 32 tools while you believed you had installed a subset).
113
115
 
114
116
  Each line is also its own npm package and MCP-registry entry, so it can be found as a product in its own right. They are metapackages around this same CLI, and the registry entries launch it with the matching profile:
115
117
 
116
118
  | Product line | `--profile` | Tools (each profile includes `status` / `balance` / `recharge`) | npm | MCP registry |
117
119
  |---|---|---|---|---|
118
- | **Agent Inbox** — a real inbox agents send from and receive into ([clize.ai/inbox/](https://clize.ai/inbox/)) | `inbox` | 10 — `claim`, `email setup / address add / inbox / thread / send`, `context` | `@clize/inbox` | `ai.clize/inbox` |
120
+ | **Agent Inbox** — a real inbox agents send from and receive into ([clize.ai/inbox/](https://clize.ai/inbox/)) | `inbox` | 13 — `claim`, `email setup / address add / inbox (with wait-for) / thread / search / show / mark / send`, `context` | `@clize/inbox` | `ai.clize/inbox` |
119
121
  | **Agent Storefront** — your agent runs a real store | `storefront` | 15 — `pay`, `shop status / orders / order / todo / fulfill / notify / refund / events / shipments / webhook`, `data webhook` | `@clize/storefront` | `ai.clize/storefront` |
120
122
  | **Sites by Clize** — a marketing site that actually ships | `sites` | 5 — `claim`, `deploy` | `@clize/sites` | `ai.clize/sites` |
121
123
  | **Agent Domains** — domains an agent can buy, point and monitor | `domains` | 9 — `domain search / buy / ns`, `dns list / set / rm` | `@clize/domains` | `ai.clize/domains` |