@pmate/cli 0.20.4 → 0.20.5

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.d.ts CHANGED
@@ -600,6 +600,7 @@ type ServiceCommandArgs = {
600
600
  page: number;
601
601
  history: boolean;
602
602
  search?: string;
603
+ follow: boolean;
603
604
  };
604
605
  type VercelProjectsCommandArgs = {
605
606
  type: Command.Vercel;
package/dist/index.js CHANGED
@@ -12712,7 +12712,7 @@ __export(index_exports, {
12712
12712
  module.exports = __toCommonJS(index_exports);
12713
12713
  var import_node_fs16 = require("fs");
12714
12714
  var import_node_path21 = __toESM(require("path"));
12715
- var import_chalk3 = __toESM(require("chalk"));
12715
+ var import_chalk4 = __toESM(require("chalk"));
12716
12716
 
12717
12717
  // src/cli.ts
12718
12718
  var import_chalk = __toESM(require("chalk"));
@@ -20065,6 +20065,8 @@ var import_node_fs14 = require("fs");
20065
20065
  var import_node_os6 = __toESM(require("os"));
20066
20066
  var import_node_path19 = __toESM(require("path"));
20067
20067
  var import_node_child_process9 = require("child_process");
20068
+ var import_node_readline = require("readline");
20069
+ var import_chalk3 = __toESM(require("chalk"));
20068
20070
  var ServiceRuntimeRunner = class {
20069
20071
  async deploy(service, options = {}) {
20070
20072
  switch (service.runtimeType) {
@@ -20117,6 +20119,61 @@ var ServiceRuntimeRunner = class {
20117
20119
  ui.title(`Logs for ${namespace}/${appName}`);
20118
20120
  ui.info("Source", { mode: options.history ? "history" : "online" });
20119
20121
  this.renderPage(page);
20122
+ if (options.follow) {
20123
+ await this.followLogs(namespace, appName, {
20124
+ page: options.page ?? 0,
20125
+ history: options.history ?? false,
20126
+ search: options.search,
20127
+ seedItems: page.data
20128
+ });
20129
+ }
20130
+ }
20131
+ async followLogs(namespace, appName, options) {
20132
+ const recent = [...options.seedItems];
20133
+ const interactive = this.createFollowConsole((state) => {
20134
+ this.renderFollowSnapshot(recent, state);
20135
+ });
20136
+ let running = true;
20137
+ interactive?.rl.on("close", () => {
20138
+ running = false;
20139
+ });
20140
+ const seen = new Set(options.seedItems.map((item) => item.hash));
20141
+ ui.info(
20142
+ "Follow",
20143
+ interactive ? "enabled (poll every 2s, Ctrl+C to stop, /help for filters)" : "enabled (poll every 2s, Ctrl+C to stop)"
20144
+ );
20145
+ interactive?.renderPrompt();
20146
+ while (running) {
20147
+ await this.sleep(2e3);
20148
+ let page;
20149
+ try {
20150
+ page = await this.fetchLogPage(namespace, appName, {
20151
+ page: options.page,
20152
+ history: options.history,
20153
+ search: options.search
20154
+ });
20155
+ } catch (error) {
20156
+ const message = error instanceof Error ? error.message : String(error);
20157
+ ui.warn("Follow fetch failed", { message });
20158
+ continue;
20159
+ }
20160
+ const newItems = page.data.filter((item) => !seen.has(item.hash));
20161
+ if (newItems.length === 0) {
20162
+ continue;
20163
+ }
20164
+ const ordered = [...newItems].reverse();
20165
+ for (const item of ordered) {
20166
+ seen.add(item.hash);
20167
+ recent.unshift(item);
20168
+ if (recent.length > 200) {
20169
+ recent.pop();
20170
+ }
20171
+ if (this.matchFollowFilter(item, interactive?.state)) {
20172
+ ui.plain(this.renderLogLine(item));
20173
+ interactive?.renderPrompt();
20174
+ }
20175
+ }
20176
+ }
20120
20177
  }
20121
20178
  getDeploy(service) {
20122
20179
  return service.deploy ?? {};
@@ -20381,6 +20438,14 @@ var ServiceRuntimeRunner = class {
20381
20438
  headers: { Accept: "application/json" }
20382
20439
  });
20383
20440
  const payload = await response.json();
20441
+ if (response.status === 404 && /resource not found/i.test(payload.message || "")) {
20442
+ return {
20443
+ page: options.page,
20444
+ totalPage: 0,
20445
+ pageSize: 100,
20446
+ data: []
20447
+ };
20448
+ }
20384
20449
  if (!response.ok || !payload.success || !payload.data) {
20385
20450
  throw new Error(payload.message || `Log request failed: ${response.status}`);
20386
20451
  }
@@ -20394,10 +20459,392 @@ var ServiceRuntimeRunner = class {
20394
20459
  items: page.data.length
20395
20460
  });
20396
20461
  for (const item of page.data) {
20397
- const ts = new Date(item.time).toISOString();
20398
- ui.plain(`${ts} [${item.type}] ${JSON.stringify(item.data)} #${item.hash}`);
20462
+ ui.plain(this.renderLogLine(item));
20463
+ }
20464
+ }
20465
+ renderLogLine(item) {
20466
+ const ts = import_chalk3.default.white(new Date(item.time).toISOString());
20467
+ const resolvedLevel = this.resolveItemLevel(item);
20468
+ const isErrorLike = resolvedLevel === "error" || /error|failed/i.test(item.type);
20469
+ const type = isErrorLike ? import_chalk3.default.bold.red(`[${item.type}]`) : import_chalk3.default.bold.blue(`[${item.type}]`);
20470
+ const level = resolvedLevel ? `${isErrorLike ? import_chalk3.default.bold.red(resolvedLevel.toUpperCase()) : import_chalk3.default.bold.yellow(resolvedLevel.toUpperCase())} ` : "";
20471
+ const data = this.formatLogData(item.data);
20472
+ const hash = import_chalk3.default.gray(`#${item.hash}`);
20473
+ return `${ts} ${level}${type} ${data} ${hash}`;
20474
+ }
20475
+ formatLogData(value) {
20476
+ if (value === null || typeof value !== "object" || Array.isArray(value)) {
20477
+ return import_chalk3.default.gray(this.formatAnyValue(value));
20478
+ }
20479
+ const objectValue = value;
20480
+ const entries = Object.entries(objectValue);
20481
+ if (entries.length === 0) {
20482
+ return "{}";
20483
+ }
20484
+ const body = entries.map(([key, item]) => `${import_chalk3.default.bold.white(key)}: ${import_chalk3.default.gray(this.formatAnyValue(item))}`).join(", ");
20485
+ return `{ ${body} }`;
20486
+ }
20487
+ formatAnyValue(value) {
20488
+ if (typeof value === "string") {
20489
+ return value;
20490
+ }
20491
+ if (typeof value === "number" || typeof value === "boolean" || value === null) {
20492
+ return String(value);
20493
+ }
20494
+ try {
20495
+ return JSON.stringify(value);
20496
+ } catch {
20497
+ return String(value);
20399
20498
  }
20400
20499
  }
20500
+ createFollowConsole(onFilterChanged) {
20501
+ if (!process.stdin.isTTY || !process.stdout.isTTY) {
20502
+ return void 0;
20503
+ }
20504
+ const state = {};
20505
+ const rl = (0, import_node_readline.createInterface)({
20506
+ input: process.stdin,
20507
+ output: process.stdout,
20508
+ terminal: true
20509
+ });
20510
+ const renderPrompt = () => {
20511
+ const hints = [];
20512
+ if (state.search) hints.push(`search=${state.search}`);
20513
+ if (state.type) hints.push(`type=${state.type}`);
20514
+ if (state.level) hints.push(`level=${state.level}`);
20515
+ if (state.whereExpr) hints.push(`where=${state.whereExpr}`);
20516
+ const suffix = hints.length ? ` (${hints.join(", ")})` : "";
20517
+ rl.setPrompt(import_chalk3.default.gray(`filter>${suffix} `));
20518
+ rl.prompt();
20519
+ };
20520
+ rl.on("line", (raw) => {
20521
+ const line = raw.trim();
20522
+ if (!line) {
20523
+ renderPrompt();
20524
+ return;
20525
+ }
20526
+ if (line === "/help") {
20527
+ ui.info("Follow commands", [
20528
+ "/search <text> set keyword filter on event + payload",
20529
+ "/type <event> set event type filter",
20530
+ "/level <lvl> set level filter (debug|info|warn|error)",
20531
+ "<text> wildcard match on event + payload (equivalent to *text*)",
20532
+ "<expr> set JSON field filter (supports &&, ||, ())",
20533
+ " e.g. datamode=prompt && (type=task_end || level=error)",
20534
+ "/clear clear all filters",
20535
+ "/quit exit follow mode"
20536
+ ]);
20537
+ renderPrompt();
20538
+ return;
20539
+ }
20540
+ if (line === "/clear") {
20541
+ delete state.search;
20542
+ delete state.type;
20543
+ delete state.level;
20544
+ delete state.whereExpr;
20545
+ delete state.whereAst;
20546
+ ui.success("Filters cleared");
20547
+ onFilterChanged?.(state);
20548
+ renderPrompt();
20549
+ return;
20550
+ }
20551
+ if (line === "/quit" || line === "/exit") {
20552
+ rl.close();
20553
+ return;
20554
+ }
20555
+ if (line.startsWith("/search ")) {
20556
+ const value = line.slice("/search ".length).trim();
20557
+ state.search = value || void 0;
20558
+ ui.success("Updated search filter", { search: state.search });
20559
+ onFilterChanged?.(state);
20560
+ renderPrompt();
20561
+ return;
20562
+ }
20563
+ if (line.startsWith("/type ")) {
20564
+ const value = line.slice("/type ".length).trim();
20565
+ state.type = value || void 0;
20566
+ ui.success("Updated type filter", { type: state.type });
20567
+ onFilterChanged?.(state);
20568
+ renderPrompt();
20569
+ return;
20570
+ }
20571
+ if (line.startsWith("/level ")) {
20572
+ const value = line.slice("/level ".length).trim().toLowerCase();
20573
+ if (value !== "debug" && value !== "info" && value !== "warn" && value !== "error") {
20574
+ ui.warn("Invalid level", { value, allowed: ["debug", "info", "warn", "error"] });
20575
+ renderPrompt();
20576
+ return;
20577
+ }
20578
+ state.level = value;
20579
+ ui.success("Updated level filter", { level: state.level });
20580
+ onFilterChanged?.(state);
20581
+ renderPrompt();
20582
+ return;
20583
+ }
20584
+ if (!line.startsWith("/")) {
20585
+ if (this.isPlainWildcardInput(line)) {
20586
+ state.search = line;
20587
+ delete state.whereExpr;
20588
+ delete state.whereAst;
20589
+ ui.success("Updated wildcard filter", { search: state.search });
20590
+ onFilterChanged?.(state);
20591
+ renderPrompt();
20592
+ return;
20593
+ }
20594
+ try {
20595
+ const parsed = this.parseWhereExpression(line);
20596
+ state.whereExpr = line;
20597
+ state.whereAst = parsed;
20598
+ ui.success("Updated where filter", { where: state.whereExpr });
20599
+ onFilterChanged?.(state);
20600
+ } catch {
20601
+ ui.warn("Unknown follow command", { command: line, hint: "Type /help" });
20602
+ }
20603
+ renderPrompt();
20604
+ return;
20605
+ }
20606
+ ui.warn("Unknown follow command", { command: line, hint: "Type /help" });
20607
+ renderPrompt();
20608
+ });
20609
+ return { rl, state, renderPrompt };
20610
+ }
20611
+ matchFollowFilter(item, state) {
20612
+ if (!state) return true;
20613
+ if (state.type && !item.type.includes(state.type)) {
20614
+ return false;
20615
+ }
20616
+ if (state.level && this.resolveItemLevel(item) !== state.level) {
20617
+ return false;
20618
+ }
20619
+ if (state.search) {
20620
+ const haystack = `${item.type} ${JSON.stringify(item.data)}`;
20621
+ if (!haystack.toLowerCase().includes(state.search.toLowerCase())) {
20622
+ return false;
20623
+ }
20624
+ }
20625
+ if (state.whereAst && !this.evaluateWhereNode(item, state.whereAst)) {
20626
+ return false;
20627
+ }
20628
+ return true;
20629
+ }
20630
+ renderFollowSnapshot(recent, state) {
20631
+ const matched = recent.filter((item) => this.matchFollowFilter(item, state));
20632
+ ui.info("Filter snapshot", {
20633
+ matched: matched.length,
20634
+ recent: recent.length,
20635
+ shown: Math.min(matched.length, 20)
20636
+ });
20637
+ const toShow = matched.slice(0, 20);
20638
+ for (const item of toShow.reverse()) {
20639
+ ui.plain(this.renderLogLine(item));
20640
+ }
20641
+ }
20642
+ resolveItemLevel(item) {
20643
+ if (item.level) return item.level;
20644
+ if (!item.data || typeof item.data !== "object" || Array.isArray(item.data)) {
20645
+ return void 0;
20646
+ }
20647
+ const level = item.data.level;
20648
+ if (level === "debug" || level === "info" || level === "warn" || level === "error") {
20649
+ return level;
20650
+ }
20651
+ return void 0;
20652
+ }
20653
+ parseWhereExpression(expr) {
20654
+ const tokens = this.tokenizeWhere(expr);
20655
+ if (tokens.length === 0) {
20656
+ throw new Error("Expression is empty");
20657
+ }
20658
+ let idx = 0;
20659
+ const parsePrimary = () => {
20660
+ const token = tokens[idx];
20661
+ if (!token) {
20662
+ throw new Error("Unexpected end of expression");
20663
+ }
20664
+ if (token.kind === "lparen") {
20665
+ idx += 1;
20666
+ const node = parseOr();
20667
+ const closing = tokens[idx];
20668
+ if (!closing || closing.kind !== "rparen") {
20669
+ throw new Error("Missing closing ')' ");
20670
+ }
20671
+ idx += 1;
20672
+ return node;
20673
+ }
20674
+ if (token.kind !== "ident") {
20675
+ throw new Error(`Expected field name, got "${token.raw}"`);
20676
+ }
20677
+ const rawKey = token.value;
20678
+ idx += 1;
20679
+ const op = tokens[idx];
20680
+ if (!op || op.kind !== "eq") {
20681
+ throw new Error(`Expected "=" after "${rawKey}"`);
20682
+ }
20683
+ idx += 1;
20684
+ const valueToken = tokens[idx];
20685
+ if (!valueToken || valueToken.kind !== "ident" && valueToken.kind !== "quoted") {
20686
+ throw new Error(`Expected value after "${rawKey}="`);
20687
+ }
20688
+ idx += 1;
20689
+ return {
20690
+ kind: "clause",
20691
+ clause: {
20692
+ path: this.normalizeWhereKey(rawKey),
20693
+ expected: this.parseWhereValue(valueToken.value)
20694
+ }
20695
+ };
20696
+ };
20697
+ const parseAnd = () => {
20698
+ let node = parsePrimary();
20699
+ while (tokens[idx]?.kind === "and") {
20700
+ idx += 1;
20701
+ node = { kind: "and", left: node, right: parsePrimary() };
20702
+ }
20703
+ return node;
20704
+ };
20705
+ const parseOr = () => {
20706
+ let node = parseAnd();
20707
+ while (tokens[idx]?.kind === "or") {
20708
+ idx += 1;
20709
+ node = { kind: "or", left: node, right: parseAnd() };
20710
+ }
20711
+ return node;
20712
+ };
20713
+ const ast = parseOr();
20714
+ if (idx < tokens.length) {
20715
+ throw new Error(`Unexpected token "${tokens[idx].raw}"`);
20716
+ }
20717
+ return ast;
20718
+ }
20719
+ normalizeWhereKey(key) {
20720
+ const raw = key.trim();
20721
+ if (raw === "datamode") return "data.mode";
20722
+ if (raw === "type") return "type";
20723
+ if (raw === "level") return "level";
20724
+ if (raw === "taskid") return "data.taskId";
20725
+ return raw;
20726
+ }
20727
+ parseWhereValue(raw) {
20728
+ const trimmed = raw.trim();
20729
+ if (trimmed === "true") return true;
20730
+ if (trimmed === "false") return false;
20731
+ if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
20732
+ return Number(trimmed);
20733
+ }
20734
+ if (trimmed.startsWith('"') && trimmed.endsWith('"') || trimmed.startsWith("'") && trimmed.endsWith("'")) {
20735
+ return trimmed.slice(1, -1);
20736
+ }
20737
+ return trimmed;
20738
+ }
20739
+ tokenizeWhere(expr) {
20740
+ const tokens = [];
20741
+ let i = 0;
20742
+ const input = expr.trim();
20743
+ while (i < input.length) {
20744
+ const ch = input[i];
20745
+ if (/\s/.test(ch)) {
20746
+ i += 1;
20747
+ continue;
20748
+ }
20749
+ if (ch === "(") {
20750
+ tokens.push({ kind: "lparen", raw: ch });
20751
+ i += 1;
20752
+ continue;
20753
+ }
20754
+ if (ch === ")") {
20755
+ tokens.push({ kind: "rparen", raw: ch });
20756
+ i += 1;
20757
+ continue;
20758
+ }
20759
+ if (ch === "=") {
20760
+ tokens.push({ kind: "eq", raw: ch });
20761
+ i += 1;
20762
+ continue;
20763
+ }
20764
+ if (ch === "&" && input[i + 1] === "&") {
20765
+ tokens.push({ kind: "and", raw: "&&" });
20766
+ i += 2;
20767
+ continue;
20768
+ }
20769
+ if (ch === "|" && input[i + 1] === "|") {
20770
+ tokens.push({ kind: "or", raw: "||" });
20771
+ i += 2;
20772
+ continue;
20773
+ }
20774
+ if (ch === '"' || ch === "'") {
20775
+ const quote = ch;
20776
+ i += 1;
20777
+ let value = "";
20778
+ while (i < input.length && input[i] !== quote) {
20779
+ value += input[i];
20780
+ i += 1;
20781
+ }
20782
+ if (i >= input.length) {
20783
+ throw new Error("Unterminated quoted string");
20784
+ }
20785
+ i += 1;
20786
+ tokens.push({ kind: "quoted", raw: `${quote}${value}${quote}`, value });
20787
+ continue;
20788
+ }
20789
+ let raw = "";
20790
+ while (i < input.length) {
20791
+ const c = input[i];
20792
+ if (/\s/.test(c) || c === "(" || c === ")" || c === "=") break;
20793
+ if (c === "&" && input[i + 1] === "&" || c === "|" && input[i + 1] === "|") break;
20794
+ raw += c;
20795
+ i += 1;
20796
+ }
20797
+ if (!raw) {
20798
+ throw new Error(`Unexpected token near "${input.slice(i)}"`);
20799
+ }
20800
+ tokens.push({ kind: "ident", raw, value: raw });
20801
+ }
20802
+ return tokens;
20803
+ }
20804
+ readPathValue(source, pathExpr) {
20805
+ const path22 = pathExpr.split(".").map((segment) => segment.trim()).filter(Boolean);
20806
+ let cursor = source;
20807
+ for (const segment of path22) {
20808
+ if (!cursor || typeof cursor !== "object" || Array.isArray(cursor)) {
20809
+ return void 0;
20810
+ }
20811
+ cursor = cursor[segment];
20812
+ }
20813
+ return cursor;
20814
+ }
20815
+ equalsExpected(actual, expected) {
20816
+ if (actual === void 0) return false;
20817
+ if (typeof expected === "number") {
20818
+ if (typeof actual === "number") return actual === expected;
20819
+ if (typeof actual === "string" && /^-?\d+(\.\d+)?$/.test(actual.trim())) {
20820
+ return Number(actual) === expected;
20821
+ }
20822
+ return false;
20823
+ }
20824
+ if (typeof expected === "boolean") {
20825
+ if (typeof actual === "boolean") return actual === expected;
20826
+ if (typeof actual === "string") return actual.toLowerCase() === String(expected);
20827
+ return false;
20828
+ }
20829
+ if (typeof actual === "string") return actual === expected;
20830
+ if (typeof actual === "number" || typeof actual === "boolean") {
20831
+ return String(actual) === expected;
20832
+ }
20833
+ return false;
20834
+ }
20835
+ isPlainWildcardInput(input) {
20836
+ return !/[=()]/.test(input) && !input.includes("&&") && !input.includes("||");
20837
+ }
20838
+ evaluateWhereNode(item, node) {
20839
+ if (node.kind === "clause") {
20840
+ const actual = this.readPathValue(item, node.clause.path);
20841
+ return this.equalsExpected(actual, node.clause.expected);
20842
+ }
20843
+ if (node.kind === "and") {
20844
+ return this.evaluateWhereNode(item, node.left) && this.evaluateWhereNode(item, node.right);
20845
+ }
20846
+ return this.evaluateWhereNode(item, node.left) || this.evaluateWhereNode(item, node.right);
20847
+ }
20401
20848
  resolveTemplatePath(templateName) {
20402
20849
  const candidates = [
20403
20850
  import_node_path19.default.join(__dirname, "..", "templates", templateName),
@@ -20671,7 +21118,8 @@ var ServiceCommandHandler = class {
20671
21118
  await runtime.log(record, {
20672
21119
  page: args.page,
20673
21120
  history: args.history,
20674
- search: args.search
21121
+ search: args.search,
21122
+ follow: args.follow
20675
21123
  });
20676
21124
  return;
20677
21125
  }
@@ -21867,6 +22315,7 @@ function parseServiceArgs(tokens) {
21867
22315
  let page = 0;
21868
22316
  let history = false;
21869
22317
  let search;
22318
+ let follow = false;
21870
22319
  while (rest.length > 0) {
21871
22320
  const token = rest.shift();
21872
22321
  switch (token) {
@@ -21885,6 +22334,10 @@ function parseServiceArgs(tokens) {
21885
22334
  case "--search":
21886
22335
  search = requireValue5(rest, token);
21887
22336
  break;
22337
+ case "--follow":
22338
+ case "-f":
22339
+ follow = true;
22340
+ break;
21888
22341
  case "--json":
21889
22342
  json = true;
21890
22343
  break;
@@ -21896,7 +22349,7 @@ function parseServiceArgs(tokens) {
21896
22349
  const namespace = parsedRef.namespace;
21897
22350
  const name = parsedRef.objectId;
21898
22351
  if (action === "log") {
21899
- return { type: "service" /* Service */, action, namespace, name, baseUrl, json, page, history, search };
22352
+ return { type: "service" /* Service */, action, namespace, name, baseUrl, json, page, history, search, follow };
21900
22353
  }
21901
22354
  if (action === "deploy" || action === "init") {
21902
22355
  return { type: "service" /* Service */, action, namespace, name, cwd, baseUrl, json };
@@ -22249,137 +22702,137 @@ var pkg = JSON.parse(
22249
22702
  (0, import_node_fs16.readFileSync)(import_node_path21.default.resolve(__dirname, "..", "package.json"), "utf8")
22250
22703
  );
22251
22704
  var HELP_TEXT = [
22252
- import_chalk3.default.bold(`pmate v${pkg.version}`),
22705
+ import_chalk4.default.bold(`pmate v${pkg.version}`),
22253
22706
  "",
22254
- import_chalk3.default.bold("Usage:"),
22255
- ` ${import_chalk3.default.cyan("pmate")} ${import_chalk3.default.gray("[options]")}`,
22707
+ import_chalk4.default.bold("Usage:"),
22708
+ ` ${import_chalk4.default.cyan("pmate")} ${import_chalk4.default.gray("[options]")}`,
22256
22709
  "",
22257
- import_chalk3.default.bold("Options:"),
22258
- ` ${import_chalk3.default.green("-h, --help")} Show this help output`,
22259
- ` ${import_chalk3.default.green("-v, --version")} Print the current version`,
22260
- ` ${import_chalk3.default.green("-n, --name <n>")} Print a greeting for <n>`,
22710
+ import_chalk4.default.bold("Options:"),
22711
+ ` ${import_chalk4.default.green("-h, --help")} Show this help output`,
22712
+ ` ${import_chalk4.default.green("-v, --version")} Print the current version`,
22713
+ ` ${import_chalk4.default.green("-n, --name <n>")} Print a greeting for <n>`,
22261
22714
  "",
22262
- import_chalk3.default.bold("Commands:"),
22263
- ` ${import_chalk3.default.cyan("list [path]")} List apps from .pmate.yaml in the target folder`,
22264
- ` ${import_chalk3.default.cyan("login")} Log in and store a session in ~/.pmate/session.json`,
22265
- ` ${import_chalk3.default.gray(" [--app <app-id>]")}`,
22266
- ` ${import_chalk3.default.cyan("add-dns")} Add a DNS record via Aliyun DNS`,
22267
- ` ${import_chalk3.default.gray(" --type <t> --value <v> --rr <rr> [--ttl <n>] [--domain <name>]")}`,
22268
- ` ${import_chalk3.default.cyan("sts")} Request an OSS STS token from the CI server`,
22269
- ` ${import_chalk3.default.cyan("bucket")} Manage OSS buckets`,
22270
- ` ${import_chalk3.default.gray(" --create --name <bucket> [--subdomain <name> --domain <name>]")}`,
22271
- ` ${import_chalk3.default.cyan("delete")} Tear down app resources created by init`,
22272
- ` ${import_chalk3.default.gray(" [app] <app-name> [--cwd <dir>]")}`,
22273
- ` ${import_chalk3.default.cyan("dev")} Run the dev script for app dir from .pmate.yaml`,
22274
- ` ${import_chalk3.default.gray(" <app-name> [--cwd <dir>]")}`,
22275
- ` ${import_chalk3.default.cyan("env")} Manage app env vars on the server`,
22276
- ` ${import_chalk3.default.gray(" <app-name> --list|--set <key> --value <value> [--delete <key>] [--cwd <dir>] [--verbose|-v]")}`,
22277
- ` ${import_chalk3.default.cyan("pr")} Create or update GitHub PRs with AI assistance`,
22278
- ` ${import_chalk3.default.gray(" merge [<pr>] (defaults: --squash --delete-branch)")}`,
22279
- ` ${import_chalk3.default.cyan("commit")} Create an AI-generated commit from local changes`,
22280
- ` ${import_chalk3.default.gray(" [--push] [--cwd <dir>]")}`,
22281
- ` ${import_chalk3.default.cyan("summary")} Summarize a GitHub PR with AI`,
22282
- ` ${import_chalk3.default.gray(" --pr <id> [--cwd <dir>]")}`,
22283
- ` ${import_chalk3.default.cyan("quiz")} Manage quiz papers on quiz-api`,
22284
- ` ${import_chalk3.default.gray(" create-draft --paper-id <id>")}`,
22285
- ` ${import_chalk3.default.gray(" update-meta --paper-id <id> --file <metadata.json>")}`,
22286
- ` ${import_chalk3.default.gray(" append-step --paper-id <id> --file <step.json>")}`,
22287
- ` ${import_chalk3.default.gray(" update-step --paper-id <id> --step-id <step-id> --file <step.json>")}`,
22288
- ` ${import_chalk3.default.gray(" reorder --paper-id <id> --step-ids <id1,id2,...>")}`,
22289
- ` ${import_chalk3.default.gray(" activate --paper-id <id>")}`,
22290
- ` ${import_chalk3.default.gray(" view --paper-id <id>")}`,
22291
- ` ${import_chalk3.default.gray(" edit-step --paper-id <id> --step-id <step-id> --file <step.json> [--new-paper-id <id>] [--activate]")}`,
22292
- ` ${import_chalk3.default.cyan("linear")} Create Linear issues`,
22293
- ` ${import_chalk3.default.gray(" (default) create via REPL")}`,
22294
- ` ${import_chalk3.default.gray(" create --repl [--cwd <dir>]")}`,
22295
- ` ${import_chalk3.default.gray(" create --title <title> [--desc <markdown>]")}`,
22296
- ` ${import_chalk3.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22297
- ` ${import_chalk3.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22298
- ` ${import_chalk3.default.gray(" cycle [--team-id <id>|--team-key <key>] [--account <title>] [--cwd <dir>]")}`,
22299
- ` ${import_chalk3.default.gray(" teams [--account <title>] [--cwd <dir>]")}`,
22300
- ` ${import_chalk3.default.gray(" whoami [--account <title>] [--cwd <dir>]")}`,
22301
- ` ${import_chalk3.default.gray(" update <issue> [--title <title>] [--desc <markdown>]")}`,
22302
- ` ${import_chalk3.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22303
- ` ${import_chalk3.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22304
- ` ${import_chalk3.default.gray(" view <issue> [--cwd <dir>]")}`,
22305
- ` ${import_chalk3.default.gray(" sub-issues <issue> [--cwd <dir>]")}`,
22306
- ` ${import_chalk3.default.gray(" comment <issue> --body <markdown> [--cwd <dir>]")}`,
22307
- ` ${import_chalk3.default.gray(" comments <issue> [--cwd <dir>]")}`,
22308
- ` ${import_chalk3.default.gray(" user-issues <user> [--cycle <number>] [--status <status>] [--cwd <dir>]")}`,
22309
- ` ${import_chalk3.default.gray(" issues [--query <text>] [--user <user>] [--status <status>] [--cycle <number>]")}`,
22310
- ` ${import_chalk3.default.gray(" [--team-id <id>|--team-key <key>] [--limit <1-250>] [--cwd <dir>]")}`,
22311
- ` ${import_chalk3.default.gray(" --pr [--cwd <dir>] (legacy)")}`,
22312
- ` ${import_chalk3.default.gray(" --repl [--cwd <dir>] (legacy)")}`,
22313
- ` ${import_chalk3.default.gray(" --screen-shot [--cwd <dir>] (legacy)")}`,
22314
- ` ${import_chalk3.default.cyan("notion")} View, create, or update Notion pages`,
22315
- ` ${import_chalk3.default.gray(" view <page-id|url>")}`,
22316
- ` ${import_chalk3.default.gray(" create --title <title> (--parent <page-id|url>|--private) [--content <text>|--file <path>]")}`,
22317
- ` ${import_chalk3.default.gray(" update <page-id|url> --content <text> [--append]")}`,
22318
- ` ${import_chalk3.default.gray(" update <page-id|url> --file <path> [--append]")}`,
22319
- ` ${import_chalk3.default.cyan("qrcode")} Capture a QR code screenshot and decode it`,
22320
- ` ${import_chalk3.default.cyan("oss")} Manage OSS buckets`,
22321
- ` ${import_chalk3.default.gray(" list")}`,
22322
- ` ${import_chalk3.default.gray(" upload --file <path> --key <key>")}`,
22323
- ` ${import_chalk3.default.cyan("random")} Generate random strings for tokens`,
22324
- ` ${import_chalk3.default.gray(" [--length <n>] [--charset base64url|hex|alnum|ascii]")}`,
22325
- ` ${import_chalk3.default.gray(" [--count <n>]")}`,
22326
- ` ${import_chalk3.default.gray(" --easy [--words <n>] [--digits <n>] [--separator <s>] [--count <n>]")}`,
22327
- ` ${import_chalk3.default.cyan("collect")} Collect threads/messages from Electron chat app via CDP`,
22328
- ` ${import_chalk3.default.gray(" --list [--endpoint <url>] [--json]")}`,
22329
- ` ${import_chalk3.default.gray(" --thread <name> [--endpoint <url>] [--json]")}`,
22330
- ` ${import_chalk3.default.cyan("agent")} Manage agent registry entries via agent-ui-api`,
22331
- ` ${import_chalk3.default.gray(" namespaces [--base-url <url>] [--json]")}`,
22332
- ` ${import_chalk3.default.gray(" list [--namespace <ns>] [--base-url <url>] [--json]")}`,
22333
- ` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22334
- ` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22335
- ` ${import_chalk3.default.gray(" create [<namespace>] --file <path> [--base-url <url>] [--json]")}`,
22336
- ` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22337
- ` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22338
- ` ${import_chalk3.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22339
- ` ${import_chalk3.default.gray(" default namespace: pmate; default base URL: https://agent-api.pmate.chat")}`,
22340
- ` ${import_chalk3.default.cyan("ns")} Manage registered namespaces`,
22341
- ` ${import_chalk3.default.gray(" list [--chain <chain>] [--base-url <url>] [--json]")}`,
22342
- ` ${import_chalk3.default.gray(" get <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22343
- ` ${import_chalk3.default.gray(" create <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22344
- ` ${import_chalk3.default.cyan("role")} Manage role definitions via auth-api`,
22345
- ` ${import_chalk3.default.gray(" definition list [--base-url <url>] [--json]")}`,
22346
- ` ${import_chalk3.default.gray(" definition create <role> [--display-name <name>] [--description <text>] [--base-url <url>] [--json]")}`,
22347
- ` ${import_chalk3.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22348
- ` ${import_chalk3.default.cyan("account")} View accounts and manage account role bindings`,
22349
- ` ${import_chalk3.default.gray(" view (--account <id> | --mobile <mobile> | --nickname <nickname>) [--base-url <url>] [--json]")}`,
22350
- ` ${import_chalk3.default.gray(" role list --account <id> [--namespace <ns>] [--base-url <url>] [--json]")}`,
22351
- ` ${import_chalk3.default.gray(" role add --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22352
- ` ${import_chalk3.default.gray(" role remove --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22353
- ` ${import_chalk3.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22354
- ` ${import_chalk3.default.cyan("store")} Manage @pmate/store namespaces, tables, and kv stores`,
22355
- ` ${import_chalk3.default.gray(" namespace list [--chain <chain>] [--indexer-base-url <url>] [--json]")}`,
22356
- ` ${import_chalk3.default.gray(" table list|get|exists|create|update|delete <name> [options]")}`,
22357
- ` ${import_chalk3.default.gray(" kv list|get|exists|set|delete <name> [options]")}`,
22358
- ` ${import_chalk3.default.gray(" defaults: chain=pmate namespace=pmate env base URLs from BLOCKCHAIN_BASE_URL / INDEXER_BASE_URL")}`,
22359
- ` ${import_chalk3.default.cyan("app")} Manage app registry entries via apps-api`,
22360
- ` ${import_chalk3.default.gray(" list [--ns <namespace>] [--base-url <url>] [--json]")}`,
22361
- ` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22362
- ` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22363
- ` ${import_chalk3.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22364
- ` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22365
- ` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22366
- ` ${import_chalk3.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22367
- ` ${import_chalk3.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22368
- ` ${import_chalk3.default.cyan("service")} Manage service registry entries via apps-api`,
22369
- ` ${import_chalk3.default.gray(" list [--namespace <ns>] [--repo <owner/name|https://github.com/owner/name>] [--base-url <url>] [--json]")}`,
22370
- ` ${import_chalk3.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22371
- ` ${import_chalk3.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22372
- ` ${import_chalk3.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22373
- ` ${import_chalk3.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22374
- ` ${import_chalk3.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22375
- ` ${import_chalk3.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22376
- ` ${import_chalk3.default.gray(" deploy <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22377
- ` ${import_chalk3.default.gray(" init <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22378
- ` ${import_chalk3.default.gray(" log <ns:objectId> [--page <n>] [--history] [--search <keyword>] [--base-url <url>]")}`,
22379
- ` ${import_chalk3.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22380
- ` ${import_chalk3.default.cyan("vercel")} Wrap common Vercel CLI inspection commands`,
22381
- ` ${import_chalk3.default.gray(" projects [--scope <scope>]")}`,
22382
- ` ${import_chalk3.default.gray(" deploys --project <name> [--last-week] [--scope <scope>]")}`
22715
+ import_chalk4.default.bold("Commands:"),
22716
+ ` ${import_chalk4.default.cyan("list [path]")} List apps from .pmate.yaml in the target folder`,
22717
+ ` ${import_chalk4.default.cyan("login")} Log in and store a session in ~/.pmate/session.json`,
22718
+ ` ${import_chalk4.default.gray(" [--app <app-id>]")}`,
22719
+ ` ${import_chalk4.default.cyan("add-dns")} Add a DNS record via Aliyun DNS`,
22720
+ ` ${import_chalk4.default.gray(" --type <t> --value <v> --rr <rr> [--ttl <n>] [--domain <name>]")}`,
22721
+ ` ${import_chalk4.default.cyan("sts")} Request an OSS STS token from the CI server`,
22722
+ ` ${import_chalk4.default.cyan("bucket")} Manage OSS buckets`,
22723
+ ` ${import_chalk4.default.gray(" --create --name <bucket> [--subdomain <name> --domain <name>]")}`,
22724
+ ` ${import_chalk4.default.cyan("delete")} Tear down app resources created by init`,
22725
+ ` ${import_chalk4.default.gray(" [app] <app-name> [--cwd <dir>]")}`,
22726
+ ` ${import_chalk4.default.cyan("dev")} Run the dev script for app dir from .pmate.yaml`,
22727
+ ` ${import_chalk4.default.gray(" <app-name> [--cwd <dir>]")}`,
22728
+ ` ${import_chalk4.default.cyan("env")} Manage app env vars on the server`,
22729
+ ` ${import_chalk4.default.gray(" <app-name> --list|--set <key> --value <value> [--delete <key>] [--cwd <dir>] [--verbose|-v]")}`,
22730
+ ` ${import_chalk4.default.cyan("pr")} Create or update GitHub PRs with AI assistance`,
22731
+ ` ${import_chalk4.default.gray(" merge [<pr>] (defaults: --squash --delete-branch)")}`,
22732
+ ` ${import_chalk4.default.cyan("commit")} Create an AI-generated commit from local changes`,
22733
+ ` ${import_chalk4.default.gray(" [--push] [--cwd <dir>]")}`,
22734
+ ` ${import_chalk4.default.cyan("summary")} Summarize a GitHub PR with AI`,
22735
+ ` ${import_chalk4.default.gray(" --pr <id> [--cwd <dir>]")}`,
22736
+ ` ${import_chalk4.default.cyan("quiz")} Manage quiz papers on quiz-api`,
22737
+ ` ${import_chalk4.default.gray(" create-draft --paper-id <id>")}`,
22738
+ ` ${import_chalk4.default.gray(" update-meta --paper-id <id> --file <metadata.json>")}`,
22739
+ ` ${import_chalk4.default.gray(" append-step --paper-id <id> --file <step.json>")}`,
22740
+ ` ${import_chalk4.default.gray(" update-step --paper-id <id> --step-id <step-id> --file <step.json>")}`,
22741
+ ` ${import_chalk4.default.gray(" reorder --paper-id <id> --step-ids <id1,id2,...>")}`,
22742
+ ` ${import_chalk4.default.gray(" activate --paper-id <id>")}`,
22743
+ ` ${import_chalk4.default.gray(" view --paper-id <id>")}`,
22744
+ ` ${import_chalk4.default.gray(" edit-step --paper-id <id> --step-id <step-id> --file <step.json> [--new-paper-id <id>] [--activate]")}`,
22745
+ ` ${import_chalk4.default.cyan("linear")} Create Linear issues`,
22746
+ ` ${import_chalk4.default.gray(" (default) create via REPL")}`,
22747
+ ` ${import_chalk4.default.gray(" create --repl [--cwd <dir>]")}`,
22748
+ ` ${import_chalk4.default.gray(" create --title <title> [--desc <markdown>]")}`,
22749
+ ` ${import_chalk4.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22750
+ ` ${import_chalk4.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22751
+ ` ${import_chalk4.default.gray(" cycle [--team-id <id>|--team-key <key>] [--account <title>] [--cwd <dir>]")}`,
22752
+ ` ${import_chalk4.default.gray(" teams [--account <title>] [--cwd <dir>]")}`,
22753
+ ` ${import_chalk4.default.gray(" whoami [--account <title>] [--cwd <dir>]")}`,
22754
+ ` ${import_chalk4.default.gray(" update <issue> [--title <title>] [--desc <markdown>]")}`,
22755
+ ` ${import_chalk4.default.gray(" [--team-id <id>|--team-key <key>] [--priority <0-4>]")}`,
22756
+ ` ${import_chalk4.default.gray(" [--parent-id <id>] [--state-id <id>] [--cwd <dir>]")}`,
22757
+ ` ${import_chalk4.default.gray(" view <issue> [--cwd <dir>]")}`,
22758
+ ` ${import_chalk4.default.gray(" sub-issues <issue> [--cwd <dir>]")}`,
22759
+ ` ${import_chalk4.default.gray(" comment <issue> --body <markdown> [--cwd <dir>]")}`,
22760
+ ` ${import_chalk4.default.gray(" comments <issue> [--cwd <dir>]")}`,
22761
+ ` ${import_chalk4.default.gray(" user-issues <user> [--cycle <number>] [--status <status>] [--cwd <dir>]")}`,
22762
+ ` ${import_chalk4.default.gray(" issues [--query <text>] [--user <user>] [--status <status>] [--cycle <number>]")}`,
22763
+ ` ${import_chalk4.default.gray(" [--team-id <id>|--team-key <key>] [--limit <1-250>] [--cwd <dir>]")}`,
22764
+ ` ${import_chalk4.default.gray(" --pr [--cwd <dir>] (legacy)")}`,
22765
+ ` ${import_chalk4.default.gray(" --repl [--cwd <dir>] (legacy)")}`,
22766
+ ` ${import_chalk4.default.gray(" --screen-shot [--cwd <dir>] (legacy)")}`,
22767
+ ` ${import_chalk4.default.cyan("notion")} View, create, or update Notion pages`,
22768
+ ` ${import_chalk4.default.gray(" view <page-id|url>")}`,
22769
+ ` ${import_chalk4.default.gray(" create --title <title> (--parent <page-id|url>|--private) [--content <text>|--file <path>]")}`,
22770
+ ` ${import_chalk4.default.gray(" update <page-id|url> --content <text> [--append]")}`,
22771
+ ` ${import_chalk4.default.gray(" update <page-id|url> --file <path> [--append]")}`,
22772
+ ` ${import_chalk4.default.cyan("qrcode")} Capture a QR code screenshot and decode it`,
22773
+ ` ${import_chalk4.default.cyan("oss")} Manage OSS buckets`,
22774
+ ` ${import_chalk4.default.gray(" list")}`,
22775
+ ` ${import_chalk4.default.gray(" upload --file <path> --key <key>")}`,
22776
+ ` ${import_chalk4.default.cyan("random")} Generate random strings for tokens`,
22777
+ ` ${import_chalk4.default.gray(" [--length <n>] [--charset base64url|hex|alnum|ascii]")}`,
22778
+ ` ${import_chalk4.default.gray(" [--count <n>]")}`,
22779
+ ` ${import_chalk4.default.gray(" --easy [--words <n>] [--digits <n>] [--separator <s>] [--count <n>]")}`,
22780
+ ` ${import_chalk4.default.cyan("collect")} Collect threads/messages from Electron chat app via CDP`,
22781
+ ` ${import_chalk4.default.gray(" --list [--endpoint <url>] [--json]")}`,
22782
+ ` ${import_chalk4.default.gray(" --thread <name> [--endpoint <url>] [--json]")}`,
22783
+ ` ${import_chalk4.default.cyan("agent")} Manage agent registry entries via agent-ui-api`,
22784
+ ` ${import_chalk4.default.gray(" namespaces [--base-url <url>] [--json]")}`,
22785
+ ` ${import_chalk4.default.gray(" list [--namespace <ns>] [--base-url <url>] [--json]")}`,
22786
+ ` ${import_chalk4.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22787
+ ` ${import_chalk4.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22788
+ ` ${import_chalk4.default.gray(" create [<namespace>] --file <path> [--base-url <url>] [--json]")}`,
22789
+ ` ${import_chalk4.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22790
+ ` ${import_chalk4.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22791
+ ` ${import_chalk4.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22792
+ ` ${import_chalk4.default.gray(" default namespace: pmate; default base URL: https://agent-api.pmate.chat")}`,
22793
+ ` ${import_chalk4.default.cyan("ns")} Manage registered namespaces`,
22794
+ ` ${import_chalk4.default.gray(" list [--chain <chain>] [--base-url <url>] [--json]")}`,
22795
+ ` ${import_chalk4.default.gray(" get <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22796
+ ` ${import_chalk4.default.gray(" create <namespace> [--chain <chain>] [--base-url <url>] [--json]")}`,
22797
+ ` ${import_chalk4.default.cyan("role")} Manage role definitions via auth-api`,
22798
+ ` ${import_chalk4.default.gray(" definition list [--base-url <url>] [--json]")}`,
22799
+ ` ${import_chalk4.default.gray(" definition create <role> [--display-name <name>] [--description <text>] [--base-url <url>] [--json]")}`,
22800
+ ` ${import_chalk4.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22801
+ ` ${import_chalk4.default.cyan("account")} View accounts and manage account role bindings`,
22802
+ ` ${import_chalk4.default.gray(" view (--account <id> | --mobile <mobile> | --nickname <nickname>) [--base-url <url>] [--json]")}`,
22803
+ ` ${import_chalk4.default.gray(" role list --account <id> [--namespace <ns>] [--base-url <url>] [--json]")}`,
22804
+ ` ${import_chalk4.default.gray(" role add --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22805
+ ` ${import_chalk4.default.gray(" role remove --account <id> --namespace <ns> --role <role> [--base-url <url>] [--json]")}`,
22806
+ ` ${import_chalk4.default.gray(" default base URL: https://auth-api-v2.pmate.chat")}`,
22807
+ ` ${import_chalk4.default.cyan("store")} Manage @pmate/store namespaces, tables, and kv stores`,
22808
+ ` ${import_chalk4.default.gray(" namespace list [--chain <chain>] [--indexer-base-url <url>] [--json]")}`,
22809
+ ` ${import_chalk4.default.gray(" table list|get|exists|create|update|delete <name> [options]")}`,
22810
+ ` ${import_chalk4.default.gray(" kv list|get|exists|set|delete <name> [options]")}`,
22811
+ ` ${import_chalk4.default.gray(" defaults: chain=pmate namespace=pmate env base URLs from BLOCKCHAIN_BASE_URL / INDEXER_BASE_URL")}`,
22812
+ ` ${import_chalk4.default.cyan("app")} Manage app registry entries via apps-api`,
22813
+ ` ${import_chalk4.default.gray(" list [--ns <namespace>] [--base-url <url>] [--json]")}`,
22814
+ ` ${import_chalk4.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22815
+ ` ${import_chalk4.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22816
+ ` ${import_chalk4.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22817
+ ` ${import_chalk4.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22818
+ ` ${import_chalk4.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22819
+ ` ${import_chalk4.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22820
+ ` ${import_chalk4.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22821
+ ` ${import_chalk4.default.cyan("service")} Manage service registry entries via apps-api`,
22822
+ ` ${import_chalk4.default.gray(" list [--namespace <ns>] [--repo <owner/name|https://github.com/owner/name>] [--base-url <url>] [--json]")}`,
22823
+ ` ${import_chalk4.default.gray(" get <ns:objectId> [--base-url <url>] [--json]")}`,
22824
+ ` ${import_chalk4.default.gray(" view <ns:objectId> [--base-url <url>]")}`,
22825
+ ` ${import_chalk4.default.gray(" create --file <path> [--base-url <url>] [--json]")}`,
22826
+ ` ${import_chalk4.default.gray(" update <ns:objectId> --file <path> [--base-url <url>] [--json]")}`,
22827
+ ` ${import_chalk4.default.gray(" rename --from <id> --to <id> --ns <namespace> [--base-url <url>] [--json]")}`,
22828
+ ` ${import_chalk4.default.gray(" delete <ns:objectId> [--base-url <url>] [--json]")}`,
22829
+ ` ${import_chalk4.default.gray(" deploy <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22830
+ ` ${import_chalk4.default.gray(" init <ns:objectId> [--cwd <dir>] [--base-url <url>]")}`,
22831
+ ` ${import_chalk4.default.gray(" log <ns:objectId> [--page <n>] [--history] [--search <keyword>] [--follow|-f] [--base-url <url>]")}`,
22832
+ ` ${import_chalk4.default.gray(" default base URL: https://apps-api.pmate.chat")}`,
22833
+ ` ${import_chalk4.default.cyan("vercel")} Wrap common Vercel CLI inspection commands`,
22834
+ ` ${import_chalk4.default.gray(" projects [--scope <scope>]")}`,
22835
+ ` ${import_chalk4.default.gray(" deploys --project <name> [--last-week] [--scope <scope>]")}`
22383
22836
  ].join("\n");
22384
22837
  function parseArgs(argv) {
22385
22838
  const result = { help: false, version: false, rest: [] };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pmate/cli",
3
- "version": "0.20.4",
3
+ "version": "0.20.5",
4
4
  "description": "CLI utilities for the pMate project",
5
5
  "license": "MIT",
6
6
  "bin": {