@myapihq/cli 2.16.1 → 2.16.3

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.
Files changed (73) hide show
  1. package/dist/commands/account.d.ts +1 -0
  2. package/dist/commands/account.js +1 -1
  3. package/dist/commands/audience.d.ts +1 -0
  4. package/dist/commands/audience.js +1 -1
  5. package/dist/commands/authproduct.d.ts +1 -0
  6. package/dist/commands/authproduct.js +1 -1
  7. package/dist/commands/billing.d.ts +1 -0
  8. package/dist/commands/billing.js +1 -1
  9. package/dist/commands/company.d.ts +1 -0
  10. package/dist/commands/company.js +1 -1
  11. package/dist/commands/container.d.ts +1 -0
  12. package/dist/commands/container.js +1 -1
  13. package/dist/commands/crm/companies.d.ts +1 -0
  14. package/dist/commands/crm/companies.js +1 -1
  15. package/dist/commands/crm/contacts.d.ts +1 -0
  16. package/dist/commands/crm/contacts.js +1 -1
  17. package/dist/commands/database.d.ts +1 -0
  18. package/dist/commands/database.js +1 -1
  19. package/dist/commands/domain.d.ts +2 -0
  20. package/dist/commands/domain.js +14 -1
  21. package/dist/commands/email/mailbox.d.ts +1 -0
  22. package/dist/commands/email/mailbox.js +2 -2
  23. package/dist/commands/email/message.d.ts +1 -0
  24. package/dist/commands/email/message.js +2 -2
  25. package/dist/commands/email/template.d.ts +1 -0
  26. package/dist/commands/email/template.js +2 -2
  27. package/dist/commands/email/verify.d.ts +1 -0
  28. package/dist/commands/email/verify.js +7 -0
  29. package/dist/commands/email/warmup.d.ts +1 -0
  30. package/dist/commands/email/warmup.js +10 -2
  31. package/dist/commands/feedback.d.ts +1 -0
  32. package/dist/commands/feedback.js +1 -1
  33. package/dist/commands/fn.d.ts +1 -0
  34. package/dist/commands/fn.js +1 -1
  35. package/dist/commands/funnel.d.ts +1 -0
  36. package/dist/commands/funnel.js +1 -1
  37. package/dist/commands/git.d.ts +1 -0
  38. package/dist/commands/git.js +1 -1
  39. package/dist/commands/image.d.ts +1 -0
  40. package/dist/commands/image.js +1 -1
  41. package/dist/commands/llm.d.ts +1 -0
  42. package/dist/commands/llm.js +1 -1
  43. package/dist/commands/manifest.d.ts +17 -0
  44. package/dist/commands/manifest.js +161 -0
  45. package/dist/commands/manifest.test.d.ts +1 -0
  46. package/dist/commands/manifest.test.js +60 -0
  47. package/dist/commands/org.d.ts +1 -0
  48. package/dist/commands/org.js +1 -1
  49. package/dist/commands/payments.d.ts +1 -0
  50. package/dist/commands/payments.js +1 -1
  51. package/dist/commands/people.d.ts +1 -0
  52. package/dist/commands/people.js +1 -1
  53. package/dist/commands/pixel.d.ts +1 -0
  54. package/dist/commands/pixel.js +1 -1
  55. package/dist/commands/queue.d.ts +1 -0
  56. package/dist/commands/queue.js +1 -1
  57. package/dist/commands/storage.d.ts +1 -0
  58. package/dist/commands/storage.js +1 -1
  59. package/dist/commands/task.d.ts +1 -0
  60. package/dist/commands/task.js +1 -1
  61. package/dist/commands/url.d.ts +1 -0
  62. package/dist/commands/url.js +1 -1
  63. package/dist/commands/webhook.d.ts +1 -0
  64. package/dist/commands/webhook.js +1 -1
  65. package/dist/commands/workflow.d.ts +1 -0
  66. package/dist/commands/workflow.js +1 -1
  67. package/dist/exposes.test.js +1 -0
  68. package/dist/index.js +8 -0
  69. package/dist/skills/my-domain-api/SKILL.md +3 -2
  70. package/dist/skills/my-image-api/SKILL.md +3 -2
  71. package/dist/skills/my-queue-api/SKILL.md +3 -2
  72. package/dist/skills/my-webhook-api/SKILL.md +3 -2
  73. package/package.json +2 -2
@@ -5,6 +5,7 @@ export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
6
  export declare const HELP = "Usage: myapi account <subcommand>\n\nSubcommands:\n api-keys Manage API keys \u00B7 list / create / revoke\n config Manage CLI defaults (org, funnel, domain) \u00B7 supports set-org / set-funnel / set-domain\n import-key Import an existing API key non-interactively\n install-skills DEPRECATED \u2014 use `myapi install-skills` instead\n keys Alias for api-keys\n link [email] Upgrade anonymous account to registered (or add a second session)\n Use myapi account setup to create a completely new account\n login Sign in via your browser \u2014 Google or email code (preview: --mock)\n mailing-address Get or set the account's mailing address (CAN-SPAM)\n registrant Manage stored WHOIS contact info for domain registration \u00B7 set / get / clear\n setup Configure your account\n switch [index] Switch active account by index or email\n whoami Show current account \u00B7 supports --json";
7
7
  export declare const INSTALL_SKILLS_HELP = "Usage: myapi install-skills\n\nInstalls the MyAPI skills pack for AI coding agents (Claude, Codex, Gemini, \u2026).\n\nThis command writes skill definition files to:\n ~/.agents/skills/myapi/\n\nAnd creates symlinks in the appropriate agent config directories:\n ~/.claude/ (Claude)\n ~/.gemini/ (Gemini)\n ~/.cursor/ (Cursor, if detected)\n\nThese files teach agents how to use the MyAPI CLI and API directly.\nRun this command again to update existing skills to the latest version.\n\nNote: `myapi account install-skills` is deprecated and will be removed in the next minor.\nUse `myapi install-skills` going forward.";
8
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
8
9
  export declare function link(flags?: Flags, emailArg?: string): Promise<void>;
9
10
  export declare function whoami(flags?: Flags): Promise<void>;
10
11
  export declare function switchCmd(flags?: Flags, indexArg?: string): Promise<void>;
@@ -115,7 +115,7 @@ Subcommands:
115
115
  get Print the stored registrant (or "not set").
116
116
  set Interactive prompt for all fields. Or pass --registrant-json
117
117
  '<json>' to set non-interactively (agent-friendly).`;
118
- const SUBCOMMAND_USAGE = {
118
+ export const SUBCOMMAND_USAGE = {
119
119
  'mailing-address': `myapi account mailing-address Show current value (null if unset)
120
120
  myapi account mailing-address "<address>" Set the mailing address
121
121
 
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
3
3
  import type { Exposes } from '../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -169,7 +169,7 @@ async function refresh(id, flags) {
169
169
  const sign = res.delta > 0 ? '+' : '';
170
170
  success(`Refreshed. ${res.previous} → ${res.total} (${sign}${res.delta})`);
171
171
  }
172
- const SUBCOMMAND_USAGE = {
172
+ export const SUBCOMMAND_USAGE = {
173
173
  'create': `myapi audience create <name> --from <people|company> --filter <json> [--description <text>] [--org <id>]
174
174
 
175
175
  The Goldfox filter shape is shared across people/company/audience:
@@ -3,5 +3,6 @@ import { type Flags } from '../helpers.js';
3
3
  import type { Exposes } from '../exposes.js';
4
4
  export declare const SCHEMA: FlagSchema;
5
5
  export declare const EXPOSES: Exposes;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare const HELP = "Usage: myapi auth <subcommand>\n\nAuthentication for your app's end users \u2014 a managed OIDC identity provider\n(\u00E0 la Kinde/Auth0). One auth tenant per org; register OIDC clients (apps)\nagainst it; sign users in via the hosted login page or the JS SDK; verify\ntokens locally against the tenant JWKS.\n\nEnd users sign in with managed Google, email/password, or magic links \u2014 pick\nwhich via `tenant create --connections`. (Operator/account commands moved to\n`myapi account`.)\n\nSubcommands:\n client Register, list, delete, and rotate OIDC clients (your apps)\n domain Serve auth on your own domain (auth.acme.com)\n tenant Show or create your org's OIDC auth tenant (+ sign-in methods)\n usage Monthly active users (MAU) for the current period";
7
8
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -29,7 +29,7 @@ export const EXPOSES = [
29
29
  'POST /auth/orgs/{org_id}/domain/verify',
30
30
  'DELETE /auth/orgs/{org_id}/domain',
31
31
  ];
32
- const SUBCOMMAND_USAGE = {
32
+ export const SUBCOMMAND_USAGE = {
33
33
  'tenant': `myapi auth tenant [show|create] [--connections <list>] [--theme <json>] [--org <id>] [--json]
34
34
 
35
35
  Your org's OIDC auth tenant — the identity provider your app's end users sign
@@ -4,6 +4,7 @@ import type { Flags } from '../helpers.js';
4
4
  import type { Exposes } from '../exposes.js';
5
5
  export declare const SCHEMA: FlagSchema;
6
6
  export declare const EXPOSES: Exposes;
7
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
7
8
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
8
9
  export declare function balance(flags: Flags): Promise<void>;
9
10
  export declare function history(flags: Flags): Promise<void>;
@@ -21,7 +21,7 @@ export const EXPOSES = [
21
21
  'PUT /hq/billing/auto-recharge',
22
22
  'DELETE /hq/billing/auto-recharge',
23
23
  ];
24
- const SUBCOMMAND_USAGE = {
24
+ export const SUBCOMMAND_USAGE = {
25
25
  'auto-recharge': `myapi billing auto-recharge [show | set | disable]
26
26
 
27
27
  Keep the prepaid wallet funded without a human in the loop: when the balance
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
3
3
  import type { Exposes } from '../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -97,7 +97,7 @@ async function get(companyId, flags) {
97
97
  const res = await sdkCompany.getCompany(config.api_key, orgId, companyId, includePeople);
98
98
  printJson(res);
99
99
  }
100
- const SUBCOMMAND_USAGE = {
100
+ export const SUBCOMMAND_USAGE = {
101
101
  'search': `myapi company search [--confidence <csv>] [--country <csv>] [--country-consistent]
102
102
  [--tld-class <csv>] [--has-c-level] [--has-careers-page]
103
103
  [--has-decision-maker] [--has-investors-page] [--has-shop-page]
@@ -21,4 +21,5 @@ export declare function rollback(id: string, flags: Flags): Promise<void>;
21
21
  export declare function logs(id: string, flags: Flags): Promise<void>;
22
22
  export declare function domain(id: string, domainArg: string | undefined, flags: Flags): Promise<void>;
23
23
  export declare function buildLogs(id: string | undefined, flags: Flags): Promise<void>;
24
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
24
25
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -570,7 +570,7 @@ export async function buildLogs(id, flags) {
570
570
  info(l);
571
571
  }
572
572
  // ── Dispatcher ───────────────────────────────────────────────────────────────
573
- const SUBCOMMAND_USAGE = {
573
+ export const SUBCOMMAND_USAGE = {
574
574
  'create': `myapi container create --name <name> [--type service|worker|job] [--cron <expr>]
575
575
  [--cpu <n>] [--memory <size>] [--min-instances <n>]
576
576
  [--max-instances <n>] [--port <n>] [--env K=V,...] [--org <id>]
@@ -3,4 +3,5 @@ import { type Flags } from '../../helpers.js';
3
3
  import type { Exposes } from '../../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -142,7 +142,7 @@ async function promote(domain, flags) {
142
142
  success(`Promoted ${c.domain} → ${c.id}`);
143
143
  }
144
144
  // ── Dispatcher ──────────────────────────────────────────────────────────
145
- const SUBCOMMAND_USAGE = {
145
+ export const SUBCOMMAND_USAGE = {
146
146
  list: 'myapi crm companies list [--limit N] [--offset N] [--org <id>] [--json]',
147
147
  search: `myapi crm companies search [--stage <csv>] [--origin <csv>] [--domain <d>]
148
148
  [--include-deleted] [--limit N] [--offset N] [--org <id>] [--json]
@@ -3,4 +3,5 @@ import { type Flags } from '../../helpers.js';
3
3
  import type { Exposes } from '../../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -177,7 +177,7 @@ async function events(id, flags) {
177
177
  info(`\n— More — pass --cursor "${res.next_cursor}" to continue`);
178
178
  }
179
179
  // ── Dispatcher ──────────────────────────────────────────────────────────
180
- const SUBCOMMAND_USAGE = {
180
+ export const SUBCOMMAND_USAGE = {
181
181
  list: 'myapi crm contacts list [--limit N] [--offset N] [--org <id>] [--json]',
182
182
  search: `myapi crm contacts search [--stage <csv>] [--origin <csv>] [--email <e>]
183
183
  [--company-id <id>] [--min-last-engagement-days N] [--max-last-engagement-days N]
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
3
3
  import type { Exposes } from '../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -192,7 +192,7 @@ async function keyDel(key, flags) {
192
192
  }
193
193
  }
194
194
  // ── Dispatcher ───────────────────────────────────────────────────────────
195
- const SUBCOMMAND_USAGE = {
195
+ export const SUBCOMMAND_USAGE = {
196
196
  'namespaces': 'myapi database namespaces [--org <id>] [--json]',
197
197
  'create': 'myapi database create <name> [--org <id>]',
198
198
  'delete-namespace': `myapi database delete-namespace <name> [--org <id>]
@@ -30,4 +30,6 @@ export declare function retryProvisioning(domainArg: string, flags: Flags): Prom
30
30
  export declare function mailServerResync(domainArg: string, flags: Flags): Promise<void>;
31
31
  export declare function settings(domainArg: string, flags: Flags): Promise<void>;
32
32
  export declare function updateSettings(domainArg: string, flags: Flags): Promise<void>;
33
+ export declare const NESTED_SUBCOMMAND_USAGE: Record<string, Record<string, string>>;
34
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
33
35
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -549,6 +549,19 @@ Examples:
549
549
  --content 'v=spf1 include:_spf.mailersend.net include:_spf.google.com ~all'
550
550
  myapi domain records create x80security.com --type TXT --name @ \\
551
551
  --content 'google-site-verification=...'`;
552
+ // `domain records` is a second level inside a flat command module, so its
553
+ // verbs are invisible to anything reading SUBCOMMAND_USAGE alone — the command
554
+ // manifest could confirm `domain records` and nothing under it. Declared here
555
+ // so `domain records list` can be told apart from `domain records lst`.
556
+ export const NESTED_SUBCOMMAND_USAGE = {
557
+ records: {
558
+ 'create': 'myapi domain records create <domain> --type <T> --name <n> --content <c> [--ttl <n>] [--priority <n>] [--proxied]',
559
+ 'delete': 'myapi domain records delete <domain> <record-id> [--yes]',
560
+ 'get': 'myapi domain records get <domain> <record-id>',
561
+ 'list': 'myapi domain records list <domain> [--type A|AAAA|CNAME|MX|TXT]',
562
+ 'update': 'myapi domain records update <domain> <record-id> [--content ...] [--ttl ...] [--priority ...] [--proxied]',
563
+ },
564
+ };
552
565
  async function recordsRun(sub, args, flags) {
553
566
  if (!sub || (flags.help && !sub)) {
554
567
  info(RECORDS_HELP);
@@ -568,7 +581,7 @@ async function recordsRun(sub, args, flags) {
568
581
  }
569
582
  }
570
583
  // ── Dispatcher ───────────────────────────────────────────────────────────────
571
- const SUBCOMMAND_USAGE = {
584
+ export const SUBCOMMAND_USAGE = {
572
585
  'list': `myapi domain list [--filter=all|unassigned|org] [--org <id>] [--json]
573
586
 
574
587
  --filter=all All domains owned by the account.
@@ -1,4 +1,5 @@
1
1
  import type { Flags } from '../../helpers.js';
2
2
  import type { Exposes } from '../../exposes.js';
3
3
  export declare const EXPOSES: Exposes;
4
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
4
5
  export declare function run(sub: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -93,7 +93,7 @@ async function del(address, _flags) {
93
93
  await sdkEmail.deleteMailbox(config.api_key, address);
94
94
  success(`Mailbox deleted: ${address}`);
95
95
  }
96
- const USAGE = {
96
+ export const SUBCOMMAND_USAGE = {
97
97
  'create': `myapi email mailbox create <user@domain> [--display-name <name>]
98
98
  myapi email mailbox create --username <u> --domain <d> [--display-name <name>]
99
99
 
@@ -131,7 +131,7 @@ Subcommands:
131
131
  return;
132
132
  }
133
133
  if (flags.help) {
134
- const usage = USAGE[sub];
134
+ const usage = SUBCOMMAND_USAGE[sub];
135
135
  if (usage)
136
136
  info(`Usage: ${usage}`);
137
137
  else
@@ -1,4 +1,5 @@
1
1
  import type { Flags } from '../../helpers.js';
2
2
  import type { Exposes } from '../../exposes.js';
3
3
  export declare const EXPOSES: Exposes;
4
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
4
5
  export declare function run(sub: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -108,7 +108,7 @@ async function get(messageId, flags) {
108
108
  const res = await sdkEmail.getMessage(config.api_key, messageId, flags.address);
109
109
  printJson(res);
110
110
  }
111
- const USAGE = {
111
+ export const SUBCOMMAND_USAGE = {
112
112
  'send': 'myapi email message send --from <email> --to <email> --subject <str> [--body <str> | --html <str> | --template-id <id> [--template-vars <json>]]',
113
113
  'status': 'myapi email message status <message_id>',
114
114
  'sent': 'myapi email message sent [--limit <n>] [--offset <n>]',
@@ -130,7 +130,7 @@ Subcommands:
130
130
  return;
131
131
  }
132
132
  if (flags.help) {
133
- const usage = USAGE[sub];
133
+ const usage = SUBCOMMAND_USAGE[sub];
134
134
  if (usage)
135
135
  info(`Usage: ${usage}`);
136
136
  else
@@ -1,4 +1,5 @@
1
1
  import { type Flags } from '../../helpers.js';
2
2
  import type { Exposes } from '../../exposes.js';
3
3
  export declare const EXPOSES: Exposes;
4
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
4
5
  export declare function run(sub: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -118,7 +118,7 @@ async function del(id, flags) {
118
118
  await sdkEmail.deleteTemplate(config.api_key, orgId, id);
119
119
  success(`Deleted template ${id}`);
120
120
  }
121
- const USAGE = {
121
+ export const SUBCOMMAND_USAGE = {
122
122
  'generate': `myapi email template generate <name> --prompt <str> [--org <id>]
123
123
  myapi email template generate --name <name> --prompt <str> [--org <id>]
124
124
 
@@ -147,7 +147,7 @@ All commands accept --org <id> (or set default: myapi config set-org <id>).`);
147
147
  return;
148
148
  }
149
149
  if (flags.help) {
150
- const usage = USAGE[sub];
150
+ const usage = SUBCOMMAND_USAGE[sub];
151
151
  if (usage)
152
152
  info(`Usage: ${usage}`);
153
153
  else
@@ -4,4 +4,5 @@ import type { Exposes } from '../../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
6
  export declare const VERIFY_HELP = "Usage: myapi email verify <email> [--org <id>] [--json]\n myapi email verify bulk [--quick] [--org <id>] < emails.txt\n myapi email verify job <job_id> [--org <id>] [--json]\n\nSingle-address verification (sync): syntax + DNS + Microsoft probe.\nReturns a verdict in <1s for ~50% of inputs; the rest get\nverdict='unknown' with smtp_recommended=true.\n\nBulk verification (async): reads up to 500 addresses from stdin (one per\nline), starts a job, and prints a job_id. It runs the cheap verdict on\nevery address then SMTP-probes the uncertain ones. --quick skips the\ncatch-all check (faster, but catch-all domains aren't flagged). Poll with\n\"myapi email verify job <job_id>\".\n";
7
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
7
8
  export declare function run(arg: string | undefined, rest: string[], flags?: Flags): Promise<void>;
@@ -22,6 +22,13 @@ every address then SMTP-probes the uncertain ones. --quick skips the
22
22
  catch-all check (faster, but catch-all domains aren't flagged). Poll with
23
23
  "myapi email verify job <job_id>".
24
24
  `;
25
+ // `email verify` takes an address directly, so these are its only two real
26
+ // subcommands. Listed so the command manifest — and the site-copy checker
27
+ // that reads it — can tell `verify bulk` from a typo.
28
+ export const SUBCOMMAND_USAGE = {
29
+ 'bulk': 'myapi email verify bulk [--quick] [--org <id>] < emails.txt',
30
+ 'job': 'myapi email verify job <job_id> [--org <id>] [--json]',
31
+ };
25
32
  async function readStdinLines() {
26
33
  if (process.stdin.isTTY) {
27
34
  error('No input on stdin. Pipe a newline-separated list of addresses:\n myapi email verify bulk < emails.txt');
@@ -1,4 +1,5 @@
1
1
  import type { Flags } from '../../helpers.js';
2
2
  import type { Exposes } from '../../exposes.js';
3
3
  export declare const EXPOSES: Exposes;
4
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
4
5
  export declare function run(sub: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -8,13 +8,21 @@ export const EXPOSES = [
8
8
  'POST /email/warmup/stop',
9
9
  'GET /email/warmup/stats/{address}',
10
10
  ];
11
+ export const SUBCOMMAND_USAGE = {
12
+ 'start': 'myapi email warmup start --address <email>',
13
+ 'pause': 'myapi email warmup pause --address <email>',
14
+ 'resume': 'myapi email warmup resume --address <email>',
15
+ 'stop': 'myapi email warmup stop --address <email>',
16
+ 'stats': 'myapi email warmup stats --address <email>',
17
+ };
11
18
  export async function run(sub, args, flags) {
12
19
  if (!sub || (flags.help && !sub)) {
13
- info('Usage: myapi email warmup <start|pause|resume|stop|stats> --address <email>');
20
+ info(`Usage: myapi email warmup <${Object.keys(SUBCOMMAND_USAGE).join('|')}> --address <email>`);
14
21
  return;
15
22
  }
16
23
  if (flags.help) {
17
- info(`Usage: myapi email warmup ${sub} --address <email>`);
24
+ const usage = SUBCOMMAND_USAGE[sub];
25
+ info(usage ? `Usage: ${usage}` : `Unknown warmup subcommand: ${sub}. Run "myapi email warmup --help".`);
18
26
  return;
19
27
  }
20
28
  const config = requireConfig();
@@ -8,4 +8,5 @@ export declare function create(bodyArg: string | undefined, flags: Flags): Promi
8
8
  export declare function resolve(id: string, flags: Flags): Promise<void>;
9
9
  export declare function del(id: string | undefined, flags: Flags): Promise<void>;
10
10
  export declare function widget(sub: string | undefined, arg: string | undefined, flags: Flags): Promise<void>;
11
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
11
12
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -284,7 +284,7 @@ export async function widget(sub, arg, flags) {
284
284
  }
285
285
  error('Usage: myapi feedback widget create <name> [--origins <list>]\n myapi feedback widget list\n myapi feedback widget update <id> [--routes <list>] [--origins <list>]\n myapi feedback widget revoke <id>');
286
286
  }
287
- const SUBCOMMAND_USAGE = {
287
+ export const SUBCOMMAND_USAGE = {
288
288
  'delete': `myapi feedback delete <id> [--yes] [--org <id>]
289
289
 
290
290
  Erases an item. \`resolve\` closes one and keeps it; this removes it — for spam,
@@ -15,4 +15,5 @@ export declare function _parseSetPairs(raw: string | string[]): Record<string, s
15
15
  export declare function scopes(id: string | undefined, flags: Flags): Promise<void>;
16
16
  export declare function setEnv(id: string, name: string, value: string, flags: Flags): Promise<void>;
17
17
  export declare function runs(id: string, flags: Flags): Promise<void>;
18
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
18
19
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -320,7 +320,7 @@ export async function runs(id, flags) {
320
320
  });
321
321
  }
322
322
  // ── Dispatcher ───────────────────────────────────────────────────────────────
323
- const SUBCOMMAND_USAGE = {
323
+ export const SUBCOMMAND_USAGE = {
324
324
  'create': `myapi fn create --name <name> [--cron <expr>] [--scope <slot>[,<slot>...]] [--org <id>]
325
325
 
326
326
  Persists a function record + issues a scoped API key. Deploy code separately
@@ -24,4 +24,5 @@ export declare function push(slug: string, flags: Flags): Promise<void>;
24
24
  export declare function formCmd(funnelArg: string | undefined, flags: Flags): Promise<void>;
25
25
  export declare function verify(slug: string, flags: Flags): Promise<void>;
26
26
  export declare function publish(dir: string, flags: Flags): Promise<void>;
27
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
27
28
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -614,7 +614,7 @@ Publishing to the prod channel replaces the entire live site.
614
614
  info(`Live: ${result.published_url}`);
615
615
  }
616
616
  // ── Dispatcher ───────────────────────────────────────────────────────────────
617
- const SUBCOMMAND_USAGE = {
617
+ export const SUBCOMMAND_USAGE = {
618
618
  'create': 'myapi funnel create [--name <name>] [--org <id>]',
619
619
  'delete': 'myapi funnel delete <id> [--org <id>]',
620
620
  'form': `myapi funnel form [funnel-id] [--slug <slug>] [--fields <spec>]
@@ -19,4 +19,5 @@ export declare function deleteBranch(repo: string, branch: string, flags: Flags)
19
19
  export declare function tag(repo: string, name: string, flags: Flags): Promise<void>;
20
20
  export declare function merge(repo: string, flags: Flags): Promise<void>;
21
21
  export declare function repack(repo: string, flags: Flags): Promise<void>;
22
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
22
23
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -345,7 +345,7 @@ export async function repack(repo, flags) {
345
345
  info(`Packs: ${res.packs_before} → ${res.packs_after} · ${res.objects} objects`);
346
346
  }
347
347
  // ── Dispatcher ───────────────────────────────────────────────────────────────
348
- const SUBCOMMAND_USAGE = {
348
+ export const SUBCOMMAND_USAGE = {
349
349
  'create': 'myapi git create <name> [--default-branch <b>] [--org <id>]',
350
350
  'list': 'myapi git list [--org <id>] [--json]',
351
351
  'get': 'myapi git get <repo> [--org <id>] [--json]',
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
3
3
  import type { Exposes } from '../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -153,7 +153,7 @@ async function models(flags) {
153
153
  })), { flags, empty: 'No image models available.' });
154
154
  }
155
155
  // ── Dispatcher ───────────────────────────────────────────────────────────────
156
- const SUBCOMMAND_USAGE = {
156
+ export const SUBCOMMAND_USAGE = {
157
157
  'list': 'myapi image list [--org <id>] [--json]',
158
158
  'generate': `myapi image generate <prompt> [--model <id>] [--ratio 1:1|16:9|9:16|4:3|3:4] [--style <s>] [--colors <hex,hex>] [--text] [--org <id>]
159
159
  myapi image generate --prompt "<text>" ...
@@ -4,4 +4,5 @@ import type { Exposes } from '../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
6
  export declare function _parseJsonObjectFlag(raw: unknown, flagName: string): Record<string, unknown> | undefined;
7
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
7
8
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -314,7 +314,7 @@ async function draft(inputArg, flags) {
314
314
  printVerbFooter(res.usage);
315
315
  }
316
316
  // ── help ─────────────────────────────────────────────────────────────────
317
- const SUBCOMMAND_USAGE = {
317
+ export const SUBCOMMAND_USAGE = {
318
318
  complete: `myapi llm complete "<prompt>" [--model <id>]
319
319
  [--system "<system msg>"] [--max-tokens N] [--temperature 0..1]
320
320
  [--stop <csv>] [--file <path>] [--org <id>] [--json]
@@ -0,0 +1,17 @@
1
+ import type { Exposes } from '../exposes.js';
2
+ export declare const EXPOSES: Exposes;
3
+ export interface CommandPath {
4
+ /** Space-joined path after the binary, e.g. "email mailbox create". */
5
+ path: string;
6
+ /** The command's own usage line, when it publishes one. */
7
+ usage?: string;
8
+ }
9
+ export interface Manifest {
10
+ binary: string;
11
+ version: string;
12
+ paths: CommandPath[];
13
+ /** Disagreements between the two sources. Non-empty means this file lies. */
14
+ warnings: string[];
15
+ }
16
+ export declare function buildManifest(version: string): Promise<Manifest>;
17
+ export declare function run(version: string, flags: Record<string, unknown>): Promise<void>;
@@ -0,0 +1,161 @@
1
+ // `myapi __commands` — the CLI's own list of what it can be asked to do.
2
+ //
3
+ // WHY THIS EXISTS
4
+ //
5
+ // myapihq.com, mydomainapi.com and myemailapi.com each spent months telling
6
+ // visitors to install an npm package that 404s (`myapihq`, `mydomainapi`,
7
+ // `myemailapi`) and to run a binary that has never existed (`myapihq login`;
8
+ // it is `myapi`). Every command on those pages was unrunnable. Nothing
9
+ // noticed, because the pages live in a different repo from the CLI and
10
+ // nothing connected the two.
11
+ //
12
+ // A checker in that repo needs one thing: an authoritative answer to "is
13
+ // `myapi domain records list` a real command?". The obvious way to get it —
14
+ // run `myapi <path> --help` and look for an error — does not work:
15
+ //
16
+ // $ myapi domain bogus --help # exit 0, "Unknown subcommand"
17
+ // $ myapi domain records bogus --help # exit 0, prints the records help
18
+ //
19
+ // Exit codes do not distinguish, and at depth three the help text does not
20
+ // either. A probe-based checker would pass on a typo and report success,
21
+ // which is the failure this whole exercise is about. So the CLI states its
22
+ // command list outright, in a form another program can read.
23
+ //
24
+ // The output is a flat list of paths on purpose: a checker asks "does this
25
+ // string start with a known path", which is a set lookup, not a tree walk.
26
+ import * as fs from 'node:fs';
27
+ import * as path from 'node:path';
28
+ import { fileURLToPath, pathToFileURL } from 'node:url';
29
+ import { COMMANDS, SUBCOMMANDS } from '../completion.js';
30
+ // Reads the CLI's own dist directory and nothing else — no network, no auth.
31
+ // That is what lets the site checker run it against the published package
32
+ // without credentials.
33
+ export const EXPOSES = [];
34
+ const HERE = path.dirname(fileURLToPath(import.meta.url));
35
+ // Modules whose filename is not the command that reaches them. Anything else
36
+ // unmapped becomes a warning rather than being dropped — a command silently
37
+ // missing from this list would make the checker reject a valid command, and
38
+ // "your marketing page is wrong" is an expensive thing to be wrong about.
39
+ const MODULE_ALIAS = {
40
+ authproduct: 'auth',
41
+ };
42
+ // Commands implemented inline in index.ts, with no module of their own.
43
+ const INLINE = new Set(['completion', 'help', 'install-skills', 'whoami', 'login', 'setup', 'status', 'update', 'doctor']);
44
+ async function registriesFor(file) {
45
+ const mod = await import(pathToFileURL(file).href).catch(() => null);
46
+ const usage = mod?.SUBCOMMAND_USAGE;
47
+ const nested = mod?.NESTED_SUBCOMMAND_USAGE;
48
+ return {
49
+ usage: usage && typeof usage === 'object' ? usage : null,
50
+ // A third level inside a flat module — `domain records list`. Namespaces
51
+ // that get a directory of their own (email/, crm/) express this by file
52
+ // layout instead and need no such export.
53
+ nested: nested && typeof nested === 'object' ? nested : null,
54
+ };
55
+ }
56
+ // Shipped code runs from dist/ (.js); the test suite runs the sources (.ts).
57
+ // Matching only .js made the enrichment pass find nothing under vitest and
58
+ // return a manifest with every path present and not one usage string — no
59
+ // error, no warning, just quietly less than it claimed.
60
+ const MODULE_RE = /\.(js|ts)$/;
61
+ const isModule = (name) => MODULE_RE.test(name) && !name.endsWith('.test.js') && !name.endsWith('.test.ts') && !name.endsWith('.d.ts');
62
+ export async function buildManifest(version) {
63
+ const paths = [];
64
+ const warnings = [];
65
+ const seen = new Set();
66
+ const byPath = new Map();
67
+ const add = (p, usage) => {
68
+ const existing = byPath.get(p);
69
+ if (existing) {
70
+ // The completion tables are walked first and carry no usage strings, so
71
+ // a plain `return` here would mean every usage string is silently
72
+ // dropped — the manifest still looked complete, which is the exact
73
+ // shape of bug this file exists to prevent.
74
+ if (usage && !existing.usage)
75
+ existing.usage = usage;
76
+ return;
77
+ }
78
+ seen.add(p);
79
+ const entry = usage ? { path: p, usage } : { path: p };
80
+ byPath.set(p, entry);
81
+ paths.push(entry);
82
+ };
83
+ // Spine: the completion tables. They are the one place that already had to
84
+ // enumerate every command, and a smoke test fails if `myapi --help` lists a
85
+ // top-level command they omit.
86
+ for (const cmd of COMMANDS)
87
+ add(cmd);
88
+ for (const [cmd, subs] of Object.entries(SUBCOMMANDS)) {
89
+ if (!COMMANDS.includes(cmd))
90
+ warnings.push(`SUBCOMMANDS has "${cmd}", which is not in COMMANDS`);
91
+ for (const sub of subs)
92
+ add(`${cmd} ${sub}`);
93
+ }
94
+ // Enrichment: usage strings, and the third level. `email mailbox create` is
95
+ // real and the completion tables stop one level above it.
96
+ for (const entry of fs.readdirSync(HERE, { withFileTypes: true })) {
97
+ if (entry.isDirectory()) {
98
+ const ns = entry.name;
99
+ if (!COMMANDS.includes(ns)) {
100
+ warnings.push(`command directory "${ns}" is not in COMMANDS`);
101
+ continue;
102
+ }
103
+ for (const f of fs.readdirSync(path.join(HERE, ns))) {
104
+ if (!isModule(f))
105
+ continue;
106
+ const group = f.replace(MODULE_RE, '');
107
+ const { usage } = await registriesFor(path.join(HERE, ns, f));
108
+ if (!usage)
109
+ continue;
110
+ if (group === 'index') {
111
+ for (const [sub, u] of Object.entries(usage))
112
+ add(`${ns} ${sub}`, u);
113
+ }
114
+ else {
115
+ add(`${ns} ${group}`);
116
+ for (const [sub, u] of Object.entries(usage))
117
+ add(`${ns} ${group} ${sub}`, u);
118
+ }
119
+ }
120
+ continue;
121
+ }
122
+ if (!isModule(entry.name))
123
+ continue;
124
+ const base = entry.name.replace(MODULE_RE, '');
125
+ const cmd = MODULE_ALIAS[base] ?? base;
126
+ const { usage, nested } = await registriesFor(path.join(HERE, entry.name));
127
+ if (!usage && !nested)
128
+ continue;
129
+ if (!COMMANDS.includes(cmd)) {
130
+ // Not fatal: `verify.js` backs `email verify`, not a top-level command.
131
+ if (!INLINE.has(cmd))
132
+ warnings.push(`module "${base}.js" publishes subcommands but "${cmd}" is not a top-level command`);
133
+ continue;
134
+ }
135
+ for (const [sub, u] of Object.entries(usage ?? {}))
136
+ add(`${cmd} ${sub}`, u);
137
+ for (const [sub, subs] of Object.entries(nested ?? {})) {
138
+ add(`${cmd} ${sub}`);
139
+ for (const [leaf, u] of Object.entries(subs))
140
+ add(`${cmd} ${sub} ${leaf}`, u);
141
+ }
142
+ }
143
+ // The spine alone always yields a plausible-looking manifest, so "the
144
+ // enrichment pass found nothing" is invisible unless it is stated. It means
145
+ // the walk is looking in the wrong place — and a checker trusting a manifest
146
+ // that is quietly missing a level will call correct copy wrong.
147
+ if (!paths.some(p => p.usage)) {
148
+ warnings.push(`no command modules found under ${HERE} — the manifest covers only the completion tables`);
149
+ }
150
+ paths.sort((a, b) => a.path.localeCompare(b.path));
151
+ return { binary: 'myapi', version, paths, warnings };
152
+ }
153
+ export async function run(version, flags) {
154
+ const manifest = await buildManifest(version);
155
+ if (flags.json === false) {
156
+ for (const p of manifest.paths)
157
+ console.log(p.path);
158
+ return;
159
+ }
160
+ console.log(JSON.stringify(manifest, null, 2));
161
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,60 @@
1
+ // The manifest is consumed by a checker in another repo (myapi-hq) that
2
+ // decides whether the marketing sites advertise commands that exist. Two ways
3
+ // it can do harm, and a test for each:
4
+ //
5
+ // - claiming a real command is unknown → CI fails on correct copy, and the
6
+ // next person deletes the check rather than debug it;
7
+ // - claiming an unknown command is real → the thing it was built to catch
8
+ // walks straight past it, which is how three domains spent months telling
9
+ // visitors to run `myapihq login`.
10
+ import { describe, it, expect } from 'vitest';
11
+ import { buildManifest } from './manifest.js';
12
+ import { COMMANDS, SUBCOMMANDS } from '../completion.js';
13
+ const manifest = await buildManifest('0.0.0-test');
14
+ const paths = new Set(manifest.paths.map(p => p.path));
15
+ describe('command manifest', () => {
16
+ it('reports no disagreement between its two sources', () => {
17
+ // Non-empty warnings mean the completion tables and the command modules
18
+ // describe different CLIs, so neither can be trusted to answer "is this
19
+ // real". Surfacing that is the point; passing anyway would not be.
20
+ expect(manifest.warnings).toEqual([]);
21
+ });
22
+ it('contains every top-level command and every completion subcommand', () => {
23
+ for (const c of COMMANDS)
24
+ expect(paths, `missing top-level "${c}"`).toContain(c);
25
+ for (const [cmd, subs] of Object.entries(SUBCOMMANDS)) {
26
+ for (const sub of subs)
27
+ expect(paths, `missing "${cmd} ${sub}"`).toContain(`${cmd} ${sub}`);
28
+ }
29
+ });
30
+ it('contains the commands the public sites advertise', () => {
31
+ // Verbatim from myapi-hq/frontend/configs/{myapihq,mydomainapi,myemailapi}.com.json.
32
+ // If a rename drops one of these, the site is wrong the moment it ships and
33
+ // this is where that gets said.
34
+ for (const p of [
35
+ 'account setup', 'install-skills', 'status', 'keys create',
36
+ 'domain check', 'domain register', 'domain import', 'domain list', 'domain records',
37
+ 'email mailbox', 'email message', 'email verify', 'billing balance',
38
+ ]) {
39
+ expect(paths, `site advertises "myapi ${p}"`).toContain(p);
40
+ }
41
+ });
42
+ it('does not invent commands', () => {
43
+ for (const bogus of ['bogus', 'domain bogus', 'email bogus', 'myapihq login']) {
44
+ expect(paths).not.toContain(bogus);
45
+ }
46
+ });
47
+ it('attaches usage strings, not just paths', () => {
48
+ // Regression guard. The completion tables are walked first and carry no
49
+ // usage; an early `return` on an already-seen path silently dropped every
50
+ // usage string while the manifest still looked complete. Assert on a
51
+ // command that only the module registry can describe.
52
+ const withUsage = manifest.paths.filter(p => p.usage);
53
+ expect(withUsage.length).toBeGreaterThan(100);
54
+ const del = manifest.paths.find(p => p.path === 'queue delete');
55
+ expect(del?.usage).toContain('myapi queue delete');
56
+ });
57
+ it('states the binary name the sites must use', () => {
58
+ expect(manifest.binary).toBe('myapi');
59
+ });
60
+ });
@@ -9,4 +9,5 @@ export declare function get(id: string, flags: Flags): Promise<void>;
9
9
  export declare function del(id: string, flags: Flags): Promise<void>;
10
10
  export declare function update(restArgs: string[], flags: Flags): Promise<void>;
11
11
  export declare function importOrg(args: string[], flags: Flags): Promise<void>;
12
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
12
13
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -192,7 +192,7 @@ export async function importOrg(args, flags) {
192
192
  success(`Import complete! Org ID: ${org.id}`);
193
193
  }
194
194
  // ── Dispatcher ───────────────────────────────────────────────────────────────
195
- const SUBCOMMAND_USAGE = {
195
+ export const SUBCOMMAND_USAGE = {
196
196
  'list': 'myapi org list [--json]',
197
197
  'update': `myapi org update [<id>] [--name <str>] [--tagline <str>] [--description <str>] [--business-sector <str>] [--logo-url <url>] [--json]
198
198
 
@@ -10,4 +10,5 @@ export declare function charge(flags: Flags): Promise<void>;
10
10
  export declare function list(flags: Flags): Promise<void>;
11
11
  export declare function get(id: string, flags: Flags): Promise<void>;
12
12
  export declare function refund(id: string, flags: Flags): Promise<void>;
13
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
13
14
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -173,7 +173,7 @@ export async function refund(id, flags) {
173
173
  success(`Charge ${res.id} refunded (status: ${res.status}).`);
174
174
  }
175
175
  // ── Dispatcher ───────────────────────────────────────────────────────────────
176
- const SUBCOMMAND_USAGE = {
176
+ export const SUBCOMMAND_USAGE = {
177
177
  'connect': `myapi payments connect --stripe-key <sk_...> [--org <id>]
178
178
 
179
179
  Links your own Stripe account (T0 — bring-your-own-Stripe). The key is
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
3
3
  import type { Exposes } from '../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -83,7 +83,7 @@ async function get(personId, flags) {
83
83
  const res = await sdkPeople.getPerson(config.api_key, orgId, personId);
84
84
  printJson(res);
85
85
  }
86
- const SUBCOMMAND_USAGE = {
86
+ export const SUBCOMMAND_USAGE = {
87
87
  'search': `myapi people search [--confidence <csv>] [--country <csv>] [--country-consistent]
88
88
  [--email-type <csv>] [--seniority <csv>] [--tld-class <csv>]
89
89
  [--has-c-level] [--has-careers-page] [--has-decision-maker]
@@ -8,5 +8,6 @@ export declare function visits(flags: Flags): Promise<void>;
8
8
  export declare function events(flags: Flags): Promise<void>;
9
9
  export declare function audience(flags: Flags): Promise<void>;
10
10
  export declare function identity(pixelId: string, flags: Flags): Promise<void>;
11
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
11
12
  export declare function identify(pixelId: string | undefined, flags: Flags): Promise<void>;
12
13
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -152,7 +152,7 @@ export async function identity(pixelId, flags) {
152
152
  printJson(res);
153
153
  }
154
154
  // ── Dispatcher ───────────────────────────────────────────────────────────────
155
- const SUBCOMMAND_USAGE = {
155
+ export const SUBCOMMAND_USAGE = {
156
156
  'interactions': 'myapi pixel interactions [--website <domain>] [--campaign-id <id>] [--domain <domain>] [--from <iso8601>] [--to <iso8601>] [--limit <num>] [--offset <num>] [--org <id>] [--json]',
157
157
  'visits': 'myapi pixel visits --website <domain> [--from <iso8601>] [--to <iso8601>] [--limit <num>] [--offset <num>] [--org <id>] [--json]',
158
158
  'events': 'myapi pixel events [--campaign-id <id>] [--domain <domain>] [--from <iso8601>] [--to <iso8601>] [--limit <num>] [--offset <num>] [--org <id>] [--json]',
@@ -12,4 +12,5 @@ export declare function enqueue(name: string, flags: Flags, extraArgs?: string[]
12
12
  export declare function jobs(name: string, flags: Flags): Promise<void>;
13
13
  export declare function job(jobId: string, flags: Flags): Promise<void>;
14
14
  export declare function del(name: string, flags: Flags): Promise<void>;
15
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
15
16
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -187,7 +187,7 @@ export async function del(name, flags) {
187
187
  success(`Deleted queue: ${name} (org ${orgId})`);
188
188
  }
189
189
  // ── Dispatcher ───────────────────────────────────────────────────────────────
190
- const SUBCOMMAND_USAGE = {
190
+ export const SUBCOMMAND_USAGE = {
191
191
  'create': 'myapi queue create <name> --consumer-url <url> [--max-attempts <n>] [--max-concurrency <n>] [--org <id>]',
192
192
  'list': 'myapi queue list [--org <id>] [--json]',
193
193
  'get': 'myapi queue get <name> [--org <id>] [--json]',
@@ -3,4 +3,5 @@ import { type Flags } from '../helpers.js';
3
3
  import type { Exposes } from '../exposes.js';
4
4
  export declare const EXPOSES: Exposes;
5
5
  export declare const SCHEMA: FlagSchema;
6
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
6
7
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -238,7 +238,7 @@ async function del(id, flags) {
238
238
  success(`Asset ${id} deleted`);
239
239
  }
240
240
  // ── Dispatcher ───────────────────────────────────────────────────────────────
241
- const SUBCOMMAND_USAGE = {
241
+ export const SUBCOMMAND_USAGE = {
242
242
  'list': 'myapi storage list [--org <id>] [--json]',
243
243
  'ingest': `myapi storage ingest <url> [--name <name>] [--org <id>]
244
244
 
@@ -15,4 +15,5 @@ export declare function extend(id: string, flags: Flags): Promise<void>;
15
15
  export declare function resolve(id: string, flags: Flags): Promise<void>;
16
16
  export declare function fail(id: string, flags: Flags): Promise<void>;
17
17
  export declare function cancel(id: string, flags: Flags): Promise<void>;
18
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
18
19
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -242,7 +242,7 @@ export async function cancel(id, flags) {
242
242
  success(`Cancelled task ${id}`);
243
243
  }
244
244
  // ── Dispatcher ───────────────────────────────────────────────────────────────
245
- const SUBCOMMAND_USAGE = {
245
+ export const SUBCOMMAND_USAGE = {
246
246
  'create': 'myapi task create "<description>" [--body <md|@file>] [--importance <i>] [--due <rfc3339>] [--assignee <email>] [--tag <t,t>] [--depends-on <id,id>] [--dedup-key <k>] [--resolve-on <event[:field=value]>] [--origin <s>] [--org <id>]',
247
247
  'list': 'myapi task list [--status <s>] [--tag <t>] [--importance <i>] [--assignee <email>] [--origin <s>] [--limit <n>] [--org <id>] [--json]',
248
248
  'get': 'myapi task get <id> [--body] [--org <id>] [--json]\n\n--body additionally fetches the Markdown body tier (a separate read).',
@@ -4,4 +4,5 @@ import type { FlagSchema } from '../flags.js';
4
4
  export declare const SCHEMA: FlagSchema;
5
5
  export declare const EXPOSES: Exposes;
6
6
  export declare function shorten(targetUrl: string, flags: Flags): Promise<void>;
7
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
7
8
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -19,7 +19,7 @@ export async function shorten(targetUrl, flags) {
19
19
  success(`Shortened URL: ${res.short_url}\nCode: ${res.short_code}`);
20
20
  }
21
21
  // ── Dispatcher ───────────────────────────────────────────────────────────────
22
- const SUBCOMMAND_USAGE = {
22
+ export const SUBCOMMAND_USAGE = {
23
23
  'shorten': 'myapi url shorten <url> [--org <id>] [--json]',
24
24
  };
25
25
  export async function run(subcommand, args, flags) {
@@ -10,4 +10,5 @@ export declare function _validateForwardUrl(url: string): string | null;
10
10
  export declare function del(id: string, flags: Flags): Promise<void>;
11
11
  export declare function delivery(id: string, flags: Flags): Promise<void>;
12
12
  export declare function deliveries(endpointArg: string | undefined, flags: Flags): Promise<void>;
13
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
13
14
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -192,7 +192,7 @@ function summarizePayload(payload) {
192
192
  return entries.length > 3 ? `${shown} +${entries.length - 3}` : shown;
193
193
  }
194
194
  // ── Dispatcher ───────────────────────────────────────────────────────────────
195
- const SUBCOMMAND_USAGE = {
195
+ export const SUBCOMMAND_USAGE = {
196
196
  'list': 'myapi webhook list [--org <id>] [--json]',
197
197
  'create': `myapi webhook create <name> [--description <desc>] [--crm-email-path <path>] [--org <id>]
198
198
  myapi webhook create --name <name> [...]
@@ -13,4 +13,5 @@ export declare function disable(id: string, flags: Flags): Promise<void>;
13
13
  export declare function del(id: string, flags: Flags): Promise<void>;
14
14
  export declare function runs(id: string, flags: Flags): Promise<void>;
15
15
  export declare function getRun(runId: string, flags: Flags): Promise<void>;
16
+ export declare const SUBCOMMAND_USAGE: Record<string, string>;
16
17
  export declare function run(subcommand: string | undefined, args: string[], flags: Flags): Promise<void>;
@@ -313,7 +313,7 @@ export async function getRun(runId, flags) {
313
313
  printJson(run);
314
314
  }
315
315
  // ── Dispatcher ───────────────────────────────────────────────────────────────
316
- const SUBCOMMAND_USAGE = {
316
+ export const SUBCOMMAND_USAGE = {
317
317
  'list': 'myapi workflow list [--org <id>] [--json]',
318
318
  'get': 'myapi workflow get <id> [--org <id>]',
319
319
  'create': `myapi workflow create <name> --endpoint-id <id> --steps <json> [--no-enable] [--org <id>]
@@ -26,6 +26,7 @@ const COMMAND_MODULES = [
26
26
  './commands/image.js',
27
27
  './commands/keys.js',
28
28
  './commands/llm.js',
29
+ './commands/manifest.js',
29
30
  './commands/org.js',
30
31
  './commands/pixel.js',
31
32
  './commands/audience.js',
package/dist/index.js CHANGED
@@ -194,6 +194,14 @@ async function main() {
194
194
  await adoptSoleOrg(command, flags, key => hq.listOrgs(key));
195
195
  try {
196
196
  switch (command) {
197
+ // Machine-readable command list. Deliberately absent from --help and
198
+ // from completion: it is an interface for other programs (the site-copy
199
+ // checker in myapi-hq), not a thing to teach a person.
200
+ case '__commands': {
201
+ const manifestCmd = await import('./commands/manifest.js');
202
+ await manifestCmd.run(pkg.version, flags);
203
+ break;
204
+ }
197
205
  case 'auth':
198
206
  // `auth` is the end-user auth product (my-auth-api). Operator/account
199
207
  // commands live under `myapi account`.
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: my-domain-api
3
- version: 1.0.0
3
+ version: 1.0.1
4
4
  description: >
5
5
  Register new domains and manage edge settings. Required before a funnel can go live on a custom URL.
6
6
  triggers: [domain, register domain, dns, custom domain, edge, cdn, security level, browser check, renew, namecheap]
7
- checksum: sha256-ffe00d434534f444320a3e84323e87168c0c5797445fa0f39eeb55ad8278f721
7
+ checksum: sha256-b08b28804b6e3ab69cc5b75c39e5b22312aa40474dcf53e3bc71fd6db8491d22
8
8
  ---
9
9
 
10
10
  # MyDomainAPI
@@ -56,6 +56,7 @@ Resolution at register time (highest wins): `--registrant-json` → per-field fl
56
56
  | `myapi domain status <domain> [--watch]` | Registration + DNS propagation status. `--watch` polls until terminal (10s × 30 → 30s × 60) |
57
57
  | `myapi domain settings <domain>` | View edge/CDN settings |
58
58
  | `myapi domain update-settings <domain>` | Change security level, browser check, purge cache |
59
+ | `myapi domain mail-server-resync <domain>` | Re-run mail-server provisioning when inbox/create is broken on a domain |
59
60
  | `myapi domain records list <domain> [--type T]` | List DNS records in the zone |
60
61
  | `myapi domain records get <domain> <id>` | Fetch one record |
61
62
  | `myapi domain records create <domain> --type T --name n --content c` | Create a record (priority required for MX) |
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: my-image-api
3
- version: 1.0.0
3
+ version: 1.0.1
4
4
  description: >
5
5
  Generate AI images from a text prompt. Async — submit a prompt, the CLI polls until the image is ready, then returns a public CDN URL. Image lands automatically in your org's storage.
6
6
  triggers: [image, generate image, ai image, hero image, logo, illustration, watercolor, prompt, cyberpunk, ratio, aspect ratio]
7
- checksum: sha256-c12686cd9f53f18dbc692c3aca9391409cc1540b693b6f2059074e02bafff72c
7
+ checksum: sha256-08b7b7e6deb6a5c6ff4ec149561470b54a4bad02a914455a41c270dfceca7a2e
8
8
  ---
9
9
 
10
10
  # MyImageAPI
@@ -27,6 +27,7 @@ The output URL is public — anyone with it can view. Don't generate sensitive c
27
27
  | `myapi image generate <prompt>` | Async generate, polls up to 90s, returns id + URL |
28
28
  | `myapi image list` | List all generated images for the org |
29
29
  | `myapi image get <job_id>` | Get full job details (status, URL, prompt, ratio) |
30
+ | `myapi image get-url <job_id>` | Print just the asset URL — for piping into another command |
30
31
  | `myapi image models` | List available image models with per-image pricing |
31
32
  | `myapi image delete <job_id>` | Delete the asset (job record kept for history) |
32
33
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: my-queue-api
3
- version: 1.0.0
3
+ version: 1.0.1
4
4
  description: >
5
5
  Durable job queue — enqueue work and have it retried against your HTTP consumer, with concurrency caps and a dependency DAG.
6
6
  triggers: [queue, job queue, background job, enqueue, retry, async work, dead letter, delayed job, concurrency]
7
- checksum: sha256-e3079f05a9f0b6eb1860749e42a3feea3cc4f18997b8bd6a0d5ff892e29bc628
7
+ checksum: sha256-ad874e1229df9381fc92881b2a1fada40859983c24fe4386d43922398323b05c
8
8
  ---
9
9
 
10
10
  # MyQueueAPI
@@ -39,6 +39,7 @@ A job carries an arbitrary JSON `payload` (≤256 KB). Jobs support:
39
39
  | `myapi queue create <name> --consumer-url <url> [--max-attempts <n>] [--max-concurrency <n>]` | Create a queue |
40
40
  | `myapi queue list` | List queues in your org |
41
41
  | `myapi queue get <name>` | Show a queue's retry/concurrency policy |
42
+ | `myapi queue delete <name>` | Delete a queue |
42
43
  | `myapi queue enqueue <name> --payload <json> [--dedup-key <k>] [--delay <s>] [--depends-on <id,id>]` | Enqueue a job |
43
44
  | `myapi queue jobs <name> [--status <s>] [--limit <n>]` | List a queue's jobs |
44
45
  | `myapi queue job <job_id>` | Show a single job's status |
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: my-webhook-api
3
- version: 1.0.0
3
+ version: 1.0.1
4
4
  description: >
5
5
  Inbound webhook endpoints for non-funnel sources — Stripe, GitHub, custom services. Funnel forms use the my-funnel-api proxy.
6
6
  triggers: [webhook, inbound, receiver, stripe events, github webhook, slack notification, delivery, payload, event ingest]
7
- checksum: sha256-82459af69db91d535209978c09e011f5b893ba0f04f90d8b6a658058e0dc2374
7
+ checksum: sha256-737e0572ef7c414dab568e60af676aa8e50900ed368ba7bcdf81fc65516be9eb
8
8
  ---
9
9
 
10
10
  # MyWebhookAPI
@@ -31,6 +31,7 @@ Treat the webhook slug as a secret — anyone with the URL can POST.
31
31
  |---|---|
32
32
  | `myapi webhook create "<name>" [--description "..."]` | Create an endpoint, returns id + inbound URL |
33
33
  | `myapi webhook list` | List all endpoints in your org |
34
+ | `myapi webhook update <id> [--name <n>] [--description <d>]` | Change an endpoint in place, without re-creating it |
34
35
  | `myapi webhook delete <id>` | Delete an endpoint and all its deliveries |
35
36
  | `myapi webhook deliveries [endpoint_id]` | List what came in, newest first (`--limit`, `--cursor`) |
36
37
  | `myapi webhook delivery <delivery_id>` | Get the full payload + headers for one delivery |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/cli",
3
3
  "license": "Apache-2.0",
4
- "version": "2.16.1",
4
+ "version": "2.16.3",
5
5
  "description": "MyAPI command-line interface",
6
6
  "repository": {
7
7
  "type": "git",
@@ -46,7 +46,7 @@
46
46
  "lint:skills:strict": "node scripts/copy-skills.js && node scripts/lint-skills.js --strict"
47
47
  },
48
48
  "dependencies": {
49
- "@myapihq/sdk": "^2.16.1"
49
+ "@myapihq/sdk": "^2.16.3"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^25.6.0",