@zerodeploy/cli 0.1.2 → 0.1.3

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 (3) hide show
  1. package/README.md +184 -16
  2. package/dist/cli.js +1344 -209
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -24,7 +24,7 @@ zerodeploy login
24
24
  zerodeploy org create "My Company"
25
25
 
26
26
  # 3. Create a site
27
- zerodeploy site create my-company "My Website" --subdomain my-website
27
+ zerodeploy site create my-company "My Website"
28
28
 
29
29
  # 4. Deploy your site
30
30
  zerodeploy deploy my-website --org my-company --dir ./dist
@@ -60,6 +60,17 @@ Display current logged-in user information.
60
60
  zerodeploy whoami
61
61
  ```
62
62
 
63
+ #### `zerodeploy usage`
64
+
65
+ Display current usage and plan limits with visual progress bars.
66
+
67
+ ```bash
68
+ zerodeploy usage
69
+ ```
70
+
71
+ **Options:**
72
+ - `--json` - Output as JSON for scripting
73
+
63
74
  ### Organizations
64
75
 
65
76
  #### `zerodeploy org list`
@@ -96,44 +107,93 @@ List all sites in an organization.
96
107
  zerodeploy site list my-company
97
108
  ```
98
109
 
99
- #### `zerodeploy site create <orgSlug> <name> --subdomain <subdomain>`
110
+ #### `zerodeploy site create <orgSlug> <name>`
100
111
 
101
- Create a new site in an organization.
112
+ Create a new site in an organization. The subdomain is auto-generated from the name.
102
113
 
103
114
  **Options:**
104
- - `--subdomain <subdomain>` - Subdomain for the site (required, globally unique)
105
115
  - `--repo <owner/repo>` - Link to a GitHub repository
106
116
 
107
117
  ```bash
108
118
  # Create a site
109
- zerodeploy site create my-company "My Website" --subdomain my-website
119
+ zerodeploy site create my-company "My Website"
110
120
 
111
121
  # Create a site linked to a GitHub repo
112
- zerodeploy site create my-company "Dashboard" --subdomain dashboard --repo company/monorepo
122
+ zerodeploy site create my-company "Dashboard" --repo company/monorepo
113
123
  ```
114
124
 
115
125
  Your site will be available at `https://<subdomain>.zerodeploy.app`
116
126
 
127
+ #### `zerodeploy site rename <siteSlug> <newName> --org <orgSlug>`
128
+
129
+ Rename a site's display name.
130
+
131
+ ```bash
132
+ zerodeploy site rename my-website "New Website Name" --org my-company
133
+ ```
134
+
135
+ Note: This changes the display name, not the slug or subdomain.
136
+
137
+ #### `zerodeploy site link <orgSlug> <siteSlug> <repo>`
138
+
139
+ Link a site to a GitHub repository.
140
+
141
+ ```bash
142
+ zerodeploy site link my-company dashboard company/monorepo
143
+ ```
144
+
145
+ #### `zerodeploy site unlink <orgSlug> <siteSlug>`
146
+
147
+ Remove the GitHub repository link from a site.
148
+
149
+ ```bash
150
+ zerodeploy site unlink my-company dashboard
151
+ ```
152
+
153
+ #### `zerodeploy site subdomain <orgSlug> <siteSlug> <subdomain>`
154
+
155
+ Update the subdomain for a site.
156
+
157
+ ```bash
158
+ zerodeploy site subdomain my-company my-website new-subdomain
159
+ ```
160
+
161
+ After updating, your site will be accessible at `https://new-subdomain.zerodeploy.app`.
162
+
117
163
  #### `zerodeploy site delete <siteSlug> --org <orgSlug>`
118
164
 
119
165
  Delete a site and all its deployments.
120
166
 
167
+ **Options:**
168
+ - `--force` - Skip confirmation prompt
169
+
121
170
  ```bash
122
171
  zerodeploy site delete my-website --org my-company
123
172
  ```
124
173
 
125
174
  ### Deployment
126
175
 
127
- #### `zerodeploy deploy <siteSlug> [options]`
176
+ #### `zerodeploy deploy [siteSlug] [options]`
128
177
 
129
- Deploy a directory to a site.
178
+ Deploy a directory to a site. If using a `zerodeploy.json` config file, site and org can be omitted.
130
179
 
131
180
  **Options:**
132
- - `--org <orgSlug>` - Organization slug (required)
181
+ - `--org <orgSlug>` - Organization slug (required, or from config)
133
182
  - `--dir <directory>` - Directory to deploy (default: auto-detect)
134
183
  - `--build` - Run build command before deploying
184
+ - `--no-build` - Skip build step
135
185
  - `--build-command <cmd>` - Custom build command
136
186
  - `--install` - Run install command before building
187
+ - `--preview` - Deploy without setting as current (preview only)
188
+ - `--no-verify` - Skip deployment verification
189
+ - `--no-auto-rollback` - Disable automatic rollback on verification failure
190
+
191
+ **CI/CD Options:**
192
+ - `--pr <number>` - PR number
193
+ - `--pr-title <title>` - PR title
194
+ - `--commit <sha>` - Commit SHA
195
+ - `--branch <branch>` - Branch name
196
+ - `--github-output` - Output deployment info in GitHub Actions format
137
197
 
138
198
  ```bash
139
199
  # Deploy specific directory
@@ -147,18 +207,34 @@ zerodeploy deploy my-website --org my-company --build
147
207
 
148
208
  # Install dependencies, build, and deploy
149
209
  zerodeploy deploy my-website --org my-company --install --build
210
+
211
+ # Deploy as preview (doesn't go live)
212
+ zerodeploy deploy my-website --org my-company --preview
150
213
  ```
151
214
 
152
215
  Output:
153
216
  ```
154
217
  Deploying: ./dist
155
218
  Found 42 files (1.2 MB)
156
- Uploading files...
157
- [100%] 42/42 files
219
+ Uploading...
220
+ Finalizing...
221
+ Verifying...
158
222
 
159
223
  Deployment successful!
160
- URL: https://my-website.zerodeploy.app
161
- Preview: https://019b1234-my-website.zerodeploy.app
224
+ URL: https://my-website.zerodeploy.app (verified)
225
+ Preview: https://abc12345-my-website.zerodeploy.app
226
+ ```
227
+
228
+ #### `zerodeploy deploy promote <deploymentId>`
229
+
230
+ Promote a preview deployment to production.
231
+
232
+ ```bash
233
+ # Promote using short ID (first 8 chars)
234
+ zerodeploy deploy promote abc12345
235
+
236
+ # Or use full deployment ID
237
+ zerodeploy deploy promote 019b1234-5678-90ab-cdef-1234567890ab
162
238
  ```
163
239
 
164
240
  #### `zerodeploy deployments list <siteSlug> --org <orgSlug>`
@@ -276,6 +352,83 @@ zerodeploy domain redirect example.com --org my-company --site my-website --mode
276
352
  4. Add the CNAME record to your DNS (shown in output)
277
353
  5. Your site is now live at `https://www.example.com`
278
354
 
355
+ ### Forms
356
+
357
+ Collect form submissions from your static sites without a backend. Get email notifications when forms are submitted.
358
+
359
+ #### `zerodeploy form list --org <org> --site <site>`
360
+
361
+ List all forms for a site with submission counts.
362
+
363
+ ```bash
364
+ zerodeploy form list --org my-company --site my-website
365
+ ```
366
+
367
+ #### `zerodeploy form export <name> --org <org> --site <site>`
368
+
369
+ Export form submissions as CSV.
370
+
371
+ **Options:**
372
+ - `-o, --output <file>` - Output file path (default: `<name>-submissions.csv`)
373
+
374
+ ```bash
375
+ # Export to default file
376
+ zerodeploy form export contact --org my-company --site my-website
377
+
378
+ # Export to custom file
379
+ zerodeploy form export contact --org my-company --site my-website -o leads.csv
380
+ ```
381
+
382
+ #### `zerodeploy form delete <name> --org <org> --site <site>`
383
+
384
+ Delete a form and all its submissions.
385
+
386
+ **Options:**
387
+ - `--force` - Skip confirmation prompt
388
+
389
+ ```bash
390
+ zerodeploy form delete contact --org my-company --site my-website
391
+ ```
392
+
393
+ #### `zerodeploy form notify <name> --org <org> --site <site>`
394
+
395
+ Configure email notifications for form submissions.
396
+
397
+ **Options:**
398
+ - `--email <email>` - Email address to receive notifications
399
+ - `--disable` - Disable email notifications
400
+
401
+ ```bash
402
+ # Enable notifications
403
+ zerodeploy form notify contact --org my-company --site my-website --email alerts@example.com
404
+
405
+ # Disable notifications
406
+ zerodeploy form notify contact --org my-company --site my-website --disable
407
+ ```
408
+
409
+ ### Account
410
+
411
+ #### `zerodeploy account email <email>`
412
+
413
+ Set or update your email address for deployment notifications.
414
+
415
+ ```bash
416
+ zerodeploy account email you@example.com
417
+ ```
418
+
419
+ #### `zerodeploy account delete`
420
+
421
+ Permanently delete your account and all associated data.
422
+
423
+ **Options:**
424
+ - `--force` - Skip confirmation prompts
425
+
426
+ ```bash
427
+ zerodeploy account delete
428
+ ```
429
+
430
+ **Warning:** This permanently deletes your account, all organizations, sites, deployments, and custom domains.
431
+
279
432
  ## Configuration File
280
433
 
281
434
  Create a `zerodeploy.json` in your project root:
@@ -284,21 +437,36 @@ Create a `zerodeploy.json` in your project root:
284
437
  zerodeploy init --org my-company --site my-website
285
438
  ```
286
439
 
287
- This creates:
440
+ The CLI auto-detects your framework and creates an appropriate config:
288
441
 
289
442
  ```json
290
443
  {
291
444
  "org": "my-company",
292
- "site": "my-website"
445
+ "site": "my-website",
446
+ "dir": "dist",
447
+ "build": "npm run build"
293
448
  }
294
449
  ```
295
450
 
451
+ **Config Options:**
452
+
453
+ | Field | Description |
454
+ |-------|-------------|
455
+ | `org` | Organization slug |
456
+ | `site` | Site slug |
457
+ | `dir` | Build output directory |
458
+ | `build` | Build command (used with `--build` flag) |
459
+ | `install` | Install command (used with `--install` flag) |
460
+
296
461
  Then deploy with just:
297
462
 
298
463
  ```bash
299
- zerodeploy deploy
464
+ zerodeploy deploy # deploy only
465
+ zerodeploy deploy --build # build + deploy
300
466
  ```
301
467
 
468
+ CLI flags always take precedence over config values.
469
+
302
470
  ## Deployed Sites
303
471
 
304
472
  ### URLs