@easybits.cloud/cli 0.16.0 → 0.17.1

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 +154 -12
  2. package/dist/index.js +2972 -276
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -44,6 +44,18 @@ easybits sandboxes files ls sb_abc123 /data/work
44
44
  easybits sandboxes files read sb_abc123 /etc/os-release
45
45
  easybits sandboxes files read sb_abc123 /data/app.db --out app.db # tope 8 MB: más grande sale con código 1 ("truncated")
46
46
  easybits sandboxes files write sb_abc123 /data/work/app.js ./app.js
47
+ easybits sandboxes files mkdir sb_abc123 /data/work/out
48
+ easybits sandboxes files mv sb_abc123 /data/work/a.txt /data/work/out/a.txt
49
+ easybits sandboxes files rm sb_abc123 /data/work/tmp -r --yes
50
+ easybits sandboxes bg start sb_abc123 --cwd /data/work -- npm run dev # prints an execId
51
+ easybits sandboxes bg ls sb_abc123
52
+ easybits sandboxes bg status sb_abc123 exec_123 # status, exit code, its stdout/stderr
53
+ easybits sandboxes bg kill sb_abc123 exec_123 # the whole process group
54
+ easybits sandboxes git clone sb_abc123 --repo https://github.com/you/app.git --dir /data/work/app --git-token '$secret:GITHUB_TOKEN'
55
+ easybits sandboxes git status sb_abc123 --dir /data/work/app
56
+ easybits sandboxes git commit sb_abc123 --dir /data/work/app --all -m "fix: checkout"
57
+ easybits sandboxes git push sb_abc123 --dir /data/work/app --git-token '$secret:GITHUB_TOKEN'
58
+ easybits sandboxes git pull|checkout|log sb_abc123 --dir /data/work/app …
47
59
  easybits sandboxes suspend sb_abc123
48
60
  easybits sandboxes resume sb_abc123
49
61
  easybits sandboxes snapshot sb_abc123 --name before-upgrade
@@ -53,20 +65,70 @@ easybits sandboxes destroy sb_abc123 --yes
53
65
  easybits machines ls
54
66
  easybits machines launch --repo https://github.com/you/shop.git --tier micro --domain shop.example.com
55
67
  easybits machines launch --machine shop --archive ./build.tgz --prebuilt -m v2 # redeploy
56
- easybits deploy sb_abc123 -m "v1.2" # = machines deploy
68
+ easybits machines deploy sb_abc123 -m "v1.2" # publish a release of the current code
69
+ easybits deploy sb_abc123 -m "v1.2" # same thing, shorter
57
70
  easybits machines releases sb_abc123 --limit 5
58
71
  easybits machines logs sb_abc123 --lines 100 --grep ERROR
59
72
  easybits machines rollback sb_abc123 rel_789
60
73
  easybits machines secrets ls sb_abc123
61
74
  easybits machines secrets set sb_abc123 --dotenv .env.production # - reads stdin
62
75
  easybits machines secrets unset sb_abc123 DATABASE_URL
76
+ easybits machines restart shop # restart the app with the current secrets/runspec (no build)
77
+ easybits machines get shop # tier, size, MXN/month, whether it sleeps
78
+ easybits machines tiers # the catalog: sizes and prices in MXN
79
+ easybits machines runspec get shop
80
+ easybits machines runspec set shop --data /app/data --start 'node server.js' --port 8080 # merges
81
+ easybits machines backups shop # daily data backups (7 days)
82
+ easybits machines backup shop # one now
83
+ easybits machines redeploy shop --tier focus --replace # resize: new machine from the newest release
84
+ easybits machines rm shop --yes # release: stops billing, last backup, destroys the box
63
85
  easybits init --port 3000 # GitHub Actions workflow that deploys on every push
64
86
 
65
- # Domains
66
- easybits domains ls sb_abc123
67
- easybits domains add sb_abc123 shop.example.com --port 3000
68
- easybits domains verify sb_abc123 shop.example.com
69
- easybits domains rm sb_abc123 shop.example.com --yes
87
+ # Domains of your account (serve your websites at <slug>.example.com and the root)
88
+ easybits domains ls
89
+ easybits domains add example.com # prints the DNS records to create
90
+ easybits domains verify example.com # TXT found → certificate issued
91
+ easybits domains dns-auto example.com # DNS in Mailmask? writes the records for you (--undo restores)
92
+ easybits domains apex example.com mi-tienda # serve a website at example.com and www (--clear removes it)
93
+ easybits domains rm example.com --yes
94
+
95
+ # Domains on a sandbox or machine port (was `easybits domains … <sandbox>`; that still works)
96
+ easybits sandboxes domains ls sb_abc123
97
+ easybits sandboxes domains add sb_abc123 shop.example.com --port 3000
98
+ easybits sandboxes domains verify sb_abc123 shop.example.com # exit 1 until it is ready
99
+ easybits sandboxes domains rm sb_abc123 shop.example.com --yes
100
+
101
+ # Web (metered in web queries; out of them → exit 1 with the link to buy a pack)
102
+ easybits web search dentista polanco --country mx # organic results: # / title / url
103
+ easybits web fetch https://example.com --markdown --main # body to stdout (--out page.md to save it)
104
+ easybits web extract google_maps --input '[{"keyword":"dentista Polanco CDMX","country":"MX"}]' --limit 50 --wait
105
+ easybits web extract instagram_profiles --url https://instagram.com/easybits # async: prints the jobId
106
+ easybits web extract-status j_abc123 # records as JSON lines once done
107
+ easybits web crawl https://docs.example.com --max-pages 5 --main
108
+
109
+ # Webhooks (HMAC-signed POSTs when your files, websites or forms change)
110
+ easybits webhooks ls
111
+ easybits webhooks create https://example.com/hook --event file.created --event form.submitted # secret shown ONCE
112
+ easybits webhooks update 66f0c2a1b2c3d4e5f6a7b8c9 --event file.created,file.deleted # --pause / --resume / --url
113
+ easybits webhooks rm 66f0c2a1b2c3d4e5f6a7b8c9 --yes
114
+
115
+ # API keys
116
+ easybits keys ls # prefix only
117
+ easybits keys create ci-deploy --scopes READ,WRITE --expires 2027-01-31 # prints the key ONCE
118
+ easybits keys revoke ci-deploy --yes # by id, name or prefix
119
+
120
+ # Account secrets vault (values never come back; used by name: $secret:NAME, --secret NAME)
121
+ easybits secrets ls
122
+ easybits secrets set --dotenv .env.production # KEY=VALUE lines; - reads stdin
123
+ printf '%s' "$TOKEN" | easybits secrets set GITHUB_TOKEN # one value from stdin
124
+ easybits secrets rm GITHUB_TOKEN --yes
125
+
126
+ # Platform crons (platform admins only; key with the ADMIN scope)
127
+ easybits crons ls
128
+ easybits crons runs backup-machines
129
+ easybits crons run purge-notifications
130
+ easybits crons pause check-hosting
131
+ easybits crons resume check-hosting
70
132
 
71
133
  # Databases
72
134
  easybits db ls
@@ -93,7 +155,7 @@ easybits agents set helper --prompt-file PROMPT.md [--prompt-mode append|replace
93
155
  easybits agents files ls|get|put|rm helper [path|local-files…] [--to DIR] [--out FILE]
94
156
  easybits agents skills ls|get|add|rm helper [slug…] [--dir FOLDER | --file SKILL.md] [--restart]
95
157
  easybits agents mcp get|set helper [--file servers.json|-] # set replaces the list and restarts
96
- easybits agents restart helper
158
+ easybits agents restart helper # restart its runtime (new session; skills and MCP load)
97
159
  easybits agents try helper "who are you?" # one full turn as text: verify what you set up
98
160
  easybits agents logs helper --since "10 min ago"
99
161
  easybits agents doctor helper # exits 1 on a problem; status "error" shows why it did not start
@@ -103,18 +165,65 @@ easybits apply ./helper --create --name helper-2 # a new agent from the folder
103
165
  easybits agents create --like helper --name helper-2 [--copy-files] --dry-run # clone its setup, never its env
104
166
  easybits agents create --from helper.json --name helper-3
105
167
 
168
+ # Fleet agents (one agent, many conversations: WhatsApp, WABA, Teams, web)
169
+ easybits fleet ls
170
+ easybits fleet get soporte # engine, model, effort, channels, prompt
171
+ easybits fleet capabilities soporte --json # engines, models, tool buckets, MCPs, skills, channels
172
+ easybits fleet configure soporte --prompt-file PROMPT.md --model claude-sonnet-5-5 --recycle
173
+ easybits fleet message soporte "¿qué horarios tienen?" --config-group web # prints the reply
174
+
106
175
  # Files, websites, account
107
176
  easybits files ls
108
177
  easybits files upload ./report.pdf
109
178
  easybits files upload ./logo.png --public # open CDN URL; private by default
110
179
  easybits files rm FILE_ID --yes
111
180
  easybits sites ls # your site-builder sites (/dash/sitios): kind, engine, URL
181
+ easybits sites create --prompt "Landing for my dental clinic" # web app (TanStack) in its own machine
182
+ easybits sites create --prompt "Task tracker with login" --stack next --json
183
+ easybits sites create --name "Promo" --kind static # CDN website instead of a machine
184
+ easybits sites theme get my-clinic # site by name or id
185
+ easybits sites theme set my-clinic --theme dracula # or --colors theme.json (every token)
112
186
  easybits websites ls # every static website (also documents and agent-published pages)
113
187
  easybits websites create "My shop" --slug my-shop # slug optional
114
188
  easybits websites slug my-shop my-store # change it; the old URL 301s
189
+ easybits websites get my-store # slug or id: files, size, URL
190
+ easybits websites deploy my-store ./dist # upload a folder keeping its paths (--dry-run lists it)
191
+ easybits websites upload my-store ./hero.jpg --path img/hero.jpg
192
+ easybits websites files ls my-store # paths inside the site
193
+ easybits websites rm my-store # type the slug to confirm (--yes without a terminal)
115
194
  easybits providers # storage provider (Tigris by default)
116
195
  easybits usage
117
196
 
197
+ # Documents: pages of HTML you write (page = number 1… or id)
198
+ easybits documents ls --search quote
199
+ easybits documents create --name "ACME quote" --html cover.html --html prices.html
200
+ easybits documents create --name "Carousel" --format ig-feed # one blank 1080x1350 page
201
+ easybits documents get "ACME quote" # format, URL and pages
202
+ easybits documents pages ls "ACME quote"
203
+ easybits documents pages get "ACME quote" 2 --out prices.html
204
+ easybits documents pages set "ACME quote" 2 prices.html # - reads stdin
205
+ easybits documents add-page "ACME quote" annex.html --after 2
206
+ easybits documents rm-page "ACME quote" 3 --yes
207
+ easybits documents reorder "ACME quote" 1 3 2
208
+ easybits documents deploy "ACME quote" # public URL (+ PDF)
209
+ easybits documents export pdf "ACME quote" --out quote.pdf
210
+ easybits documents export png Carousel --out ./slides # one PNG per page, exact size
211
+ easybits documents rm "ACME quote" --yes
212
+
213
+ # Video: HTML + GSAP scenes with narration, rendered to MP4 (scene = number 1… or id)
214
+ easybits video projects create --name "Fall promo" --format square # portrait 1080x1920 by default
215
+ easybits video projects ls
216
+ easybits video projects get "Fall promo" # scenes, music, status, last MP4
217
+ easybits video scenes add "Fall promo" intro.html --timeline intro.js --narration "Fall is here"
218
+ easybits video scenes ls "Fall promo"
219
+ easybits video scenes set "Fall promo" 1 --duration 4 --voice ef_dora
220
+ easybits video scenes reorder "Fall promo" 2 1
221
+ easybits video scenes rm "Fall promo" 2 --yes
222
+ easybits video music set "Fall promo" https://cdn.example.com/bed.mp3 # none removes it
223
+ easybits video render "Fall promo" --wait --out promo.mp4 # without --wait: starts and returns
224
+ easybits video projects rm "Fall promo" --yes
225
+ easybits video ls # AI-generated clips
226
+
118
227
  # MCP, SSH, docs
119
228
  easybits whoami # account and where the credential comes from
120
229
  easybits doctor # Node, CLI version, credential, API; exits 1 on a problem
@@ -125,8 +234,8 @@ easybits docs cli # a docs section as markdown (--en for English)
125
234
  easybits docs --open # open the docs in your browser
126
235
  ```
127
236
 
128
- **Names or ids.** Wherever a command takes an agent, a sandbox/machine or a database, you can
129
- pass its name instead of the id (`easybits sb exec scratch -- ls`, `easybits domains ls shop`).
237
+ **Names or ids.** Wherever a command takes an agent, a sandbox/machine, a database, a site, a document or a video project, you can
238
+ pass its name instead of the id (`easybits sb exec scratch -- ls`, `easybits sb domains ls shop`).
130
239
  The match is exact and case-insensitive; if two share the name the CLI exits 2 and lists the ids.
131
240
 
132
241
  Shell completion: `source <(easybits completion zsh)` (or `bash`, `fish`).
@@ -136,15 +245,15 @@ Help and messages follow your locale (`LANG=es_*` → Spanish) or `--lang es|en`
136
245
  Every command has help with examples: `easybits <command> <subcommand> --help`
137
246
  (or `easybits help <command> <subcommand>`). A typo gets a "Did you mean" suggestion.
138
247
 
139
- **Destructive commands** (`db rm`, `agents destroy`, `sandboxes destroy`, `domains rm`,
140
- `files rm`) ask before acting in a terminal: `[y/N]`, or typing the name/id for
248
+ **Destructive commands** (every `rm` and `destroy`: `machines rm`, `db rm`, `agents destroy`,
249
+ `sandboxes destroy`, `domains rm`, `files rm`…) ask before acting in a terminal: `[y/N]`, or typing the name/id for
141
250
  irreversible ones (a database, an agent, a permanent sandbox). Without a terminal they
142
251
  never prompt — and neither do they with `--json`: pass `--yes` / `-y`, or they exit `2`.
143
252
 
144
253
  **Dry runs.** Writes that change an agent (`agents set`, `files put|rm`, `skills add|rm`,
145
254
  `mcp set`, `create`) take `--dry-run`: they print what would change and touch nothing.
146
255
 
147
- **Updates.** Once a day the CLI checks npm and, in a terminal, says on stderr when a newer
256
+ **Updates.** Every hour at most the CLI checks npm and, in a terminal, says on stderr when a newer
148
257
  version is out (never with `--json`). `EASYBITS_NO_UPDATE_CHECK=1` or `CI` turns it off.
149
258
 
150
259
  **Secrets** go in a dotenv file or on stdin, never in argv (visible in `ps` and shell
@@ -173,6 +282,39 @@ Host *.ghosty
173
282
 
174
283
  Full reference: https://www.easybits.cloud/docs#cli · https://www.easybits.cloud/en/docs/cli.md
175
284
 
285
+ ## Changes in 0.17.1
286
+
287
+ - `easybits crons ls|runs|run|pause|resume`: EasyBits' scheduled jobs, the same as the
288
+ /dash/admin/crons panel (platform admins only; key with the ADMIN scope).
289
+
290
+ ## Changes in 0.17.0
291
+
292
+ - `sites create --prompt … [--kind webapp|static] [--stack …] [--template …]` and
293
+ `sites theme get|set <site> [--theme <id> | --colors <file|->]`; a site goes by name or id.
294
+ Unknown stacks or templates are rejected before calling the API.
295
+ - Machines: `machines get|restart|tiers`, `machines runspec get|set` (merges; `--file` takes the
296
+ output of `runspec get --json`), `machines backups|backup`, `machines redeploy` (recovery and
297
+ resize: `--tier … --replace`) and `machines rm` (release). `launch --machine --tier` now points to
298
+ `machines redeploy`.
299
+ - `easybits secrets ls|set|rm`: your account vault (new REST `GET/POST /api/v2/secrets`,
300
+ `DELETE /api/v2/secrets/:name`). Values come from a dotenv file or stdin, never argv.
301
+ - Sandboxes: `files rm|mv|mkdir`, `bg start|ls|status|kill` (background processes) and
302
+ `git clone|status|commit|push|pull|checkout|log` (`--git-token '$secret:NAME'`).
303
+ - `easybits fleet ls|get|capabilities|configure|message`: fleet agents with your account credential.
304
+ - `easybits domains …` now manages your account's domains (`/api/v2/domains`); a sandbox's
305
+ domains moved to `sandboxes domains` (the old form still works and says so on stderr).
306
+ - `easybits web search|fetch|extract|extract-status|crawl`.
307
+ - `easybits webhooks ls|create|update|rm` and `easybits keys ls|create|revoke` (`keys create` prints
308
+ the key once). Creating a key now needs WRITE and can't grant more than your own key has.
309
+ - `easybits websites get|files ls|upload|deploy|rm` (`deploy` uploads a whole folder keeping paths).
310
+ - `easybits documents …`: ls, get, create (`--html` per page or a blank `--format`), pages
311
+ ls|get|set, add-page, rm-page, reorder, deploy, export pdf|png, rm. You write the HTML and set it;
312
+ no AI generate/refine from the CLI.
313
+ - `easybits video …`: projects ls|get|create|rm, scenes ls|add|set|rm|reorder, music set,
314
+ render (`--wait`, `--out`, `--timeout`) and ls.
315
+ - `init` defaults to `--app-dir /app`, like `machines launch` (it was `/srv/app`).
316
+ - The update notice checks npm at most once an hour (the docs said once a day).
317
+
176
318
  ## Changes in 0.16.0
177
319
 
178
320
  - `sites ls`: the sites of the site builder (/dash/sitios) — static sites and web apps,