@vibiz/cli 0.3.12 → 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-
|
|
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 (
|
|
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
|
|
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 ?? `
|
|
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
|
|
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
|
|
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
|
|
983
|
-
email: "managed by
|
|
984
|
-
default: "managed by
|
|
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:
|
|
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
|
|
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
|
|
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
|
-
`
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
@@ -3507,7 +3507,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3507
3507
|
there; --check looks again now
|
|
3508
3508
|
vibiz email forward <address@domain> <inbox\u2026> [--replace-mx]
|
|
3509
3509
|
forward mail for hello@yourdomain.com (or *@ for any
|
|
3510
|
-
other address) to up to 5 inboxes, "via
|
|
3510
|
+
other address) to up to 5 inboxes, "via thelastapi" (owner
|
|
3511
3511
|
keys). Each inbox confirms once by email. A domain
|
|
3512
3512
|
bought here gets its records set; --replace-mx
|
|
3513
3513
|
confirms taking its mail from another provider
|
|
@@ -3569,9 +3569,9 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3569
3569
|
vibiz email automation list|runs <id>|activate <id>|pause <id>
|
|
3570
3570
|
vibiz email automation create --file automation.json {name, trigger, steps, exit_event}
|
|
3571
3571
|
vibiz ai "<prompt>" [--model m] [--system s] stream an answer from a language model (metered)
|
|
3572
|
-
--model: a
|
|
3572
|
+
--model: a thelastapi model (vibiz/smart) or any lab model
|
|
3573
3573
|
(anthropic/claude-sonnet-5.5): app.vibiz.app/docs/ai
|
|
3574
|
-
vibiz ai models [search\u2026] [--all] [--json] the
|
|
3574
|
+
vibiz ai models [search\u2026] [--all] [--json] the thelastapi models and the model each runs, with prices;
|
|
3575
3575
|
--all (or a search) lists every model you can call
|
|
3576
3576
|
vibiz ai budget [<dollars>] [--project id | --all] a project's daily AI budget: show it, or set it
|
|
3577
3577
|
(--all: every project with AI). Full-access key to change.
|
|
@@ -3592,6 +3592,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3592
3592
|
vibiz files download <id> [-o path] save its bytes here (private files too)
|
|
3593
3593
|
vibiz files rm <id> delete it: its link stops working
|
|
3594
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)
|
|
3595
3596
|
vibiz say "<text>" -o out.mp3 [--voice alloy] text to speech
|
|
3596
3597
|
vibiz transcribe <audio-file> [--language en] speech to text
|
|
3597
3598
|
vibiz usage [--period 24h|7d|30d|month] [--by tool|model|alias|project|api_key|end_user|day|capability]
|
|
@@ -3609,7 +3610,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3609
3610
|
access by default; Limited ones never move live
|
|
3610
3611
|
money or read production secrets
|
|
3611
3612
|
vibiz admin metrics [--period 7d] [--json] [--open] the platform view (admin key)
|
|
3612
|
-
vibiz mcp serve the
|
|
3613
|
+
vibiz mcp serve the thelastapi tools to AI agents (MCP, stdio)
|
|
3613
3614
|
vibiz mcp add --clients "<client>[,\u2026]" connect a coding agent to the remote MCP server once:
|
|
3614
3615
|
"Claude Code", Codex, Cursor, "VS Code with Copilot",
|
|
3615
3616
|
Windsurf, "Gemini CLI", OpenCode (merges, never replaces)
|
|
@@ -4230,7 +4231,7 @@ function printProject(io, p) {
|
|
|
4230
4231
|
if (p.url) io.log(` ${p.url}`);
|
|
4231
4232
|
else if (p.status === "active" && !p.resources.some((r) => r.type === "hosting"))
|
|
4232
4233
|
io.log(
|
|
4233
|
-
` no
|
|
4234
|
+
` no thelastapi hosting: run the app anywhere${p.domains?.length ? ` (${p.domains.join(", ")})` : ""}; its env: vibiz connect`
|
|
4234
4235
|
);
|
|
4235
4236
|
for (const r of p.resources) {
|
|
4236
4237
|
const detail = r.error ? ` ${r.error.message}` : "";
|
|
@@ -4328,8 +4329,8 @@ function printCompany(io, c) {
|
|
|
4328
4329
|
var USAGE_WORDS = {
|
|
4329
4330
|
account: "your Stripe account (every project)",
|
|
4330
4331
|
other_account: "its own Stripe account",
|
|
4331
|
-
vibiz: "through
|
|
4332
|
-
opted_out: "through
|
|
4332
|
+
vibiz: "through thelastapi",
|
|
4333
|
+
opted_out: "through thelastapi (opted out)",
|
|
4333
4334
|
not_started: "no payments yet"
|
|
4334
4335
|
};
|
|
4335
4336
|
async function ownerStripeCommand(io, vibiz2, [sub, arg], flags) {
|
|
@@ -4383,7 +4384,7 @@ ${link.url}`
|
|
|
4383
4384
|
const show = (r2) => {
|
|
4384
4385
|
for (const c of r2.changed) {
|
|
4385
4386
|
io.log(
|
|
4386
|
-
` ${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
|
|
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` : ""}`
|
|
4387
4388
|
);
|
|
4388
4389
|
}
|
|
4389
4390
|
for (const x of r2.skipped) io.log(` skipped: ${x.name} (${x.environment}): ${x.message}`);
|
|
@@ -4426,7 +4427,7 @@ function printPayments(io, a) {
|
|
|
4426
4427
|
io.log(`Payments (${a.environment}) ${a.status} statement: ${a.statement_descriptor}`);
|
|
4427
4428
|
if (a.account) {
|
|
4428
4429
|
io.log(
|
|
4429
|
-
own ? ` sales: your own Stripe account${a.account.own.account_name ? ` (${a.account.own.account_name})` : ""}, paid out by it` : ` sales: through
|
|
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" : ""}`
|
|
4430
4431
|
);
|
|
4431
4432
|
}
|
|
4432
4433
|
const held = b.available_cents + b.pending_cents + b.in_transit_cents + b.negative_cents > 0;
|
|
@@ -4448,7 +4449,7 @@ function printPayments(io, a) {
|
|
|
4448
4449
|
}
|
|
4449
4450
|
if (a.webhook.url) io.log(`
|
|
4450
4451
|
webhook: ${a.webhook.url}`);
|
|
4451
|
-
const next = a.status === "frozen" ? "payments are paused by
|
|
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;
|
|
4452
4453
|
if (next) io.log(`
|
|
4453
4454
|
next: ${next}`);
|
|
4454
4455
|
}
|
|
@@ -4713,6 +4714,8 @@ async function runCli(argv2, io) {
|
|
|
4713
4714
|
system: { type: "string" },
|
|
4714
4715
|
size: { type: "string" },
|
|
4715
4716
|
voice: { type: "string" },
|
|
4717
|
+
"from-image": { type: "string" },
|
|
4718
|
+
aspect: { type: "string" },
|
|
4716
4719
|
language: { type: "string" },
|
|
4717
4720
|
project: { type: "string" },
|
|
4718
4721
|
by: { type: "string" },
|
|
@@ -5250,7 +5253,7 @@ ${link.url}`
|
|
|
5250
5253
|
`This files ${name} (${c.entity_type === "llc" ? "LLC" : "C-Corp"}, ${c.state}) with the state for real and charges ${total}.`
|
|
5251
5254
|
);
|
|
5252
5255
|
io.log(
|
|
5253
|
-
"
|
|
5256
|
+
"thelastapi files formation documents on your instructions. It is not a law firm and does not give legal or tax advice."
|
|
5254
5257
|
);
|
|
5255
5258
|
const typed = await io.promptLine(`Type the company's name (${name}) to confirm: `);
|
|
5256
5259
|
if (typed !== name) throw new Error("Not confirmed: nothing was filed.");
|
|
@@ -5498,7 +5501,7 @@ ${c.url}`));
|
|
|
5498
5501
|
${link.url}`
|
|
5499
5502
|
);
|
|
5500
5503
|
io.log(
|
|
5501
|
-
"\n They sign in to the console, read what changes, and connect their Stripe account (or keep payments through
|
|
5504
|
+
"\n They sign in to the console, read what changes, and connect their Stripe account (or keep payments through thelastapi)."
|
|
5502
5505
|
);
|
|
5503
5506
|
});
|
|
5504
5507
|
if (values.open) io.openUrl(link.url);
|
|
@@ -5604,7 +5607,7 @@ ${link.url}`
|
|
|
5604
5607
|
${link.url}`
|
|
5605
5608
|
);
|
|
5606
5609
|
io.log(
|
|
5607
|
-
"You sign in to
|
|
5610
|
+
"You sign in to thelastapi, check it, then sign in on the platform. Then: vibiz social accounts"
|
|
5608
5611
|
);
|
|
5609
5612
|
});
|
|
5610
5613
|
if (values.open) io.openUrl(link.url);
|
|
@@ -6057,7 +6060,7 @@ ${link.url}`
|
|
|
6057
6060
|
environments: values.dev && host.environments.includes("development") ? ["production", "development"] : ["production"]
|
|
6058
6061
|
});
|
|
6059
6062
|
io.log(
|
|
6060
|
-
`Connected ${host.label} ${t.name} (${t.id}).
|
|
6063
|
+
`Connected ${host.label} ${t.name} (${t.id}). thelastapi writes the env there now and on every change; it applies ${host.applies}.`
|
|
6061
6064
|
);
|
|
6062
6065
|
return;
|
|
6063
6066
|
}
|
|
@@ -6070,7 +6073,7 @@ ${link.url}`
|
|
|
6070
6073
|
if (!a) throw new Error("usage: vibiz hosts rm <id> [--keep-values]");
|
|
6071
6074
|
await vibiz2.projects.hosts.remove(id, a, { keepValues: values["keep-values"] });
|
|
6072
6075
|
io.log(
|
|
6073
|
-
values["keep-values"] ? `Disconnected ${a}; its variables stay but get no more updates.` : `Disconnected ${a}; removing the variables
|
|
6076
|
+
values["keep-values"] ? `Disconnected ${a}; its variables stay but get no more updates.` : `Disconnected ${a}; removing the variables thelastapi wrote there.`
|
|
6074
6077
|
);
|
|
6075
6078
|
return;
|
|
6076
6079
|
}
|
|
@@ -6203,11 +6206,11 @@ ${await oneKeyLines(vibiz2, id)}`);
|
|
|
6203
6206
|
const linked = await local.readFile(PROJECT_FILE, "utf8").then((t) => JSON.parse(String(t)).project_id).catch(() => void 0);
|
|
6204
6207
|
const oneKey = async (host) => {
|
|
6205
6208
|
if (!linked) {
|
|
6206
|
-
return ` One key, VIBIZ_APP_KEY, gives the app everything on
|
|
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.`;
|
|
6207
6210
|
}
|
|
6208
6211
|
return oneKeyLines(await io.client(), linked, host);
|
|
6209
6212
|
};
|
|
6210
|
-
io.log("Recommended:
|
|
6213
|
+
io.log("Recommended: thelastapi hosting. Every key is already there and stays in sync:");
|
|
6211
6214
|
io.log(" vibiz deploy\n");
|
|
6212
6215
|
if (!found.length) {
|
|
6213
6216
|
io.log("No other host found in this folder. Hosting somewhere else?");
|
|
@@ -6218,7 +6221,7 @@ ${await oneKeyLines(vibiz2, id)}`);
|
|
|
6218
6221
|
for (const h of found) {
|
|
6219
6222
|
io.log(`Found ${h.label} (${h.file}).`);
|
|
6220
6223
|
if (h.push) {
|
|
6221
|
-
io.log(`
|
|
6224
|
+
io.log(` thelastapi can write the env into it and keep it in sync (an owner, once):`);
|
|
6222
6225
|
io.log(` vibiz hosts add ${h.kind} <its project or service>`);
|
|
6223
6226
|
io.log(` Or with one key instead:`);
|
|
6224
6227
|
}
|
|
@@ -6245,7 +6248,7 @@ ${await oneKeyLines(vibiz2, id)}`);
|
|
|
6245
6248
|
headers: { authorization: `Bearer ${key}` }
|
|
6246
6249
|
});
|
|
6247
6250
|
const text = await res.text();
|
|
6248
|
-
if (!res.ok) throw new Error(`
|
|
6251
|
+
if (!res.ok) throw new Error(`thelastapi answered ${res.status}: ${text.slice(0, 200)}`);
|
|
6249
6252
|
if (values.output) {
|
|
6250
6253
|
await io.local().writeFile(values.output, text, { mode: 384 });
|
|
6251
6254
|
await io.local().chmod(values.output, 384);
|
|
@@ -6277,7 +6280,7 @@ ${await oneKeyLines(vibiz2, id)}`);
|
|
|
6277
6280
|
const link = await vibiz2.projects.secretLink(id, { name, environment });
|
|
6278
6281
|
if (values.json) return io.log(JSON.stringify(link, null, 2));
|
|
6279
6282
|
return io.log(
|
|
6280
|
-
`Paste ${name} here: ${link.console_url} . It goes straight to
|
|
6283
|
+
`Paste ${name} here: ${link.console_url} . It goes straight to thelastapi, never through a chat.`
|
|
6281
6284
|
);
|
|
6282
6285
|
}
|
|
6283
6286
|
const value = io.env[name] ?? await io.promptHidden(`${name} (hidden): `);
|
|
@@ -6640,6 +6643,45 @@ ${await oneKeyLines(vibiz2, id)}`);
|
|
|
6640
6643
|
if (saved) io.log(` saved in the project's Files: ${saved}`);
|
|
6641
6644
|
return;
|
|
6642
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
|
+
}
|
|
6643
6685
|
case "say": {
|
|
6644
6686
|
io.local();
|
|
6645
6687
|
const text = positionals.join(" ");
|
|
@@ -6855,7 +6897,7 @@ Store the key now: it is not shown again.`
|
|
|
6855
6897
|
return;
|
|
6856
6898
|
}
|
|
6857
6899
|
case "docs": {
|
|
6858
|
-
const { DOC_TOPICS, DOCS } = await import("./src-
|
|
6900
|
+
const { DOC_TOPICS, DOCS } = await import("./src-H7SRDBOZ.js");
|
|
6859
6901
|
const topic = positionals[0];
|
|
6860
6902
|
if (!topic || !DOC_TOPICS.includes(topic)) {
|
|
6861
6903
|
for (const t of DOC_TOPICS) io.log(` vibiz docs ${t.padEnd(13)} ${DOCS[t].title}`);
|
|
@@ -6880,7 +6922,7 @@ ${DOCS[topic].body}`);
|
|
|
6880
6922
|
if (positionals[0])
|
|
6881
6923
|
throw new Error('usage: vibiz mcp (serve over stdio) | vibiz mcp add --clients "<client>"');
|
|
6882
6924
|
io.local();
|
|
6883
|
-
const { serveStdio } = await import("./src-
|
|
6925
|
+
const { serveStdio } = await import("./src-H7SRDBOZ.js");
|
|
6884
6926
|
await serveStdio({ version: cliVersion() });
|
|
6885
6927
|
return;
|
|
6886
6928
|
}
|
|
@@ -7008,7 +7050,7 @@ async function aiKeysCommand(io, args, values) {
|
|
|
7008
7050
|
const mine = (k.models ?? []).filter((m) => m.paid_by === "your_key").map((m) => m.model);
|
|
7009
7051
|
const ours = (k.models ?? []).filter((m) => m.paid_by === "vibiz").map((m) => m.model);
|
|
7010
7052
|
io.log(` on your key (0 here): ${mine.join(", ") || "none"}`);
|
|
7011
|
-
io.log(` on
|
|
7053
|
+
io.log(` on thelastapi (billed): ${ours.join(", ") || "none"}`);
|
|
7012
7054
|
};
|
|
7013
7055
|
const useFor = values["use-for"] ? values["use-for"].split(",").map((x) => x.trim()) : void 0;
|
|
7014
7056
|
switch (sub) {
|
|
@@ -7233,7 +7275,7 @@ function isNewer(latest, current) {
|
|
|
7233
7275
|
function updateNotice(latest, current) {
|
|
7234
7276
|
if (!isNewer(latest, current)) return null;
|
|
7235
7277
|
return [
|
|
7236
|
-
`A newer
|
|
7278
|
+
`A newer thelastapi CLI is out: ${current} \u2192 ${latest}. Some commands may be missing from this one.`,
|
|
7237
7279
|
"Update: npm install -g @vibiz/cli@latest (then refresh the agent skills: vibiz skills add --global)"
|
|
7238
7280
|
].join("\n");
|
|
7239
7281
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibiz/cli",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "The
|
|
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",
|