@shaferllc/keel 0.83.5 → 0.83.7

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.
@@ -0,0 +1,180 @@
1
+ # Keel Cloud (deploy from MCP)
2
+
3
+ **Keel Cloud** hosts your Keel apps on `*.keeljs.cloud` — preview and production
4
+ Workers, D1, secrets vault, and full export (git + SQL). You build in your IDE
5
+ with an AI agent; the same `keel-mcp` binary that knows the framework also
6
+ **creates sites and deploys them** when you set a Cloud token.
7
+
8
+ | Host | Role |
9
+ |------|------|
10
+ | [app.keeljs.cloud](https://app.keeljs.cloud) | Control plane (dashboard + `/api/v1`) |
11
+ | `preview-{slug}.keeljs.cloud` | Preview Worker |
12
+ | `{slug}.keeljs.cloud` | Production Worker |
13
+ | [keeljs.com](https://keeljs.com) | Framework docs (this site) |
14
+
15
+ Private alpha: registration needs an invite code or allowlisted email. Free tier
16
+ is limited (typically one site); Pro adds more sites and custom domains.
17
+
18
+ > Prefer owning Cloudflare yourself? Use
19
+ > [From install to deploy](./from-install-to-deploy.md) §4 (`create-keeljs` +
20
+ > `wrangler deploy`). Cloud and self-host are **alternate** paths — don’t mix
21
+ > them for the same app.
22
+
23
+ ## Why deploy from MCP
24
+
25
+ Agents already use `keel-mcp` for docs and scaffolding. With a token they also
26
+ get `keel_cloud_*` tools against the control plane — no separate CLI, no
27
+ copy-pasting wrangler credentials into the agent. The loop is:
28
+
29
+ ```text
30
+ create_site → edit storage_path → set_secret → preview → publish (confirm)
31
+ ```
32
+
33
+ ## 1. Sign up and mint a token
34
+
35
+ 1. Open [app.keeljs.cloud](https://app.keeljs.cloud) and register (invite /
36
+ allowlist during alpha).
37
+ 2. Go to **`/tokens`** → create a personal access token.
38
+ 3. Copy the plaintext once — it looks like `keel_<selector>.<verifier>`.
39
+
40
+ The token binds to your **first team**. Switch teams in the dashboard before
41
+ minting if you need a different team context.
42
+
43
+ ## 2. Wire `keel-mcp` for Cloud
44
+
45
+ Same server as local docs/API — add env so Cloud tools register:
46
+
47
+ **Cursor / `.mcp.json` / Windsurf:**
48
+
49
+ ```json
50
+ {
51
+ "mcpServers": {
52
+ "keel": {
53
+ "command": "npx",
54
+ "args": ["-y", "keel-mcp"],
55
+ "env": {
56
+ "KEEL_CLOUD_TOKEN": "keel_….…",
57
+ "KEEL_CLOUD_URL": "https://app.keeljs.cloud"
58
+ }
59
+ }
60
+ }
61
+ }
62
+ ```
63
+
64
+ **Claude Code:**
65
+
66
+ ```bash
67
+ claude mcp add keel -e KEEL_CLOUD_TOKEN=keel_….… -e KEEL_CLOUD_URL=https://app.keeljs.cloud -- npx -y keel-mcp
68
+ ```
69
+
70
+ Reload the MCP client. Stderr should say `Cloud tools enabled`. Call
71
+ `keel_overview` — it lists the Cloud loop when a token is present.
72
+
73
+ Local-only (docs + scaffold, no deploy): omit the env vars.
74
+ [Building with AI](./ai.md) covers that surface.
75
+
76
+ ## 3. Deploy a site from the agent
77
+
78
+ Tell your agent something like: *“Create an app preset site named Acme on Keel
79
+ Cloud, then preview it.”* Or drive the tools yourself:
80
+
81
+ ### Create
82
+
83
+ ```text
84
+ keel_cloud_create_site { "name": "Acme", "preset": "app" }
85
+ ```
86
+
87
+ Presets: `minimal` | `api` | `app` | `saas` (same kits as
88
+ [`create-keeljs`](./starter-kits.md)).
89
+
90
+ Response includes `storage_path` (real Keel app on disk) and hostnames. Open that
91
+ path in your IDE and edit like any Keel project.
92
+
93
+ ### Secrets (optional, before deploy)
94
+
95
+ ```text
96
+ keel_cloud_set_secret { "site_id": 1, "key": "STRIPE_SECRET_KEY", "value": "sk_…" }
97
+ keel_cloud_list_secrets { "site_id": 1 } # keys only — values never returned
98
+ ```
99
+
100
+ Secrets are vaulted (not in git) and injected on the next preview/publish.
101
+
102
+ ### Preview (safe to repeat)
103
+
104
+ ```text
105
+ keel_cloud_preview { "site_id": 1 }
106
+ ```
107
+
108
+ Deploys the preview Worker → `preview-{slug}.keeljs.cloud`. Iterate freely.
109
+
110
+ ### Publish production (confirm required)
111
+
112
+ ```text
113
+ keel_cloud_publish { "site_id": 1, "confirm": true }
114
+ ```
115
+
116
+ Agents must get your explicit approval before `confirm: true`. Production lands
117
+ on `{slug}.keeljs.cloud`.
118
+
119
+ ### Check status
120
+
121
+ ```text
122
+ keel_cloud_get_site { "site_id": 1 }
123
+ keel_cloud_deploys { "site_id": 1 } # logs + preview/production history
124
+ keel_cloud_me # plan, site_limit, team
125
+ ```
126
+
127
+ ### Custom domain (Pro)
128
+
129
+ ```text
130
+ keel_cloud_set_custom_domain {
131
+ "site_id": 1,
132
+ "hostname": "app.example.com",
133
+ "attach": true
134
+ }
135
+ ```
136
+
137
+ Returns CNAME instructions (point at `{slug}.keeljs.cloud`). The customer zone
138
+ must live on the same Cloudflare account as Keel Cloud. Clear with
139
+ `keel_cloud_clear_custom_domain`.
140
+
141
+ ### Escape hatch
142
+
143
+ ```text
144
+ keel_cloud_export { "site_id": 1 }
145
+ keel_cloud_export_sql { "site_id": 1, "env": "production" }
146
+ ```
147
+
148
+ Always yours: clone `storage_path` / `git_url`, restore the `.sql` dump on a
149
+ self-hosted Keel app anytime.
150
+
151
+ ## Tool cheat sheet
152
+
153
+ | Tool | Deploy role |
154
+ |------|-------------|
155
+ | `keel_cloud_create_site` | Scaffold kit under Cloud storage |
156
+ | `keel_cloud_preview` | Deploy preview Worker |
157
+ | `keel_cloud_publish` | Deploy production (`confirm: true`) |
158
+ | `keel_cloud_set_secret` / `_list_secrets` / `_delete_secret` | Runtime env for Workers |
159
+ | `keel_cloud_set_custom_domain` / `_clear_custom_domain` | Pro hostname |
160
+ | `keel_cloud_deploys` / `_get_site` | Status and logs |
161
+ | `keel_cloud_billing` / `_checkout` / `_portal` | Plan / upgrade (owner) |
162
+ | `keel_cloud_export` / `_export_sql` | Leave with code + data |
163
+ | `keel_cloud_delete_site` / `_restore_site` | Soft-delete / restore |
164
+
165
+ Full API table and local-docs tools: [Building with AI](./ai.md).
166
+
167
+ ## Dashboard parity
168
+
169
+ Everything above is also available in the browser at
170
+ [app.keeljs.cloud](https://app.keeljs.cloud) (`/sites`, `/billing`, `/tokens`).
171
+ MCP is the agent-first path; the UI is the same control plane.
172
+
173
+ ## Related
174
+
175
+ - [From install to deploy](./from-install-to-deploy.md) — full journey including
176
+ self-hosted Cloudflare
177
+ - [Building with AI](./ai.md) — MCP docs + complete `keel_cloud_*` list
178
+ - [Starter kits](./starter-kits.md) — what each preset contains
179
+ - [Hosting](./hosting.md) — primitives Cloud uses under the hood
180
+ - [Gates](./gates.md) — invite / allowlist signup gating
@@ -5,7 +5,8 @@ npm create keeljs@latest my-app -- --preset saas
5
5
  ```
6
6
 
7
7
  Four curated applications. Each is a complete, working app — not a scaffold you have
8
- to finish.
8
+ to finish. For the full path from this command through Cloudflare or Keel Cloud,
9
+ see [From install to deploy](./from-install-to-deploy.md).
9
10
 
10
11
  | Preset | What you get |
11
12
  | --- | --- |