@vibiz/cli 0.3.10 → 0.3.14

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.
package/dist/vibiz.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  formatUsd,
12
12
  mergeEnvFile,
13
13
  oneKeyMessage
14
- } from "./chunk-DI7GYIZQ.js";
14
+ } from "./chunk-PU7FGYLR.js";
15
15
 
16
16
  // packages/cli/src/main.ts
17
17
  import { spawn } from "node:child_process";
@@ -232,7 +232,7 @@ var VibizApp = class _VibizApp {
232
232
  throw new VibizAppError(
233
233
  401,
234
234
  "unauthorized",
235
- "No app key. Set VIBIZ_APP_KEY (Vibiz puts it in your app\u2019s env), or pass { key }."
235
+ "No app key. Set VIBIZ_APP_KEY (thelastapi puts it in your app\u2019s env), or pass { key }."
236
236
  );
237
237
  }
238
238
  return key;
@@ -249,7 +249,7 @@ var VibizApp = class _VibizApp {
249
249
  throw new VibizAppError(
250
250
  400,
251
251
  "invalid_request",
252
- "The app key is a server secret: call Vibiz from your server, not the browser."
252
+ "The app key is a server secret: call thelastapi from your server, not the browser."
253
253
  );
254
254
  }
255
255
  const res = await (this.options.fetch ?? fetch)(`${this.url}/v1${path}`, {
@@ -276,7 +276,7 @@ var VibizApp = class _VibizApp {
276
276
  throw new VibizAppError(
277
277
  res.status,
278
278
  e?.code ?? "error",
279
- e?.message ?? `Vibiz answered ${res.status}.`,
279
+ e?.message ?? `thelastapi answered ${res.status}.`,
280
280
  e?.details
281
281
  );
282
282
  }
@@ -594,7 +594,7 @@ var STATUS = {
594
594
  low: "low balance",
595
595
  payment_required: "out of credits: paid calls are refused",
596
596
  past_due: "out of credits for a week: deploys and new resources are paused",
597
- exempt: "covered by Vibiz"
597
+ exempt: "covered by thelastapi"
598
598
  };
599
599
  var KIND = {
600
600
  trial: "Trial credit",
@@ -617,7 +617,7 @@ function formatEntry(e) {
617
617
  }
618
618
  function formatBilling(b, history) {
619
619
  const lines = [
620
- b.mode === "exempt" ? "Billing Vibiz covers this account\u2019s usage" : `Balance ${dollars(b.balance_cents)} (${STATUS[b.status]})`
620
+ b.mode === "exempt" ? "Billing thelastapi covers this account\u2019s usage" : `Balance ${dollars(b.balance_cents)} (${STATUS[b.status]})`
621
621
  ];
622
622
  if (b.pauses_at && b.status === "payment_required") {
623
623
  lines.push(` deploys pause on ${b.pauses_at.slice(0, 10)} unless credits are added`);
@@ -979,9 +979,9 @@ var DNS_RECORDS_USAGE = [
979
979
  " vibiz domains records remove <domain> <id> [--force]"
980
980
  ].join("\n");
981
981
  var MANAGED_LABEL = {
982
- hosting: "managed by Vibiz: hosting",
983
- email: "managed by Vibiz: email",
984
- default: "managed by Vibiz: DNS default"
982
+ hosting: "managed by thelastapi: hosting",
983
+ email: "managed by thelastapi: email",
984
+ default: "managed by thelastapi: DNS default"
985
985
  };
986
986
  function recordLine(r) {
987
987
  const value = r.type === "TXT" ? JSON.stringify(r.value) : r.value;
@@ -1044,7 +1044,7 @@ async function dnsRecordsCommand(io, vibiz2, flags, args) {
1044
1044
  io.log(`Add one: vibiz domains records add ${list2.domain} <TYPE> <name> <value>`);
1045
1045
  if (list2.data.some((r) => r.managed)) {
1046
1046
  io.log(
1047
- "Leave the managed ones: Vibiz keeps them for hosting, email and HTTPS (removing one needs --force)."
1047
+ "Leave the managed ones: thelastapi keeps them for hosting, email and HTTPS (removing one needs --force)."
1048
1048
  );
1049
1049
  }
1050
1050
  io.log(`In the console: ${list2.console_url}`);
@@ -1645,7 +1645,7 @@ async function exportCommand(io, flags) {
1645
1645
  if (envPath) io.log(` ${envPath} the secret values (mode 600)`);
1646
1646
  for (const w of done.warnings) io.log(` ! ${w}`);
1647
1647
  io.log(
1648
- zipKind ? " Start with VIBIZ-EXPORT.md in the zip: running it anywhere, keeping Vibiz with one key, or moving everything." : ' Restore the database with: gunzip -c <file>.sql.gz | psql "$DATABASE_URL"'
1648
+ zipKind ? " Start with VIBIZ-EXPORT.md in the zip: running it anywhere, keeping thelastapi with one key, or moving everything." : ' Restore the database with: gunzip -c <file>.sql.gz | psql "$DATABASE_URL"'
1649
1649
  );
1650
1650
  if (!flags.secrets) {
1651
1651
  io.log(
@@ -1673,7 +1673,7 @@ var UNTRUSTED_END = "\u2500\u2500\u2500\u2500\u2500 end of external email conten
1673
1673
  var list = (v) => (v ?? "").split(",").map((x) => x.trim()).filter(Boolean);
1674
1674
  var when = (iso) => iso.slice(0, 16).replace("T", " ");
1675
1675
  function printDomain(io, d) {
1676
- io.log(`${d.domain} ${d.status}${d.managed_dns ? " (records set by Vibiz)" : ""}`);
1676
+ io.log(`${d.domain} ${d.status}${d.managed_dns ? " (records set by thelastapi)" : ""}`);
1677
1677
  for (const r of d.records) {
1678
1678
  const mark = r.status === "ok" ? "\u2713" : r.status === "unknown" ? "\xB7" : "\u2717";
1679
1679
  io.log(
@@ -2612,7 +2612,7 @@ async function skillsList(io, api, opts) {
2612
2612
  return;
2613
2613
  }
2614
2614
  io.log(
2615
- `Vibiz skills for ${agent === "claude" ? "Claude Code" : agent === "codex" ? "Codex" : "Cursor"}:`
2615
+ `thelastapi skills for ${agent === "claude" ? "Claude Code" : agent === "codex" ? "Codex" : "Cursor"}:`
2616
2616
  );
2617
2617
  for (const r of rows) {
2618
2618
  io.log(` ${r.installed ? "\u25CF" : "\u25CB"} ${r.name.padEnd(18)} ${r.installed ?? "not installed"}`);
@@ -3225,7 +3225,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3225
3225
  key) into .env.development.local
3226
3226
  vibiz dev -- <command\u2026> run a command with the development env, no file
3227
3227
  vibiz env [--write <file>] the PRODUCTION env (full-access keys only), to paste into
3228
- a host outside Vibiz; agents use \`vibiz dev\`
3228
+ a host outside thelastapi; agents use \`vibiz dev\`
3229
3229
  vibiz env set <NAME> [--dev] the app's own variable (a third-party key\u2026): from $NAME
3230
3230
  or a hidden prompt; write-only, never printed. The app
3231
3231
  reads it from its env; connected hosts get it too
@@ -3262,7 +3262,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3262
3262
  move a bought name to another project (full-access keys)
3263
3263
  vibiz domains point <name> <host or IP|none>
3264
3264
  a bought name used by an app elsewhere: we point it there
3265
- vibiz domains records <domain> [--json] a bought domain's DNS records; the ones Vibiz keeps
3265
+ vibiz domains records <domain> [--json] a bought domain's DNS records; the ones thelastapi keeps
3266
3266
  (hosting, email, DNS defaults) are marked managed
3267
3267
  vibiz domains records add <domain> <TYPE> <name> <value> [--ttl n] [--priority n]
3268
3268
  add a record (A, AAAA, CNAME, MX, TXT, CAA; name @ for
@@ -3301,7 +3301,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3301
3301
  [--brand-background #hex] [--brand-font inter] [--brand-border pill|rounded|rectangular]
3302
3302
  a checkout link to pay right now, in your brand
3303
3303
  vibiz payments list [--dev] payments, newest first
3304
- vibiz payments webhook <url|none> [--dev] where Vibiz POSTs payment events (the app verifies
3304
+ vibiz payments webhook <url|none> [--dev] where thelastapi POSTs payment events (the app verifies
3305
3305
  them with VIBIZ_WEBHOOK_SECRET: vibiz docs webhooks)
3306
3306
  vibiz payments withdraw [--amount <cents>] [--dev]
3307
3307
  send the balance to your bank; shows the amount and
@@ -3313,7 +3313,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3313
3313
  vibiz payments connect [--dev] [--open] a link for the owner to connect their own Stripe
3314
3314
  account instead (sales charged and paid out there);
3315
3315
  give it to them: only they can complete it
3316
- vibiz payments disconnect [--dev] owner: back to payments through Vibiz (an opt-out:
3316
+ vibiz payments disconnect [--dev] owner: back to payments through thelastapi (an opt-out:
3317
3317
  account apply leaves the project alone)
3318
3318
  vibiz payments use-account [--dev] owner: put the project on your Stripe account for
3319
3319
  every project
@@ -3326,14 +3326,14 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3326
3326
  vibiz payments account apply [--dev] [--yes]
3327
3327
  owner: switch existing projects to it for new sales;
3328
3328
  lists what changes and asks you to confirm
3329
- vibiz payments account disconnect [--dev] owner: projects on it go back to payments through Vibiz
3329
+ vibiz payments account disconnect [--dev] owner: projects on it go back to payments through thelastapi
3330
3330
  vibiz payments app-store connect [--open] a link for the owner to connect their own RevenueCat
3331
3331
  account (they paste its secret key there, once)
3332
3332
  vibiz payments app-store setup --ios <bundle id> [--android <package>] [--store-project <id>] [--dev]
3333
3333
  iOS/Android in-app purchases: the app in their
3334
3334
  RevenueCat account, this catalog mirrored, the public
3335
3335
  SDK key and the App Store product ids (safe to re-run)
3336
- vibiz payments app-store [--dev] [--json] what is set up and the steps left (no Vibiz fee on
3336
+ vibiz payments app-store [--dev] [--json] what is set up and the steps left (no thelastapi fee on
3337
3337
  store purchases)
3338
3338
  vibiz payments app-store subscriptions [--user id] [--dev]
3339
3339
  App Store and Google Play purchases recorded
@@ -3363,7 +3363,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3363
3363
  [--start-date YYYY-MM-DD] [--end-date \u2026] [--file campaign.json] [--active] [--dev]
3364
3364
  a Google Ads campaign, created PAUSED (--active starts
3365
3365
  spending; live: you confirm; agents ask the owner)
3366
- vibiz connectors [list] [--json] your own APIs, called through Vibiz, which holds their
3366
+ vibiz connectors [list] [--json] your own APIs, called through thelastapi, which holds their
3367
3367
  keys (docs/CONNECTORS.md)
3368
3368
  vibiz connectors import <spec-url|file> [--name n] [--enable op,op] [--add]
3369
3369
  preview an OpenAPI 3 spec (JSON or YAML): its operations
@@ -3385,9 +3385,9 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3385
3385
  the command with the app's env; any language
3386
3386
  vibiz env pull [--format dotenv|shell|docker|json] [-o file]
3387
3387
  the app's env from VIBIZ_APP_KEY, for a build step
3388
- vibiz hosts hosts outside Vibiz that get the env server to server
3388
+ vibiz hosts hosts outside thelastapi that get the env server to server
3389
3389
  vibiz hosts add <host> <app> [field=value\u2026] [--dev]
3390
- connect your own host so Vibiz keeps its env in sync
3390
+ connect your own host so thelastapi keeps its env in sync
3391
3391
  (full-access key): vercel, netlify, render, railway, fly,
3392
3392
  heroku, cloudflare-workers, cloudflare-pages,
3393
3393
  github-actions. The token comes from the host's usual
@@ -3427,6 +3427,8 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3427
3427
  to Request indexing for the ones not indexed
3428
3428
  vibiz search sync set up and read Google and Bing now (daily otherwise)
3429
3429
  vibiz search connections the account's Google and Bing accounts
3430
+ vibiz search push on|off push pages Google hasn't crawled to its Indexing API
3431
+ (owner, off by default, 200 a day per Google Cloud project)
3430
3432
  vibiz search connect google --key <file.json> [--owner-email <email>]
3431
3433
  add a Google key file (service account): every
3432
3434
  project goes into Search Console, no sign-in
@@ -3505,7 +3507,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3505
3507
  there; --check looks again now
3506
3508
  vibiz email forward <address@domain> <inbox\u2026> [--replace-mx]
3507
3509
  forward mail for hello@yourdomain.com (or *@ for any
3508
- other address) to up to 5 inboxes, "via Vibiz" (owner
3510
+ other address) to up to 5 inboxes, "via thelastapi" (owner
3509
3511
  keys). Each inbox confirms once by email. A domain
3510
3512
  bought here gets its records set; --replace-mx
3511
3513
  confirms taking its mail from another provider
@@ -3567,9 +3569,9 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3567
3569
  vibiz email automation list|runs <id>|activate <id>|pause <id>
3568
3570
  vibiz email automation create --file automation.json {name, trigger, steps, exit_event}
3569
3571
  vibiz ai "<prompt>" [--model m] [--system s] stream an answer from a language model (metered)
3570
- --model: a Vibiz model (vibiz/smart) or any lab model
3572
+ --model: a thelastapi model (vibiz/smart) or any lab model
3571
3573
  (anthropic/claude-sonnet-5.5): app.vibiz.app/docs/ai
3572
- vibiz ai models [search\u2026] [--all] [--json] the Vibiz models and the model each runs, with prices;
3574
+ vibiz ai models [search\u2026] [--all] [--json] the thelastapi models and the model each runs, with prices;
3573
3575
  --all (or a search) lists every model you can call
3574
3576
  vibiz ai budget [<dollars>] [--project id | --all] a project's daily AI budget: show it, or set it
3575
3577
  (--all: every project with AI). Full-access key to change.
@@ -3590,6 +3592,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3590
3592
  vibiz files download <id> [-o path] save its bytes here (private files too)
3591
3593
  vibiz files rm <id> delete it: its link stops working
3592
3594
  vibiz image "<prompt>" -o out.png [--size 1024x1024] [--model m] generate an image
3595
+ vibiz video "<prompt>" -o out.mp4 [--from-image <https url>] [--aspect 16:9|9:16] [--model m] a short video (or animate an image)
3593
3596
  vibiz say "<text>" -o out.mp3 [--voice alloy] text to speech
3594
3597
  vibiz transcribe <audio-file> [--language en] speech to text
3595
3598
  vibiz usage [--period 24h|7d|30d|month] [--by tool|model|alias|project|api_key|end_user|day|capability]
@@ -3602,12 +3605,12 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
3602
3605
  web data): show it, or raise it. Full-access key to change.
3603
3606
  vibiz billing auto-recharge on|off [--threshold 5] [--amount 25] (full-access key)
3604
3607
  vibiz metrics [--period 7d] [--json] request counts, error rate and latency by capability
3605
- vibiz keys [create <name> [--limited] | access <id> full|limited | revoke <id>]
3608
+ vibiz keys [create <name> [--limited|--read-all] | access [<id> full|read|limited | <id> allow <permission>] | permissions | revoke <id>]
3606
3609
  named API keys, one per person or agent: full
3607
3610
  access by default; Limited ones never move live
3608
3611
  money or read production secrets
3609
3612
  vibiz admin metrics [--period 7d] [--json] [--open] the platform view (admin key)
3610
- vibiz mcp serve the Vibiz tools to AI agents (MCP, stdio)
3613
+ vibiz mcp serve the thelastapi tools to AI agents (MCP, stdio)
3611
3614
  vibiz mcp add --clients "<client>[,\u2026]" connect a coding agent to the remote MCP server once:
3612
3615
  "Claude Code", Codex, Cursor, "VS Code with Copilot",
3613
3616
  Windsurf, "Gemini CLI", OpenCode (merges, never replaces)
@@ -3753,7 +3756,7 @@ function printDomains(io, list2, only) {
3753
3756
  io.log(` ${x.next_step}`);
3754
3757
  }
3755
3758
  }
3756
- var accessLabel = (access) => access === "agent" ? "Limited access" : "full access";
3759
+ var accessLabel = (access, preset, grants) => access !== "agent" ? "full access" : preset === "read_all" ? "Read everything" : grants?.length ? `Limited + ${grants.length} permission${grants.length === 1 ? "" : "s"}` : "Limited access";
3757
3760
  var BUY_DOMAIN_COMMANDS = /* @__PURE__ */ new Set([
3758
3761
  "search",
3759
3762
  "buy",
@@ -4228,7 +4231,7 @@ function printProject(io, p) {
4228
4231
  if (p.url) io.log(` ${p.url}`);
4229
4232
  else if (p.status === "active" && !p.resources.some((r) => r.type === "hosting"))
4230
4233
  io.log(
4231
- ` no Vibiz hosting: run the app anywhere${p.domains?.length ? ` (${p.domains.join(", ")})` : ""}; its env: vibiz connect`
4234
+ ` no thelastapi hosting: run the app anywhere${p.domains?.length ? ` (${p.domains.join(", ")})` : ""}; its env: vibiz connect`
4232
4235
  );
4233
4236
  for (const r of p.resources) {
4234
4237
  const detail = r.error ? ` ${r.error.message}` : "";
@@ -4326,8 +4329,8 @@ function printCompany(io, c) {
4326
4329
  var USAGE_WORDS = {
4327
4330
  account: "your Stripe account (every project)",
4328
4331
  other_account: "its own Stripe account",
4329
- vibiz: "through Vibiz",
4330
- opted_out: "through Vibiz (opted out)",
4332
+ vibiz: "through thelastapi",
4333
+ opted_out: "through thelastapi (opted out)",
4331
4334
  not_started: "no payments yet"
4332
4335
  };
4333
4336
  async function ownerStripeCommand(io, vibiz2, [sub, arg], flags) {
@@ -4381,7 +4384,7 @@ ${link.url}`
4381
4384
  const show = (r2) => {
4382
4385
  for (const c of r2.changed) {
4383
4386
  io.log(
4384
- ` ${r2.dry_run ? "will switch" : "switched"}: ${c.name} (${c.environment})${c.balance_cents ? ` \xB7 ${cents2(c.balance_cents)} stays in its balance to withdraw` : ""}${c.vibiz_subscriptions ? ` \xB7 ${c.vibiz_subscriptions} subscription(s) keep billing through Vibiz` : ""}`
4387
+ ` ${r2.dry_run ? "will switch" : "switched"}: ${c.name} (${c.environment})${c.balance_cents ? ` \xB7 ${cents2(c.balance_cents)} stays in its balance to withdraw` : ""}${c.vibiz_subscriptions ? ` \xB7 ${c.vibiz_subscriptions} subscription(s) keep billing through thelastapi` : ""}`
4385
4388
  );
4386
4389
  }
4387
4390
  for (const x of r2.skipped) io.log(` skipped: ${x.name} (${x.environment}): ${x.message}`);
@@ -4424,7 +4427,7 @@ function printPayments(io, a) {
4424
4427
  io.log(`Payments (${a.environment}) ${a.status} statement: ${a.statement_descriptor}`);
4425
4428
  if (a.account) {
4426
4429
  io.log(
4427
- own ? ` sales: your own Stripe account${a.account.own.account_name ? ` (${a.account.own.account_name})` : ""}, paid out by it` : ` sales: through Vibiz (the default)${a.account.own.available ? " \xB7 own Stripe account: vibiz payments connect" : ""}`
4430
+ own ? ` sales: your own Stripe account${a.account.own.account_name ? ` (${a.account.own.account_name})` : ""}, paid out by it` : ` sales: through thelastapi (the default)${a.account.own.available ? " \xB7 own Stripe account: vibiz payments connect" : ""}`
4428
4431
  );
4429
4432
  }
4430
4433
  const held = b.available_cents + b.pending_cents + b.in_transit_cents + b.negative_cents > 0;
@@ -4446,7 +4449,7 @@ function printPayments(io, a) {
4446
4449
  }
4447
4450
  if (a.webhook.url) io.log(`
4448
4451
  webhook: ${a.webhook.url}`);
4449
- const next = a.status === "frozen" ? "payments are paused by Vibiz: contact support" : own && !held ? null : p.status !== "ready" ? "verify your identity and add a bank in the console (Payments \u25B8 Get paid); your app can already sell" : b.available_cents > 0 ? "vibiz payments withdraw" : null;
4452
+ const next = a.status === "frozen" ? "payments are paused by thelastapi: contact support" : own && !held ? null : p.status !== "ready" ? "verify your identity and add a bank in the console (Payments \u25B8 Get paid); your app can already sell" : b.available_cents > 0 ? "vibiz payments withdraw" : null;
4450
4453
  if (next) io.log(`
4451
4454
  next: ${next}`);
4452
4455
  }
@@ -4711,6 +4714,8 @@ async function runCli(argv2, io) {
4711
4714
  system: { type: "string" },
4712
4715
  size: { type: "string" },
4713
4716
  voice: { type: "string" },
4717
+ "from-image": { type: "string" },
4718
+ aspect: { type: "string" },
4714
4719
  language: { type: "string" },
4715
4720
  project: { type: "string" },
4716
4721
  by: { type: "string" },
@@ -4727,6 +4732,7 @@ async function runCli(argv2, io) {
4727
4732
  grace: { type: "string" },
4728
4733
  owner: { type: "boolean", default: false },
4729
4734
  limited: { type: "boolean", default: false },
4735
+ "read-all": { type: "boolean", default: false },
4730
4736
  own: { type: "boolean", default: false },
4731
4737
  "client-id": { type: "string" },
4732
4738
  file: { type: "string" },
@@ -5247,7 +5253,7 @@ ${link.url}`
5247
5253
  `This files ${name} (${c.entity_type === "llc" ? "LLC" : "C-Corp"}, ${c.state}) with the state for real and charges ${total}.`
5248
5254
  );
5249
5255
  io.log(
5250
- "Vibiz files formation documents on your instructions. It is not a law firm and does not give legal or tax advice."
5256
+ "thelastapi files formation documents on your instructions. It is not a law firm and does not give legal or tax advice."
5251
5257
  );
5252
5258
  const typed = await io.promptLine(`Type the company's name (${name}) to confirm: `);
5253
5259
  if (typed !== name) throw new Error("Not confirmed: nothing was filed.");
@@ -5495,7 +5501,7 @@ ${c.url}`));
5495
5501
  ${link.url}`
5496
5502
  );
5497
5503
  io.log(
5498
- "\n They sign in to the console, read what changes, and connect their Stripe account (or keep payments through Vibiz)."
5504
+ "\n They sign in to the console, read what changes, and connect their Stripe account (or keep payments through thelastapi)."
5499
5505
  );
5500
5506
  });
5501
5507
  if (values.open) io.openUrl(link.url);
@@ -5601,7 +5607,7 @@ ${link.url}`
5601
5607
  ${link.url}`
5602
5608
  );
5603
5609
  io.log(
5604
- "You sign in to Vibiz, check it, then sign in on the platform. Then: vibiz social accounts"
5610
+ "You sign in to thelastapi, check it, then sign in on the platform. Then: vibiz social accounts"
5605
5611
  );
5606
5612
  });
5607
5613
  if (values.open) io.openUrl(link.url);
@@ -6054,7 +6060,7 @@ ${link.url}`
6054
6060
  environments: values.dev && host.environments.includes("development") ? ["production", "development"] : ["production"]
6055
6061
  });
6056
6062
  io.log(
6057
- `Connected ${host.label} ${t.name} (${t.id}). Vibiz writes the env there now and on every change; it applies ${host.applies}.`
6063
+ `Connected ${host.label} ${t.name} (${t.id}). thelastapi writes the env there now and on every change; it applies ${host.applies}.`
6058
6064
  );
6059
6065
  return;
6060
6066
  }
@@ -6067,7 +6073,7 @@ ${link.url}`
6067
6073
  if (!a) throw new Error("usage: vibiz hosts rm <id> [--keep-values]");
6068
6074
  await vibiz2.projects.hosts.remove(id, a, { keepValues: values["keep-values"] });
6069
6075
  io.log(
6070
- values["keep-values"] ? `Disconnected ${a}; its variables stay but get no more updates.` : `Disconnected ${a}; removing the variables Vibiz wrote there.`
6076
+ values["keep-values"] ? `Disconnected ${a}; its variables stay but get no more updates.` : `Disconnected ${a}; removing the variables thelastapi wrote there.`
6071
6077
  );
6072
6078
  return;
6073
6079
  }
@@ -6200,11 +6206,11 @@ ${await oneKeyLines(vibiz2, id)}`);
6200
6206
  const linked = await local.readFile(PROJECT_FILE, "utf8").then((t) => JSON.parse(String(t)).project_id).catch(() => void 0);
6201
6207
  const oneKey = async (host) => {
6202
6208
  if (!linked) {
6203
- return ` One key, VIBIZ_APP_KEY, gives the app everything on Vibiz. This folder has no ${PROJECT_FILE} yet: run vibiz init <name> here, then vibiz connect again for the link to copy it.`;
6209
+ return ` One key, VIBIZ_APP_KEY, gives the app everything on thelastapi. This folder has no ${PROJECT_FILE} yet: run vibiz init <name> here, then vibiz connect again for the link to copy it.`;
6204
6210
  }
6205
6211
  return oneKeyLines(await io.client(), linked, host);
6206
6212
  };
6207
- io.log("Recommended: Vibiz hosting. Every key is already there and stays in sync:");
6213
+ io.log("Recommended: thelastapi hosting. Every key is already there and stays in sync:");
6208
6214
  io.log(" vibiz deploy\n");
6209
6215
  if (!found.length) {
6210
6216
  io.log("No other host found in this folder. Hosting somewhere else?");
@@ -6215,7 +6221,7 @@ ${await oneKeyLines(vibiz2, id)}`);
6215
6221
  for (const h of found) {
6216
6222
  io.log(`Found ${h.label} (${h.file}).`);
6217
6223
  if (h.push) {
6218
- io.log(` Vibiz can write the env into it and keep it in sync (an owner, once):`);
6224
+ io.log(` thelastapi can write the env into it and keep it in sync (an owner, once):`);
6219
6225
  io.log(` vibiz hosts add ${h.kind} <its project or service>`);
6220
6226
  io.log(` Or with one key instead:`);
6221
6227
  }
@@ -6242,7 +6248,7 @@ ${await oneKeyLines(vibiz2, id)}`);
6242
6248
  headers: { authorization: `Bearer ${key}` }
6243
6249
  });
6244
6250
  const text = await res.text();
6245
- if (!res.ok) throw new Error(`Vibiz answered ${res.status}: ${text.slice(0, 200)}`);
6251
+ if (!res.ok) throw new Error(`thelastapi answered ${res.status}: ${text.slice(0, 200)}`);
6246
6252
  if (values.output) {
6247
6253
  await io.local().writeFile(values.output, text, { mode: 384 });
6248
6254
  await io.local().chmod(values.output, 384);
@@ -6274,7 +6280,7 @@ ${await oneKeyLines(vibiz2, id)}`);
6274
6280
  const link = await vibiz2.projects.secretLink(id, { name, environment });
6275
6281
  if (values.json) return io.log(JSON.stringify(link, null, 2));
6276
6282
  return io.log(
6277
- `Paste ${name} here: ${link.console_url} . It goes straight to Vibiz, never through a chat.`
6283
+ `Paste ${name} here: ${link.console_url} . It goes straight to thelastapi, never through a chat.`
6278
6284
  );
6279
6285
  }
6280
6286
  const value = io.env[name] ?? await io.promptHidden(`${name} (hidden): `);
@@ -6637,6 +6643,45 @@ ${await oneKeyLines(vibiz2, id)}`);
6637
6643
  if (saved) io.log(` saved in the project's Files: ${saved}`);
6638
6644
  return;
6639
6645
  }
6646
+ case "video": {
6647
+ io.local();
6648
+ const prompt = positionals.join(" ");
6649
+ if (!prompt || !values.output)
6650
+ throw new Error(
6651
+ 'usage: vibiz video "<prompt>" -o out.mp4 [--from-image <https url>] [--aspect 16:9|9:16]'
6652
+ );
6653
+ const aspect = values.aspect;
6654
+ if (aspect && aspect !== "16:9" && aspect !== "9:16")
6655
+ throw new Error("--aspect is 16:9 or 9:16.");
6656
+ const from = values["from-image"];
6657
+ if (from && !from.startsWith("https://"))
6658
+ throw new Error(
6659
+ "--from-image must be a public https link (upload it with vibiz files add first)."
6660
+ );
6661
+ const vibiz2 = await io.aiClient(values.project);
6662
+ const job = await vibiz2.ai.jobs.create({
6663
+ type: "video",
6664
+ ...values.model ? { model: values.model } : {},
6665
+ input: {
6666
+ prompt,
6667
+ ...from ? { image_url: from } : {},
6668
+ ...aspect ? { aspect_ratio: aspect } : {}
6669
+ }
6670
+ });
6671
+ io.error(` rendering ${job.id} (about a minute)\u2026`);
6672
+ const done = await vibiz2.ai.jobs.wait(job.id, { timeoutMs: 10 * 6e4, intervalMs: 3e3 });
6673
+ const clip = done.output?.data?.[0];
6674
+ if (done.status !== "succeeded" || !clip)
6675
+ throw new Error(done.error?.message ?? `The video ${done.status}.`);
6676
+ const res = await fetch(clip.url);
6677
+ if (!res.ok) throw new Error(`Couldn't download the video (${res.status}): ${clip.url}`);
6678
+ await io.local().writeFile(values.output, new Uint8Array(await res.arrayBuffer()));
6679
+ io.log(
6680
+ `${dot("ready")} ${values.output} (${done.model}${done.cost_micro_usd === null ? "" : `, ${usd4(done.cost_micro_usd)}`})`
6681
+ );
6682
+ if (clip.file_url) io.log(` saved in the project's Files: ${clip.file_url}`);
6683
+ return;
6684
+ }
6640
6685
  case "say": {
6641
6686
  io.local();
6642
6687
  const text = positionals.join(" ");
@@ -6776,23 +6821,52 @@ The credits show in \`vibiz billing\` a few seconds after paying.`
6776
6821
  const vibiz2 = await io.client();
6777
6822
  const [sub, arg] = positionals;
6778
6823
  if (sub === "create") {
6779
- if (!arg) throw new Error("usage: vibiz keys create <name> [--limited]");
6780
- const key = await vibiz2.apiKeys.create(arg, { access: values.limited ? "agent" : "owner" });
6824
+ if (!arg) throw new Error("usage: vibiz keys create <name> [--limited|--read-all]");
6825
+ const key = await vibiz2.apiKeys.create(arg, {
6826
+ preset: values["read-all"] ? "read_all" : values.limited ? "limited" : "full"
6827
+ });
6781
6828
  io.log(
6782
- `${key.name} ${key.id} ${accessLabel(key.access)}
6829
+ `${key.name} ${key.id} ${accessLabel(key.access, key.preset, key.grants)}
6783
6830
  ${key.secret}
6784
6831
 
6785
6832
  Store the key now: it is not shown again.`
6786
6833
  );
6787
6834
  return;
6788
6835
  }
6836
+ if (sub === "permissions") {
6837
+ for (const p of await vibiz2.apiKeys.permissions()) {
6838
+ io.log(`${p.id.padEnd(28)} ${p.label}`);
6839
+ }
6840
+ return;
6841
+ }
6789
6842
  if (sub === "access") {
6790
6843
  const level = positionals[2];
6791
- if (!arg || level !== "full" && level !== "limited") {
6792
- throw new Error("usage: vibiz keys access <key id> full|limited");
6844
+ if (!arg) {
6845
+ const me = await vibiz2.whoami();
6846
+ io.log(
6847
+ `${me.key.name} (${me.key.id}): ${accessLabel(me.key.access, me.key.preset, me.key.grants)}`
6848
+ );
6849
+ for (const g of me.key.grants ?? []) io.log(` ${g}`);
6850
+ if (me.access_url) io.log(`Change it in the console: ${me.access_url}`);
6851
+ return;
6852
+ }
6853
+ if (level === "allow") {
6854
+ const perm = positionals[3];
6855
+ if (!perm) throw new Error("usage: vibiz keys access <key id> allow <permission>");
6856
+ const key = (await vibiz2.apiKeys.list()).find((k3) => k3.id === arg);
6857
+ if (!key) throw new Error(`No key ${arg} on this account (vibiz keys lists them).`);
6858
+ const k2 = await vibiz2.apiKeys.setGrants(arg, [.../* @__PURE__ */ new Set([...key.grants ?? [], perm])]);
6859
+ io.log(`${k2.name} (${k2.id}) now has ${accessLabel(k2.access, k2.preset, k2.grants)}.`);
6860
+ return;
6793
6861
  }
6794
- const k = await vibiz2.apiKeys.setAccess(arg, level === "full" ? "owner" : "agent");
6795
- io.log(`${k.name} (${k.id}) now has ${accessLabel(k.access)}.`);
6862
+ const preset = level === "full" ? "full" : level === "read" ? "read_all" : level === "limited" ? "limited" : null;
6863
+ if (!preset) {
6864
+ throw new Error(
6865
+ "usage: vibiz keys access [<key id> full|read|limited | <key id> allow <permission>]"
6866
+ );
6867
+ }
6868
+ const k = await vibiz2.apiKeys.setPreset(arg, preset);
6869
+ io.log(`${k.name} (${k.id}) now has ${accessLabel(k.access, k.preset, k.grants)}.`);
6796
6870
  return;
6797
6871
  }
6798
6872
  if (sub === "revoke") {
@@ -6803,7 +6877,7 @@ Store the key now: it is not shown again.`
6803
6877
  }
6804
6878
  for (const k of await vibiz2.apiKeys.list()) {
6805
6879
  io.log(
6806
- `${k.id} ${k.name.padEnd(20)} ${k.prefix}\u2026 ${accessLabel(k.access).padEnd(14)} ${k.revoked_at ? "revoked" : "active"}`
6880
+ `${k.id} ${k.name.padEnd(20)} ${k.prefix}\u2026 ${accessLabel(k.access, k.preset, k.grants).padEnd(22)} ${k.revoked_at ? "revoked" : "active"}`
6807
6881
  );
6808
6882
  }
6809
6883
  return;
@@ -6823,7 +6897,7 @@ Store the key now: it is not shown again.`
6823
6897
  return;
6824
6898
  }
6825
6899
  case "docs": {
6826
- const { DOC_TOPICS, DOCS } = await import("./src-BBALUAYI.js");
6900
+ const { DOC_TOPICS, DOCS } = await import("./src-H7SRDBOZ.js");
6827
6901
  const topic = positionals[0];
6828
6902
  if (!topic || !DOC_TOPICS.includes(topic)) {
6829
6903
  for (const t of DOC_TOPICS) io.log(` vibiz docs ${t.padEnd(13)} ${DOCS[t].title}`);
@@ -6848,7 +6922,7 @@ ${DOCS[topic].body}`);
6848
6922
  if (positionals[0])
6849
6923
  throw new Error('usage: vibiz mcp (serve over stdio) | vibiz mcp add --clients "<client>"');
6850
6924
  io.local();
6851
- const { serveStdio } = await import("./src-BBALUAYI.js");
6925
+ const { serveStdio } = await import("./src-H7SRDBOZ.js");
6852
6926
  await serveStdio({ version: cliVersion() });
6853
6927
  return;
6854
6928
  }
@@ -6879,6 +6953,11 @@ function cliErrorLines(err) {
6879
6953
  out.push(` field: ${d.field}`);
6880
6954
  }
6881
6955
  if (d?.approval_id) out.push(` approval_id: ${d.approval_id}`);
6956
+ if (err.grantUrl) {
6957
+ out.push(` Allow it for this key: ${err.grantUrl}`);
6958
+ if (d?.console_url) out.push(` Or do it yourself in the console: ${d.console_url}`);
6959
+ return out;
6960
+ }
6882
6961
  if (d?.next_step) out.push(` ${d.next_step}`);
6883
6962
  if (d?.console_url && !d.next_step?.includes(d.console_url)) out.push(` ${d.console_url}`);
6884
6963
  return out;
@@ -6971,7 +7050,7 @@ async function aiKeysCommand(io, args, values) {
6971
7050
  const mine = (k.models ?? []).filter((m) => m.paid_by === "your_key").map((m) => m.model);
6972
7051
  const ours = (k.models ?? []).filter((m) => m.paid_by === "vibiz").map((m) => m.model);
6973
7052
  io.log(` on your key (0 here): ${mine.join(", ") || "none"}`);
6974
- io.log(` on Vibiz (billed): ${ours.join(", ") || "none"}`);
7053
+ io.log(` on thelastapi (billed): ${ours.join(", ") || "none"}`);
6975
7054
  };
6976
7055
  const useFor = values["use-for"] ? values["use-for"].split(",").map((x) => x.trim()) : void 0;
6977
7056
  switch (sub) {
@@ -7047,7 +7126,8 @@ var SITE_SEARCH_WORDS = /* @__PURE__ */ new Set([
7047
7126
  "pages",
7048
7127
  "sync",
7049
7128
  "connect",
7050
- "connections"
7129
+ "connections",
7130
+ "push"
7051
7131
  ]);
7052
7132
  async function siteSearchCommand(io, positionals, values) {
7053
7133
  const vibiz2 = await io.client();
@@ -7066,6 +7146,16 @@ async function siteSearchCommand(io, positionals, values) {
7066
7146
  if (out2.console_url) io.log(`Manage: ${out2.console_url}`);
7067
7147
  return;
7068
7148
  }
7149
+ if (sub === "push") {
7150
+ if (arg !== "on" && arg !== "off") throw new Error("usage: vibiz search push on|off");
7151
+ const out2 = await vibiz2.search.setGooglePush(arg === "on");
7152
+ if (values.json) return print(out2);
7153
+ io.log(
7154
+ arg === "on" ? "Pushing pages to Google is on: up to 200 pages a day Google hasn't crawled yet, across your sites. Google says its Indexing API is meant for job-posting and livestream pages and may ignore other pages." : "Pushing pages to Google is off."
7155
+ );
7156
+ for (const c of out2.data) if (c.push?.note) io.log(`Note: ${c.push.note}`);
7157
+ return;
7158
+ }
7069
7159
  if (sub === "connect") {
7070
7160
  if (arg !== "google") {
7071
7161
  throw new Error(
@@ -7121,7 +7211,7 @@ async function siteSearchCommand(io, positionals, values) {
7121
7211
  out = await vibiz2.search.update(id, { submit_free_address: arg === "on" });
7122
7212
  else
7123
7213
  throw new Error(
7124
- "usage: vibiz search [submit | sync | pages [--not-indexed] | free-address on|off | connections | connect google] [--json]"
7214
+ "usage: vibiz search [submit | sync | pages [--not-indexed] | free-address on|off | push on|off | connections | connect google] [--json]"
7125
7215
  );
7126
7216
  if (values.json) return print(out);
7127
7217
  const s = out.indexnow;
@@ -7152,10 +7242,16 @@ async function siteSearchCommand(io, positionals, values) {
7152
7242
  `Clicks 28d: ${g.clicks_28d} from ${g.impressions_28d} impressions${g.position_28d !== null ? `, average position ${g.position_28d}` : ""}`
7153
7243
  );
7154
7244
  if (g.note) io.log(`Google note: ${g.note}`);
7245
+ if (g.push?.enabled) {
7246
+ io.log(
7247
+ `Pushed: ${g.push.pushed_today} today, ${g.push.pushed_total} in all, ${g.push.indexed_after_push} indexed since`
7248
+ );
7249
+ if (g.push.note) io.log(`Push note: ${g.push.note}`);
7250
+ }
7155
7251
  }
7156
7252
  if (out.bing?.connected) {
7157
7253
  io.log(
7158
- `Bing: ${out.bing.verified_at ? "verified" : "not verified yet"}${out.bing.clicks_28d !== null ? `, ${out.bing.clicks_28d} clicks 28d` : ""}`
7254
+ `Bing: ${out.bing.verified_at ? "verified" : "not verified yet"}${out.bing.indexed != null ? `, ${out.bing.indexed} indexed` : ""}${out.bing.clicks_28d !== null ? `, ${out.bing.clicks_28d} clicks 28d` : ""}${out.bing.submitted_total ? `, ${out.bing.submitted_total} pages sent (${out.bing.submitted_today} today)` : ""}`
7159
7255
  );
7160
7256
  if (out.bing.note) io.log(`Bing note: ${out.bing.note}`);
7161
7257
  }
@@ -7179,7 +7275,7 @@ function isNewer(latest, current) {
7179
7275
  function updateNotice(latest, current) {
7180
7276
  if (!isNewer(latest, current)) return null;
7181
7277
  return [
7182
- `A newer Vibiz CLI is out: ${current} \u2192 ${latest}. Some commands may be missing from this one.`,
7278
+ `A newer thelastapi CLI is out: ${current} \u2192 ${latest}. Some commands may be missing from this one.`,
7183
7279
  "Update: npm install -g @vibiz/cli@latest (then refresh the agent skills: vibiz skills add --global)"
7184
7280
  ].join("\n");
7185
7281
  }
@@ -7352,6 +7448,8 @@ ${text}`);
7352
7448
  };
7353
7449
  runCli(argv, terminal).then(notice).catch(async (err) => {
7354
7450
  for (const line2 of cliErrorLines(err)) console.error(line2);
7451
+ if (err instanceof VibizApiError && err.grantUrl && process.stdin.isTTY && process.stdout.isTTY)
7452
+ openUrl(err.grantUrl);
7355
7453
  await notice();
7356
7454
  process.exit(1);
7357
7455
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vibiz/cli",
3
- "version": "0.3.10",
4
- "description": "The Vibiz Stack CLI and MCP server: website, database, sign-in, email and AI for a new business, from your terminal or your AI agent.",
3
+ "version": "0.3.14",
4
+ "description": "The thelastapi CLI and MCP server: website, database, sign-in, email and AI for a new business, from your terminal or your AI agent.",
5
5
  "keywords": [
6
6
  "vibiz",
7
7
  "cli",