@vibiz/cli 0.3.15 → 0.3.17
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-ASFD5YOR.js";
|
|
15
15
|
|
|
16
16
|
// packages/cli/src/main.ts
|
|
17
17
|
import { spawn } from "node:child_process";
|
|
@@ -26,7 +26,7 @@ import { parseArgs } from "node:util";
|
|
|
26
26
|
|
|
27
27
|
// packages/app/src/index.ts
|
|
28
28
|
var runtimeEnv = () => globalThis.process?.env ?? {};
|
|
29
|
-
var DEFAULT_URL = "https://
|
|
29
|
+
var DEFAULT_URL = "https://thelastapi.dev";
|
|
30
30
|
var VibizAppError = class extends Error {
|
|
31
31
|
status;
|
|
32
32
|
code;
|
|
@@ -969,7 +969,7 @@ var ONE_KEY_PATHS = ` Then the app loads the rest at start:
|
|
|
969
969
|
Node, Bun, Deno import { vibiz } from '@vibiz/app'; await vibiz.loadEnv();
|
|
970
970
|
any language npx @vibiz/cli run -- <your start command>
|
|
971
971
|
Docker / shell eval "$(curl -fsS -H "Authorization: Bearer $VIBIZ_APP_KEY" \\
|
|
972
|
-
https://
|
|
972
|
+
https://thelastapi.dev/v1/app/env?format=shell)" && exec <your server>
|
|
973
973
|
CI / build step npx @vibiz/cli env pull --format dotenv -o .env.production`;
|
|
974
974
|
|
|
975
975
|
// packages/cli/src/dns-records.ts
|
|
@@ -1883,7 +1883,7 @@ function cliVersion() {
|
|
|
1883
1883
|
}
|
|
1884
1884
|
|
|
1885
1885
|
// packages/cli/src/login.ts
|
|
1886
|
-
var DEFAULT_API_URL = "https://
|
|
1886
|
+
var DEFAULT_API_URL = "https://thelastapi.dev";
|
|
1887
1887
|
var pendingFile = (dir) => join4(dir, "pending-login.json");
|
|
1888
1888
|
var configFile = (dir) => join4(dir, "config.json");
|
|
1889
1889
|
async function readJson(io, path) {
|
|
@@ -3247,6 +3247,10 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3247
3247
|
itself. --elsewhere: the app runs on another host
|
|
3248
3248
|
vibiz domains verify <domain> check its DNS (and its TXT proof) again now
|
|
3249
3249
|
vibiz domains remove <domain> disconnect it (full-access keys)
|
|
3250
|
+
vibiz domains redirect <from> <to|none> [--project <id|slug>]
|
|
3251
|
+
moving to a new domain: every URL on <from> answers a
|
|
3252
|
+
permanent redirect to the same path on <to> (add <to>,
|
|
3253
|
+
wait until it's live first); none stops it (full-access keys)
|
|
3250
3254
|
vibiz domains search <name> find a domain to buy, with prices (sellshelf, sellshelf.app)
|
|
3251
3255
|
vibiz domains buy <domain> [--years 1] [--yes]
|
|
3252
3256
|
buy it from your credits for this project (full-access keys,
|
|
@@ -3570,7 +3574,7 @@ var HELP = `vibiz \u2014 website, database and sign-in for a new business, in on
|
|
|
3570
3574
|
vibiz email automation create --file automation.json {name, trigger, steps, exit_event}
|
|
3571
3575
|
vibiz ai "<prompt>" [--model m] [--system s] stream an answer from a language model (metered)
|
|
3572
3576
|
--model: a thelastapi model (vibiz/smart) or any lab model
|
|
3573
|
-
(anthropic/claude-sonnet-5.5):
|
|
3577
|
+
(anthropic/claude-sonnet-5.5): thelastapi.dev/docs/ai
|
|
3574
3578
|
vibiz ai models [search\u2026] [--all] [--json] the thelastapi models and the model each runs, with prices;
|
|
3575
3579
|
--all (or a search) lists every model you can call
|
|
3576
3580
|
vibiz ai budget [<dollars>] [--project id | --all] a project's daily AI budget: show it, or set it
|
|
@@ -3734,7 +3738,7 @@ function printDomains(io, list2, only) {
|
|
|
3734
3738
|
}
|
|
3735
3739
|
for (const x of rows) {
|
|
3736
3740
|
io.log(
|
|
3737
|
-
`${x.domain} ${DOMAIN_STATUS[x.status]}${x.www_redirect ? ` (${x.www_redirect} redirects here)` : ""}${x.trusted_for_sign_in ? "" : " [analytics only]"}`
|
|
3741
|
+
`${x.domain} ${DOMAIN_STATUS[x.status]}${x.redirect_to ? ` \u2192 redirects to ${x.redirect_to}` : ""}${x.www_redirect ? ` (${x.www_redirect} redirects ${x.redirect_to ? "there too" : "here"})` : ""}${x.trusted_for_sign_in ? "" : " [analytics only]"}`
|
|
3738
3742
|
);
|
|
3739
3743
|
if (x.error) io.log(` ${x.error}`);
|
|
3740
3744
|
if (x.records_to_set.length && x.status !== "active") {
|
|
@@ -3757,6 +3761,16 @@ function printDomains(io, list2, only) {
|
|
|
3757
3761
|
io.log(` ${x.next_step}`);
|
|
3758
3762
|
}
|
|
3759
3763
|
}
|
|
3764
|
+
async function projectIdOf(vibiz2, ref) {
|
|
3765
|
+
const r = ref.toLowerCase();
|
|
3766
|
+
const hit = (await vibiz2.projects.list()).find((p) => p.id === ref || p.slug === r);
|
|
3767
|
+
if (!hit) {
|
|
3768
|
+
throw new Error(
|
|
3769
|
+
`No project "${ref}" on this account: name one by id or slug (vibiz projects lists them).`
|
|
3770
|
+
);
|
|
3771
|
+
}
|
|
3772
|
+
return hit.id;
|
|
3773
|
+
}
|
|
3760
3774
|
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";
|
|
3761
3775
|
var BUY_DOMAIN_COMMANDS = /* @__PURE__ */ new Set([
|
|
3762
3776
|
"search",
|
|
@@ -5995,9 +6009,24 @@ ${link.url}`
|
|
|
5995
6009
|
await buyDomainsCommand(io, vibiz2, values, sub, arg, third);
|
|
5996
6010
|
return;
|
|
5997
6011
|
}
|
|
5998
|
-
const id = await io.project();
|
|
6012
|
+
const id = values.project ? await projectIdOf(vibiz2, values.project) : await io.project();
|
|
5999
6013
|
const d = vibiz2.projects.domains;
|
|
6000
6014
|
const print = (list2, only) => values.json ? io.log(JSON.stringify(only ? list2.data.find((x) => x.domain === only) : list2, null, 2)) : printDomains(io, list2, only);
|
|
6015
|
+
if (sub === "redirect") {
|
|
6016
|
+
if (!arg || !third) {
|
|
6017
|
+
throw new Error(
|
|
6018
|
+
"usage: vibiz domains redirect <from> <to|none> [--project <id|slug>] (e.g. vibiz domains redirect old.com new.com)"
|
|
6019
|
+
);
|
|
6020
|
+
}
|
|
6021
|
+
const off = third === "none" || third === "off";
|
|
6022
|
+
const one = await d.redirect(id, arg, off ? null : third);
|
|
6023
|
+
if (values.json) return io.log(JSON.stringify(one, null, 2));
|
|
6024
|
+
print({ ...await d.list(id), data: [one] }, one.domain);
|
|
6025
|
+
io.log(
|
|
6026
|
+
off ? `${one.domain} serves the app again: its redirect is off.` : `Every URL on ${one.domain} now answers a permanent redirect to the same path on ${one.redirect_to}.`
|
|
6027
|
+
);
|
|
6028
|
+
return;
|
|
6029
|
+
}
|
|
6001
6030
|
if (sub === "add" || sub === "verify" || sub === "remove" || sub === "rm") {
|
|
6002
6031
|
if (!arg) throw new Error(`usage: vibiz domains ${sub} <domain>`);
|
|
6003
6032
|
if (sub === "add") {
|
|
@@ -6018,7 +6047,7 @@ ${link.url}`
|
|
|
6018
6047
|
}
|
|
6019
6048
|
if (sub)
|
|
6020
6049
|
throw new Error(
|
|
6021
|
-
"usage: vibiz domains [add | verify | remove | search | buy | owned | use | move | point | records | renew | auto-renew | transfer-code | owner]"
|
|
6050
|
+
"usage: vibiz domains [add | verify | remove | redirect | search | buy | owned | use | move | point | records | renew | auto-renew | transfer-code | owner]"
|
|
6022
6051
|
);
|
|
6023
6052
|
print(await d.list(id));
|
|
6024
6053
|
return;
|
|
@@ -6246,7 +6275,7 @@ ${await oneKeyLines(vibiz2, id)}`);
|
|
|
6246
6275
|
}
|
|
6247
6276
|
const key = io.env.VIBIZ_APP_KEY;
|
|
6248
6277
|
if (!key) throw new Error("vibiz env pull needs VIBIZ_APP_KEY (the app\u2019s own key).");
|
|
6249
|
-
const base = (io.env.VIBIZ_API_URL ??
|
|
6278
|
+
const base = (io.env.VIBIZ_API_URL ?? DEFAULT_API_URL).replace(/\/$/, "");
|
|
6250
6279
|
const res = await fetch(`${base}/v1/app/env?format=${format2}`, {
|
|
6251
6280
|
headers: { authorization: `Bearer ${key}` }
|
|
6252
6281
|
});
|
|
@@ -6941,7 +6970,7 @@ Store the key now: it is not shown again.`
|
|
|
6941
6970
|
return;
|
|
6942
6971
|
}
|
|
6943
6972
|
case "docs": {
|
|
6944
|
-
const { DOC_TOPICS, DOCS } = await import("./src-
|
|
6973
|
+
const { DOC_TOPICS, DOCS } = await import("./src-DCZC2YTT.js");
|
|
6945
6974
|
const topic = positionals[0];
|
|
6946
6975
|
if (!topic || !DOC_TOPICS.includes(topic)) {
|
|
6947
6976
|
for (const t of DOC_TOPICS) io.log(` vibiz docs ${t.padEnd(13)} ${DOCS[t].title}`);
|
|
@@ -6966,7 +6995,7 @@ ${DOCS[topic].body}`);
|
|
|
6966
6995
|
if (positionals[0])
|
|
6967
6996
|
throw new Error('usage: vibiz mcp (serve over stdio) | vibiz mcp add --clients "<client>"');
|
|
6968
6997
|
io.local();
|
|
6969
|
-
const { serveStdio } = await import("./src-
|
|
6998
|
+
const { serveStdio } = await import("./src-DCZC2YTT.js");
|
|
6970
6999
|
await serveStdio({ version: cliVersion() });
|
|
6971
7000
|
return;
|
|
6972
7001
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibiz/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.17",
|
|
4
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",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"deploy",
|
|
10
10
|
"hosting"
|
|
11
11
|
],
|
|
12
|
-
"homepage": "https://
|
|
12
|
+
"homepage": "https://thelastapi.dev/docs",
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
15
|
"url": "git+https://github.com/Vibiz-ai/vibiz-stack.git",
|