@easybits.cloud/cli 0.15.5 → 0.17.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 (3) hide show
  1. package/README.md +150 -13
  2. package/dist/index.js +2875 -266
  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,63 @@ 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
70
125
 
71
126
  # Databases
72
127
  easybits db ls
@@ -93,7 +148,7 @@ easybits agents set helper --prompt-file PROMPT.md [--prompt-mode append|replace
93
148
  easybits agents files ls|get|put|rm helper [path|local-files…] [--to DIR] [--out FILE]
94
149
  easybits agents skills ls|get|add|rm helper [slug…] [--dir FOLDER | --file SKILL.md] [--restart]
95
150
  easybits agents mcp get|set helper [--file servers.json|-] # set replaces the list and restarts
96
- easybits agents restart helper
151
+ easybits agents restart helper # restart its runtime (new session; skills and MCP load)
97
152
  easybits agents try helper "who are you?" # one full turn as text: verify what you set up
98
153
  easybits agents logs helper --since "10 min ago"
99
154
  easybits agents doctor helper # exits 1 on a problem; status "error" shows why it did not start
@@ -103,17 +158,65 @@ easybits apply ./helper --create --name helper-2 # a new agent from the folder
103
158
  easybits agents create --like helper --name helper-2 [--copy-files] --dry-run # clone its setup, never its env
104
159
  easybits agents create --from helper.json --name helper-3
105
160
 
161
+ # Fleet agents (one agent, many conversations: WhatsApp, WABA, Teams, web)
162
+ easybits fleet ls
163
+ easybits fleet get soporte # engine, model, effort, channels, prompt
164
+ easybits fleet capabilities soporte --json # engines, models, tool buckets, MCPs, skills, channels
165
+ easybits fleet configure soporte --prompt-file PROMPT.md --model claude-sonnet-5-5 --recycle
166
+ easybits fleet message soporte "¿qué horarios tienen?" --config-group web # prints the reply
167
+
106
168
  # Files, websites, account
107
169
  easybits files ls
108
170
  easybits files upload ./report.pdf
109
171
  easybits files upload ./logo.png --public # open CDN URL; private by default
110
172
  easybits files rm FILE_ID --yes
111
- easybits websites ls
173
+ easybits sites ls # your site-builder sites (/dash/sitios): kind, engine, URL
174
+ easybits sites create --prompt "Landing for my dental clinic" # web app (TanStack) in its own machine
175
+ easybits sites create --prompt "Task tracker with login" --stack next --json
176
+ easybits sites create --name "Promo" --kind static # CDN website instead of a machine
177
+ easybits sites theme get my-clinic # site by name or id
178
+ easybits sites theme set my-clinic --theme dracula # or --colors theme.json (every token)
179
+ easybits websites ls # every static website (also documents and agent-published pages)
112
180
  easybits websites create "My shop" --slug my-shop # slug optional
113
181
  easybits websites slug my-shop my-store # change it; the old URL 301s
182
+ easybits websites get my-store # slug or id: files, size, URL
183
+ easybits websites deploy my-store ./dist # upload a folder keeping its paths (--dry-run lists it)
184
+ easybits websites upload my-store ./hero.jpg --path img/hero.jpg
185
+ easybits websites files ls my-store # paths inside the site
186
+ easybits websites rm my-store # type the slug to confirm (--yes without a terminal)
114
187
  easybits providers # storage provider (Tigris by default)
115
188
  easybits usage
116
189
 
190
+ # Documents: pages of HTML you write (page = number 1… or id)
191
+ easybits documents ls --search quote
192
+ easybits documents create --name "ACME quote" --html cover.html --html prices.html
193
+ easybits documents create --name "Carousel" --format ig-feed # one blank 1080x1350 page
194
+ easybits documents get "ACME quote" # format, URL and pages
195
+ easybits documents pages ls "ACME quote"
196
+ easybits documents pages get "ACME quote" 2 --out prices.html
197
+ easybits documents pages set "ACME quote" 2 prices.html # - reads stdin
198
+ easybits documents add-page "ACME quote" annex.html --after 2
199
+ easybits documents rm-page "ACME quote" 3 --yes
200
+ easybits documents reorder "ACME quote" 1 3 2
201
+ easybits documents deploy "ACME quote" # public URL (+ PDF)
202
+ easybits documents export pdf "ACME quote" --out quote.pdf
203
+ easybits documents export png Carousel --out ./slides # one PNG per page, exact size
204
+ easybits documents rm "ACME quote" --yes
205
+
206
+ # Video: HTML + GSAP scenes with narration, rendered to MP4 (scene = number 1… or id)
207
+ easybits video projects create --name "Fall promo" --format square # portrait 1080x1920 by default
208
+ easybits video projects ls
209
+ easybits video projects get "Fall promo" # scenes, music, status, last MP4
210
+ easybits video scenes add "Fall promo" intro.html --timeline intro.js --narration "Fall is here"
211
+ easybits video scenes ls "Fall promo"
212
+ easybits video scenes set "Fall promo" 1 --duration 4 --voice ef_dora
213
+ easybits video scenes reorder "Fall promo" 2 1
214
+ easybits video scenes rm "Fall promo" 2 --yes
215
+ easybits video music set "Fall promo" https://cdn.example.com/bed.mp3 # none removes it
216
+ easybits video render "Fall promo" --wait --out promo.mp4 # without --wait: starts and returns
217
+ easybits video projects rm "Fall promo" --yes
218
+ easybits video ls # AI-generated clips
219
+
117
220
  # MCP, SSH, docs
118
221
  easybits whoami # account and where the credential comes from
119
222
  easybits doctor # Node, CLI version, credential, API; exits 1 on a problem
@@ -124,8 +227,8 @@ easybits docs cli # a docs section as markdown (--en for English)
124
227
  easybits docs --open # open the docs in your browser
125
228
  ```
126
229
 
127
- **Names or ids.** Wherever a command takes an agent, a sandbox/machine or a database, you can
128
- pass its name instead of the id (`easybits sb exec scratch -- ls`, `easybits domains ls shop`).
230
+ **Names or ids.** Wherever a command takes an agent, a sandbox/machine, a database, a site, a document or a video project, you can
231
+ pass its name instead of the id (`easybits sb exec scratch -- ls`, `easybits sb domains ls shop`).
129
232
  The match is exact and case-insensitive; if two share the name the CLI exits 2 and lists the ids.
130
233
 
131
234
  Shell completion: `source <(easybits completion zsh)` (or `bash`, `fish`).
@@ -135,15 +238,15 @@ Help and messages follow your locale (`LANG=es_*` → Spanish) or `--lang es|en`
135
238
  Every command has help with examples: `easybits <command> <subcommand> --help`
136
239
  (or `easybits help <command> <subcommand>`). A typo gets a "Did you mean" suggestion.
137
240
 
138
- **Destructive commands** (`db rm`, `agents destroy`, `sandboxes destroy`, `domains rm`,
139
- `files rm`) ask before acting in a terminal: `[y/N]`, or typing the name/id for
241
+ **Destructive commands** (every `rm` and `destroy`: `machines rm`, `db rm`, `agents destroy`,
242
+ `sandboxes destroy`, `domains rm`, `files rm`…) ask before acting in a terminal: `[y/N]`, or typing the name/id for
140
243
  irreversible ones (a database, an agent, a permanent sandbox). Without a terminal they
141
244
  never prompt — and neither do they with `--json`: pass `--yes` / `-y`, or they exit `2`.
142
245
 
143
246
  **Dry runs.** Writes that change an agent (`agents set`, `files put|rm`, `skills add|rm`,
144
247
  `mcp set`, `create`) take `--dry-run`: they print what would change and touch nothing.
145
248
 
146
- **Updates.** Once a day the CLI checks npm and, in a terminal, says on stderr when a newer
249
+ **Updates.** Every hour at most the CLI checks npm and, in a terminal, says on stderr when a newer
147
250
  version is out (never with `--json`). `EASYBITS_NO_UPDATE_CHECK=1` or `CI` turns it off.
148
251
 
149
252
  **Secrets** go in a dotenv file or on stdin, never in argv (visible in `ps` and shell
@@ -172,6 +275,40 @@ Host *.ghosty
172
275
 
173
276
  Full reference: https://www.easybits.cloud/docs#cli · https://www.easybits.cloud/en/docs/cli.md
174
277
 
278
+ ## Changes in 0.17.0
279
+
280
+ - `sites create --prompt … [--kind webapp|static] [--stack …] [--template …]` and
281
+ `sites theme get|set <site> [--theme <id> | --colors <file|->]`; a site goes by name or id.
282
+ Unknown stacks or templates are rejected before calling the API.
283
+ - Machines: `machines get|restart|tiers`, `machines runspec get|set` (merges; `--file` takes the
284
+ output of `runspec get --json`), `machines backups|backup`, `machines redeploy` (recovery and
285
+ resize: `--tier … --replace`) and `machines rm` (release). `launch --machine --tier` now points to
286
+ `machines redeploy`.
287
+ - `easybits secrets ls|set|rm`: your account vault (new REST `GET/POST /api/v2/secrets`,
288
+ `DELETE /api/v2/secrets/:name`). Values come from a dotenv file or stdin, never argv.
289
+ - Sandboxes: `files rm|mv|mkdir`, `bg start|ls|status|kill` (background processes) and
290
+ `git clone|status|commit|push|pull|checkout|log` (`--git-token '$secret:NAME'`).
291
+ - `easybits fleet ls|get|capabilities|configure|message`: fleet agents with your account credential.
292
+ - `easybits domains …` now manages your account's domains (`/api/v2/domains`); a sandbox's
293
+ domains moved to `sandboxes domains` (the old form still works and says so on stderr).
294
+ - `easybits web search|fetch|extract|extract-status|crawl`.
295
+ - `easybits webhooks ls|create|update|rm` and `easybits keys ls|create|revoke` (`keys create` prints
296
+ the key once). Creating a key now needs WRITE and can't grant more than your own key has.
297
+ - `easybits websites get|files ls|upload|deploy|rm` (`deploy` uploads a whole folder keeping paths).
298
+ - `easybits documents …`: ls, get, create (`--html` per page or a blank `--format`), pages
299
+ ls|get|set, add-page, rm-page, reorder, deploy, export pdf|png, rm. You write the HTML and set it;
300
+ no AI generate/refine from the CLI.
301
+ - `easybits video …`: projects ls|get|create|rm, scenes ls|add|set|rm|reorder, music set,
302
+ render (`--wait`, `--out`, `--timeout`) and ls.
303
+ - `init` defaults to `--app-dir /app`, like `machines launch` (it was `/srv/app`).
304
+ - The update notice checks npm at most once an hour (the docs said once a day).
305
+
306
+ ## Changes in 0.16.0
307
+
308
+ - `sites ls`: the sites of the site builder (/dash/sitios) — static sites and web apps,
309
+ with the engine that builds each one and its public URL (`--json` for agents). Different
310
+ from `websites ls`, which lists every static website of the account.
311
+
175
312
  ## Changes in 0.15.1
176
313
 
177
314
  - After a `--dry-run`, the last line is the real command (`To apply: …`); without a terminal it