@vibedhost/cli 1.0.5 → 1.0.7
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/index.js +99 -17
- package/package.json +1 -1
- package/src/index.ts +103 -17
package/dist/index.js
CHANGED
|
@@ -76,7 +76,7 @@ Commands:
|
|
|
76
76
|
logout Disconnect active account credentials from this machine
|
|
77
77
|
whoami Display authenticated account and workspace inventory
|
|
78
78
|
token Display authenticated MCP API token and client configuration
|
|
79
|
-
app <create|list>
|
|
79
|
+
app <create|list|status> Launch and inspect 1-Click catalog applications (WordPress, n8n, Ghost, etc.)
|
|
80
80
|
deploy [dir] Package and deploy local project to dedicated workspace
|
|
81
81
|
status [app] Check real-time application deployment and routing status
|
|
82
82
|
logs [app] Stream live application logs or container build output
|
|
@@ -1017,6 +1017,14 @@ async function handleApp() {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
const subCommand = args[1] || "list";
|
|
1019
1019
|
const projectConfig = (0, utils_1.readProjectConfig)();
|
|
1020
|
+
// 0. APP STATUS
|
|
1021
|
+
if (subCommand === "status") {
|
|
1022
|
+
if (args[2]) {
|
|
1023
|
+
args[1] = args[2];
|
|
1024
|
+
}
|
|
1025
|
+
await handleStatus();
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1020
1028
|
// 1. APP LIST
|
|
1021
1029
|
if (subCommand === "list") {
|
|
1022
1030
|
try {
|
|
@@ -1081,6 +1089,9 @@ async function handleApp() {
|
|
|
1081
1089
|
console.log(" [8] Umami (Privacy Analytics + Postgres)");
|
|
1082
1090
|
console.log(" [9] MeiliSearch (High-Speed Full-Text Search)");
|
|
1083
1091
|
console.log(" [10] Qdrant (Vector AI Database)");
|
|
1092
|
+
console.log(" [11] ChromaDB (AI Vector Embeddings)");
|
|
1093
|
+
console.log(" [12] Adminer (Database Web Manager GUI)");
|
|
1094
|
+
console.log(" [13] pgweb (PostgreSQL Web GUI)");
|
|
1084
1095
|
const chosen = await (0, utils_1.askQuestion)("Enter number", "1");
|
|
1085
1096
|
const map = {
|
|
1086
1097
|
"1": "wordpress",
|
|
@@ -1092,7 +1103,10 @@ async function handleApp() {
|
|
|
1092
1103
|
"7": "uptime-kuma",
|
|
1093
1104
|
"8": "umami",
|
|
1094
1105
|
"9": "meilisearch",
|
|
1095
|
-
"10": "qdrant"
|
|
1106
|
+
"10": "qdrant",
|
|
1107
|
+
"11": "chromadb",
|
|
1108
|
+
"12": "adminer",
|
|
1109
|
+
"13": "pgweb"
|
|
1096
1110
|
};
|
|
1097
1111
|
explicitCatalog = map[chosen] || "wordpress";
|
|
1098
1112
|
}
|
|
@@ -1118,33 +1132,101 @@ async function handleApp() {
|
|
|
1118
1132
|
data = JSON.parse(rawText);
|
|
1119
1133
|
}
|
|
1120
1134
|
catch {
|
|
1121
|
-
throw new Error(
|
|
1135
|
+
throw new Error(`Gateway returned unexpected response (${res.status}): ${rawText.slice(0, 150)}`);
|
|
1122
1136
|
}
|
|
1123
1137
|
if (!res.ok || !data.success) {
|
|
1124
1138
|
console.error(`Launch error: ${data.error || "Failed to launch catalog application."}`);
|
|
1125
1139
|
process.exit(1);
|
|
1126
1140
|
}
|
|
1127
|
-
console.log(
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1141
|
+
console.log("Building application container in background...");
|
|
1142
|
+
// Progressive status polling loop (up to 90 seconds)
|
|
1143
|
+
const startTime = Date.now();
|
|
1144
|
+
let isLive = false;
|
|
1145
|
+
let isFailed = false;
|
|
1146
|
+
const finalAppName = data.name || appName;
|
|
1147
|
+
while (!isLive && !isFailed && Date.now() - startTime < 90000) {
|
|
1148
|
+
await new Promise((r) => setTimeout(r, 2500));
|
|
1149
|
+
const elapsedSec = Math.round((Date.now() - startTime) / 1000);
|
|
1150
|
+
try {
|
|
1151
|
+
const checkRes = await fetch(`${utils_1.API_BASE_URL}/api/cli/logs?appName=${encodeURIComponent(finalAppName)}`, { headers: { Authorization: `Bearer ${config.token}` } });
|
|
1152
|
+
const checkData = (await checkRes.json());
|
|
1153
|
+
if (checkData.status === "active") {
|
|
1154
|
+
isLive = true;
|
|
1155
|
+
break;
|
|
1156
|
+
}
|
|
1157
|
+
else if (checkData.status === "failed") {
|
|
1158
|
+
isFailed = true;
|
|
1159
|
+
break;
|
|
1160
|
+
}
|
|
1161
|
+
else {
|
|
1162
|
+
process.stdout.write(`\rBuilding application container in background... (${elapsedSec}s)`);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
catch { }
|
|
1135
1166
|
}
|
|
1136
|
-
|
|
1137
|
-
|
|
1167
|
+
process.stdout.write("\r" + " ".repeat(65) + "\r");
|
|
1168
|
+
if (isLive) {
|
|
1169
|
+
console.log(`
|
|
1170
|
+
Application Ready & Online!
|
|
1171
|
+
------------------------------------------------------------
|
|
1172
|
+
Service Name: ${data.name}
|
|
1173
|
+
Catalog Type: ${data.catalogKey}
|
|
1174
|
+
Workspace: ${data.workspaceName}
|
|
1175
|
+
Status: Active
|
|
1176
|
+
|
|
1177
|
+
Live URL: https://${data.domain}`);
|
|
1178
|
+
if (data.adminPath) {
|
|
1179
|
+
console.log(`Admin URL: https://${data.domain}${data.adminPath}`);
|
|
1180
|
+
}
|
|
1181
|
+
if (data.defaultUser) {
|
|
1182
|
+
console.log(`Admin User: ${data.defaultUser}`);
|
|
1183
|
+
}
|
|
1184
|
+
if (data.defaultPassword) {
|
|
1185
|
+
console.log(`Admin Pass: ${data.defaultPassword}`);
|
|
1186
|
+
}
|
|
1187
|
+
console.log(`------------------------------------------------------------\n`);
|
|
1188
|
+
}
|
|
1189
|
+
else if (isFailed) {
|
|
1190
|
+
console.error(`
|
|
1191
|
+
Application Launch Unsuccessful
|
|
1192
|
+
------------------------------------------------------------
|
|
1193
|
+
Service: ${finalAppName}
|
|
1194
|
+
Workspace: ${data.workspaceName}
|
|
1195
|
+
Status: Failed
|
|
1196
|
+
|
|
1197
|
+
Launch unsuccessful.
|
|
1198
|
+
Run 'vibed logs ${finalAppName}' to view container error logs.
|
|
1199
|
+
------------------------------------------------------------
|
|
1200
|
+
`);
|
|
1201
|
+
process.exit(1);
|
|
1202
|
+
}
|
|
1203
|
+
else {
|
|
1204
|
+
console.log(`
|
|
1205
|
+
Application Launch in Progress
|
|
1206
|
+
------------------------------------------------------------
|
|
1207
|
+
Service Name: ${data.name}
|
|
1208
|
+
Catalog Type: ${data.catalogKey}
|
|
1209
|
+
Workspace: ${data.workspaceName}
|
|
1210
|
+
Status: Building
|
|
1211
|
+
|
|
1212
|
+
Your application is continuing to initialize in the background.
|
|
1213
|
+
Run 'vibed status ${finalAppName}' to check real-time status.
|
|
1214
|
+
Run 'vibed logs ${finalAppName}' to view live startup logs.`);
|
|
1215
|
+
if (data.defaultUser) {
|
|
1216
|
+
console.log(`Admin User: ${data.defaultUser}`);
|
|
1217
|
+
}
|
|
1218
|
+
if (data.defaultPassword) {
|
|
1219
|
+
console.log(`Admin Pass: ${data.defaultPassword}`);
|
|
1220
|
+
}
|
|
1221
|
+
console.log(`------------------------------------------------------------\n`);
|
|
1138
1222
|
}
|
|
1139
|
-
console.log("------------------------------------------------------------");
|
|
1140
|
-
console.log(`Check live build and startup logs with: vibed logs ${data.name}\n`);
|
|
1141
1223
|
}
|
|
1142
1224
|
catch (err) {
|
|
1143
|
-
console.error(
|
|
1225
|
+
console.error(`\nConnection error: ${err.message}`);
|
|
1144
1226
|
}
|
|
1145
1227
|
return;
|
|
1146
1228
|
}
|
|
1147
|
-
console.log("Usage: vibed app [create|list] (or npx @vibedhost/cli app [create|list])");
|
|
1229
|
+
console.log("Usage: vibed app [create|list|status] (or npx @vibedhost/cli app [create|list|status])");
|
|
1148
1230
|
}
|
|
1149
1231
|
main().catch((err) => {
|
|
1150
1232
|
console.error(`Execution error: ${err.message}`);
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -89,7 +89,7 @@ Commands:
|
|
|
89
89
|
logout Disconnect active account credentials from this machine
|
|
90
90
|
whoami Display authenticated account and workspace inventory
|
|
91
91
|
token Display authenticated MCP API token and client configuration
|
|
92
|
-
app <create|list>
|
|
92
|
+
app <create|list|status> Launch and inspect 1-Click catalog applications (WordPress, n8n, Ghost, etc.)
|
|
93
93
|
deploy [dir] Package and deploy local project to dedicated workspace
|
|
94
94
|
status [app] Check real-time application deployment and routing status
|
|
95
95
|
logs [app] Stream live application logs or container build output
|
|
@@ -1143,6 +1143,15 @@ async function handleApp() {
|
|
|
1143
1143
|
const subCommand = args[1] || "list";
|
|
1144
1144
|
const projectConfig = readProjectConfig();
|
|
1145
1145
|
|
|
1146
|
+
// 0. APP STATUS
|
|
1147
|
+
if (subCommand === "status") {
|
|
1148
|
+
if (args[2]) {
|
|
1149
|
+
args[1] = args[2];
|
|
1150
|
+
}
|
|
1151
|
+
await handleStatus();
|
|
1152
|
+
return;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1146
1155
|
// 1. APP LIST
|
|
1147
1156
|
if (subCommand === "list") {
|
|
1148
1157
|
try {
|
|
@@ -1211,6 +1220,9 @@ async function handleApp() {
|
|
|
1211
1220
|
console.log(" [8] Umami (Privacy Analytics + Postgres)");
|
|
1212
1221
|
console.log(" [9] MeiliSearch (High-Speed Full-Text Search)");
|
|
1213
1222
|
console.log(" [10] Qdrant (Vector AI Database)");
|
|
1223
|
+
console.log(" [11] ChromaDB (AI Vector Embeddings)");
|
|
1224
|
+
console.log(" [12] Adminer (Database Web Manager GUI)");
|
|
1225
|
+
console.log(" [13] pgweb (PostgreSQL Web GUI)");
|
|
1214
1226
|
const chosen = await askQuestion("Enter number", "1");
|
|
1215
1227
|
const map: Record<string, string> = {
|
|
1216
1228
|
"1": "wordpress",
|
|
@@ -1222,7 +1234,10 @@ async function handleApp() {
|
|
|
1222
1234
|
"7": "uptime-kuma",
|
|
1223
1235
|
"8": "umami",
|
|
1224
1236
|
"9": "meilisearch",
|
|
1225
|
-
"10": "qdrant"
|
|
1237
|
+
"10": "qdrant",
|
|
1238
|
+
"11": "chromadb",
|
|
1239
|
+
"12": "adminer",
|
|
1240
|
+
"13": "pgweb"
|
|
1226
1241
|
};
|
|
1227
1242
|
explicitCatalog = map[chosen] || "wordpress";
|
|
1228
1243
|
}
|
|
@@ -1250,7 +1265,7 @@ async function handleApp() {
|
|
|
1250
1265
|
try {
|
|
1251
1266
|
data = JSON.parse(rawText);
|
|
1252
1267
|
} catch {
|
|
1253
|
-
throw new Error(
|
|
1268
|
+
throw new Error(`Gateway returned unexpected response (${res.status}): ${rawText.slice(0, 150)}`);
|
|
1254
1269
|
}
|
|
1255
1270
|
|
|
1256
1271
|
if (!res.ok || !data.success) {
|
|
@@ -1258,27 +1273,98 @@ async function handleApp() {
|
|
|
1258
1273
|
process.exit(1);
|
|
1259
1274
|
}
|
|
1260
1275
|
|
|
1261
|
-
console.log(
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1276
|
+
console.log("Building application container in background...");
|
|
1277
|
+
|
|
1278
|
+
// Progressive status polling loop (up to 90 seconds)
|
|
1279
|
+
const startTime = Date.now();
|
|
1280
|
+
let isLive = false;
|
|
1281
|
+
let isFailed = false;
|
|
1282
|
+
const finalAppName = data.name || appName;
|
|
1283
|
+
|
|
1284
|
+
while (!isLive && !isFailed && Date.now() - startTime < 90000) {
|
|
1285
|
+
await new Promise((r) => setTimeout(r, 2500));
|
|
1286
|
+
const elapsedSec = Math.round((Date.now() - startTime) / 1000);
|
|
1287
|
+
try {
|
|
1288
|
+
const checkRes = await fetch(
|
|
1289
|
+
`${API_BASE_URL}/api/cli/logs?appName=${encodeURIComponent(finalAppName)}`,
|
|
1290
|
+
{ headers: { Authorization: `Bearer ${config.token}` } }
|
|
1291
|
+
);
|
|
1292
|
+
const checkData = (await checkRes.json()) as any;
|
|
1293
|
+
|
|
1294
|
+
if (checkData.status === "active") {
|
|
1295
|
+
isLive = true;
|
|
1296
|
+
break;
|
|
1297
|
+
} else if (checkData.status === "failed") {
|
|
1298
|
+
isFailed = true;
|
|
1299
|
+
break;
|
|
1300
|
+
} else {
|
|
1301
|
+
process.stdout.write(`\rBuilding application container in background... (${elapsedSec}s)`);
|
|
1302
|
+
}
|
|
1303
|
+
} catch {}
|
|
1269
1304
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1305
|
+
|
|
1306
|
+
process.stdout.write("\r" + " ".repeat(65) + "\r");
|
|
1307
|
+
|
|
1308
|
+
if (isLive) {
|
|
1309
|
+
console.log(`
|
|
1310
|
+
Application Ready & Online!
|
|
1311
|
+
------------------------------------------------------------
|
|
1312
|
+
Service Name: ${data.name}
|
|
1313
|
+
Catalog Type: ${data.catalogKey}
|
|
1314
|
+
Workspace: ${data.workspaceName}
|
|
1315
|
+
Status: Active
|
|
1316
|
+
|
|
1317
|
+
Live URL: https://${data.domain}`);
|
|
1318
|
+
if (data.adminPath) {
|
|
1319
|
+
console.log(`Admin URL: https://${data.domain}${data.adminPath}`);
|
|
1320
|
+
}
|
|
1321
|
+
if (data.defaultUser) {
|
|
1322
|
+
console.log(`Admin User: ${data.defaultUser}`);
|
|
1323
|
+
}
|
|
1324
|
+
if (data.defaultPassword) {
|
|
1325
|
+
console.log(`Admin Pass: ${data.defaultPassword}`);
|
|
1326
|
+
}
|
|
1327
|
+
console.log(`------------------------------------------------------------\n`);
|
|
1328
|
+
} else if (isFailed) {
|
|
1329
|
+
console.error(`
|
|
1330
|
+
Application Launch Unsuccessful
|
|
1331
|
+
------------------------------------------------------------
|
|
1332
|
+
Service: ${finalAppName}
|
|
1333
|
+
Workspace: ${data.workspaceName}
|
|
1334
|
+
Status: Failed
|
|
1335
|
+
|
|
1336
|
+
Launch unsuccessful.
|
|
1337
|
+
Run 'vibed logs ${finalAppName}' to view container error logs.
|
|
1338
|
+
------------------------------------------------------------
|
|
1339
|
+
`);
|
|
1340
|
+
process.exit(1);
|
|
1341
|
+
} else {
|
|
1342
|
+
console.log(`
|
|
1343
|
+
Application Launch in Progress
|
|
1344
|
+
------------------------------------------------------------
|
|
1345
|
+
Service Name: ${data.name}
|
|
1346
|
+
Catalog Type: ${data.catalogKey}
|
|
1347
|
+
Workspace: ${data.workspaceName}
|
|
1348
|
+
Status: Building
|
|
1349
|
+
|
|
1350
|
+
Your application is continuing to initialize in the background.
|
|
1351
|
+
Run 'vibed status ${finalAppName}' to check real-time status.
|
|
1352
|
+
Run 'vibed logs ${finalAppName}' to view live startup logs.`);
|
|
1353
|
+
if (data.defaultUser) {
|
|
1354
|
+
console.log(`Admin User: ${data.defaultUser}`);
|
|
1355
|
+
}
|
|
1356
|
+
if (data.defaultPassword) {
|
|
1357
|
+
console.log(`Admin Pass: ${data.defaultPassword}`);
|
|
1358
|
+
}
|
|
1359
|
+
console.log(`------------------------------------------------------------\n`);
|
|
1272
1360
|
}
|
|
1273
|
-
console.log("------------------------------------------------------------");
|
|
1274
|
-
console.log(`Check live build and startup logs with: vibed logs ${data.name}\n`);
|
|
1275
1361
|
} catch (err: any) {
|
|
1276
|
-
console.error(
|
|
1362
|
+
console.error(`\nConnection error: ${err.message}`);
|
|
1277
1363
|
}
|
|
1278
1364
|
return;
|
|
1279
1365
|
}
|
|
1280
1366
|
|
|
1281
|
-
console.log("Usage: vibed app [create|list] (or npx @vibedhost/cli app [create|list])");
|
|
1367
|
+
console.log("Usage: vibed app [create|list|status] (or npx @vibedhost/cli app [create|list|status])");
|
|
1282
1368
|
}
|
|
1283
1369
|
|
|
1284
1370
|
main().catch((err) => {
|