@myapihq/cli 1.3.4 → 1.3.6

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.
@@ -211,12 +211,12 @@ export async function run(subcommand, args, flags) {
211
211
 
212
212
  Subcommands:
213
213
  create Save a filter as a named audience (people or company source)
214
- list List all audiences in the org
215
- get Get a single audience (with its filter + current member_count)
216
- update Patch name / description / filter (re-evaluates count if filter changes)
217
214
  delete Remove an audience
215
+ get Get a single audience (with its filter + current member_count)
216
+ list List all audiences in the org
218
217
  members Get paged member snapshot (people or companies depending on source)
219
218
  refresh Re-evaluate filter against current data; returns delta vs previous
219
+ update Patch name / description / filter (re-evaluates count if filter changes)
220
220
 
221
221
  All commands accept --org <id> (or set a default: myapi config set-org <id>).
222
222
 
@@ -3,7 +3,7 @@ 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 HELP = "Usage: myapi auth <subcommand>\n\nSubcommands:\n setup Configure your account\n import-key Import an existing API key non-interactively\n whoami Show current account \u00B7 supports --json\n link [email] Upgrade anonymous account to registered (or add a second session)\n Use myapi auth setup to create a completely new account\n switch [index] Switch active account by index or email\n config Manage CLI defaults (org, funnel, domain) \u00B7 supports set-org / set-funnel / set-domain\n registrant Manage stored WHOIS contact info for domain registration \u00B7 set / get / clear\n install-skills DEPRECATED \u2014 use `myapi install-skills` instead\n api-keys Manage API keys \u00B7 list / create / revoke\n keys Alias for api-keys";
6
+ export declare const HELP = "Usage: myapi auth <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 auth setup to create a completely new account\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, Gemini, Cursor).\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 auth install-skills` is deprecated and will be removed in the next minor.\nUse `myapi install-skills` going forward.";
8
8
  export declare function link(flags?: Flags, emailArg?: string): Promise<void>;
9
9
  export declare function whoami(flags?: Flags): Promise<void>;
@@ -20,17 +20,17 @@ export const SCHEMA = {
20
20
  export const HELP = `Usage: myapi auth <subcommand>
21
21
 
22
22
  Subcommands:
23
- setup Configure your account
23
+ api-keys Manage API keys · list / create / revoke
24
+ config Manage CLI defaults (org, funnel, domain) · supports set-org / set-funnel / set-domain
24
25
  import-key Import an existing API key non-interactively
25
- whoami Show current account · supports --json
26
+ install-skills DEPRECATED use \`myapi install-skills\` instead
27
+ keys Alias for api-keys
26
28
  link [email] Upgrade anonymous account to registered (or add a second session)
27
29
  Use myapi auth setup to create a completely new account
28
- switch [index] Switch active account by index or email
29
- config Manage CLI defaults (org, funnel, domain) · supports set-org / set-funnel / set-domain
30
30
  registrant Manage stored WHOIS contact info for domain registration · set / get / clear
31
- install-skills DEPRECATED use \`myapi install-skills\` instead
32
- api-keys Manage API keys · list / create / revoke
33
- keys Alias for api-keys`;
31
+ setup Configure your account
32
+ switch [index] Switch active account by index or email
33
+ whoami Show current account · supports --json`;
34
34
  export const INSTALL_SKILLS_HELP = `Usage: myapi install-skills
35
35
 
36
36
  Installs the MyAPI skills pack for AI coding agents (Claude, Gemini, Cursor).
@@ -274,10 +274,10 @@ requires (ICANN-mandated). Stored in ~/.myapi/config.json under the active
274
274
  account; never synced to the backend except as a per-request field.
275
275
 
276
276
  Subcommands:
277
- set Interactive prompt for all fields. Or pass --registrant-json
278
- '<json>' to set non-interactively (agent-friendly).
277
+ clear Remove the stored registrant from the active account.
279
278
  get Print the stored registrant (or "not set").
280
- clear Remove the stored registrant from the active account.`;
279
+ set Interactive prompt for all fields. Or pass --registrant-json
280
+ '<json>' to set non-interactively (agent-friendly).`;
281
281
  export async function registrant(sub, flags = {}) {
282
282
  if (flags.help || !sub) {
283
283
  info(REGISTRANT_HELP);
@@ -50,10 +50,10 @@ export async function run(subcommand, args, flags) {
50
50
  Subcommands:
51
51
  balance Check balance, credits, and payment method status
52
52
  history View recent transactions and top-ups
53
- usage Spend rolled up by service (this month, or --period 30d)
54
- topup Top up your balance (whole dollars)
55
53
  setup Open a checkout link to add or update payment method
56
- spend-cap Set/show/clear the account-level spend ceiling (IAM Layer 2)`);
54
+ spend-cap Set/show/clear the account-level spend ceiling (IAM Layer 2)
55
+ topup Top up your balance (whole dollars)
56
+ usage Spend rolled up by service (this month, or --period 30d)`);
57
57
  return;
58
58
  }
59
59
  if (flags.help) {
@@ -126,8 +126,8 @@ export async function run(subcommand, args, flags) {
126
126
  info(`Usage: myapi company <subcommand>
127
127
 
128
128
  Subcommands:
129
- search Filter companies across the Goldfox database
130
129
  get Get a single company (optionally with embedded people)
130
+ search Filter companies across the Goldfox database
131
131
 
132
132
  All commands accept --org <id> (or set a default: myapi config set-org <id>).
133
133
  Filter shape is shared with people + audience — see myapi audience --help.`);
@@ -98,10 +98,10 @@ export async function run(subcommand, args, flags) {
98
98
  Manages CLI defaults (org, funnel, domain) so you don't have to pass --org / --domain on every command.
99
99
 
100
100
  Subcommands:
101
- view Show current defaults
102
- set-org Set default organization (validates access)
103
- set-funnel Set default funnel (must be owned by default org)
104
101
  set-domain Set default domain
102
+ set-funnel Set default funnel (must be owned by default org)
103
+ set-org Set default organization (validates access)
104
+ view Show current defaults
105
105
 
106
106
  Examples:
107
107
  myapi ${via} set-org <id>
@@ -280,12 +280,12 @@ dependencies and long execution.
280
280
 
281
281
  Subcommands:
282
282
  create Register a container and get its scoped API key (returned once)
283
+ delete <id> Soft-delete and revoke its scoped API key
283
284
  deploy <id> <image> Ship a pre-built image and go live
284
- list List containers in your org
285
+ domain <id> <domain> Bind a custom domain (--remove to unbind)
285
286
  get <id> Inspect a container
287
+ list List containers in your org
286
288
  logs <id> Show recent runtime logs (--tail <n>)
287
- domain <id> <domain> Bind a custom domain (--remove to unbind)
288
- delete <id> Soft-delete and revoke its scoped API key
289
289
 
290
290
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
291
291
  return;
@@ -159,14 +159,14 @@ export async function run(subcommand, args, flags) {
159
159
  info(`Usage: myapi crm companies <subcommand>
160
160
 
161
161
  Subcommands:
162
- list List all companies
163
- search Filter by stage / source / domain
164
162
  create <domain> Manually create (source='manual')
165
- get <id> Fetch one company
166
- update <id> Patch stage, name, custom JSON
167
163
  delete <id> Soft-delete
168
- restore <id> Undo a soft-delete
164
+ get <id> Fetch one company
165
+ list List all companies
169
166
  promote <domain> Promote a Goldfox company → CRM (Goldfox company id IS the domain)
167
+ restore <id> Undo a soft-delete
168
+ search Filter by stage / source / domain
169
+ update <id> Patch stage, name, custom JSON
170
170
 
171
171
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
172
172
  return;
@@ -205,15 +205,15 @@ export async function run(subcommand, args, flags) {
205
205
  info(`Usage: myapi crm contacts <subcommand>
206
206
 
207
207
  Subcommands:
208
- list Most-recently-engaged contacts (no filter)
209
- search Filter by stage / source / email / engagement window
210
208
  create <email> Manually create (source='manual')
211
- get <id> Fetch one contact (with embedded Goldfox enrichment, when available)
212
- update <id> Patch stage, names, company_id, custom JSON
213
209
  delete <id> Soft-delete (events retained)
214
- restore <id> Undo a soft-delete
215
- promote <goldfox_person_id> Promote a Goldfox lead → CRM contact (idempotent)
216
210
  events <id> Timeline of events on a contact (newest first)
211
+ get <id> Fetch one contact (with embedded Goldfox enrichment, when available)
212
+ list Most-recently-engaged contacts (no filter)
213
+ promote <goldfox_person_id> Promote a Goldfox lead → CRM contact (idempotent)
214
+ restore <id> Undo a soft-delete
215
+ search Filter by stage / source / email / engagement window
216
+ update <id> Patch stage, names, company_id, custom JSON
217
217
 
218
218
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
219
219
  return;
@@ -39,8 +39,8 @@ export async function run(subcommand, args, flags) {
39
39
  info(`Usage: myapi crm <namespace> <subcommand>
40
40
 
41
41
  Namespaces:
42
- contacts The people you've engaged with (private to org)
43
42
  companies The companies you've engaged with (private to org)
43
+ contacts The people you've engaged with (private to org)
44
44
 
45
45
  Each namespace shares the same subcommands:
46
46
  list List with no filter (alias for search)
@@ -224,9 +224,9 @@ export async function run(subcommand, args, flags) {
224
224
  info(`Usage: myapi database <subcommand>
225
225
 
226
226
  Namespaces:
227
- namespaces List namespaces in the org
228
227
  create <name> Create a namespace
229
228
  delete-namespace <name> Delete a namespace AND all its keys (irreversible)
229
+ namespaces List namespaces in the org
230
230
 
231
231
  Keys (require --ns <namespace>):
232
232
  keys List keys in a namespace
@@ -276,6 +276,6 @@ Exit codes:
276
276
  1 one or more critical issues
277
277
 
278
278
  Options:
279
- --verbose Show passing checks too.
280
279
  --json Machine-readable output.
281
- --org <id> Override the default org.`;
280
+ --org <id> Override the default org.
281
+ --verbose Show passing checks too.`;
@@ -114,23 +114,44 @@ export async function importCmd(domainArg, flags) {
114
114
  }
115
115
  success(`Imported ${res.domain} (status: ${res.status})`);
116
116
  info('');
117
- info(`Nameservers (set these at your current registrar):`);
118
- for (const ns of res.nameservers)
119
- info(` ${ns}`);
120
- info('');
121
- if (res.preserved_records.length > 0) {
122
- info(`Preserved DNS records (${res.preserved_count} foundverify before the NS change):`);
123
- printTable(res.preserved_records.map(r => ({ type: r.type, name: r.name, content: r.content, ttl: r.ttl })), { flags });
117
+ // Defensive the backend has shipped this response with a non-array
118
+ // `nameservers` (the domain_id string mis-serialized into the field) and
119
+ // missing `preserved_records` in some states. JS iterating a string
120
+ // prints char-per-line and reading .length on undefined crashes; see
121
+ // docs/cross-repo-prompts/backend-domain-import-response-shape.md. Never
122
+ // trust the shape blindlydegrade to pointing at `domain status`,
123
+ // which is queryable for the real values.
124
+ if (Array.isArray(res.nameservers) && res.nameservers.length > 0) {
125
+ info(`Nameservers (set these at your current registrar):`);
126
+ for (const ns of res.nameservers)
127
+ info(` ${ns}`);
128
+ info('');
129
+ }
130
+ else {
131
+ info(`⚠ Backend returned an unexpected nameservers shape (got ${typeof res.nameservers}).`);
132
+ info(` The domain is imported — fetch the real nameservers with:`);
133
+ info(` myapi domain status ${res.domain} --json`);
134
+ info('');
135
+ }
136
+ const preserved = Array.isArray(res.preserved_records) ? res.preserved_records : [];
137
+ const preservedCount = typeof res.preserved_count === 'number' ? res.preserved_count : preserved.length;
138
+ if (preserved.length > 0) {
139
+ info(`Preserved DNS records (${preservedCount} found — verify before the NS change):`);
140
+ printTable(preserved.map(r => ({ type: r.type, name: r.name, content: r.content, ttl: r.ttl })), { flags });
124
141
  info('');
125
142
  }
126
143
  else {
127
144
  info(`No DNS records detected via public probe — verify directly with your registrar before the NS change.`);
128
145
  info('');
129
146
  }
130
- info(res.probe_warning);
131
- info('');
132
- info(res.next_step);
133
- info('');
147
+ if (res.probe_warning) {
148
+ info(res.probe_warning);
149
+ info('');
150
+ }
151
+ if (res.next_step) {
152
+ info(res.next_step);
153
+ info('');
154
+ }
134
155
  info(`After changing nameservers, watch activation with:`);
135
156
  info(` myapi domain status ${res.domain} --watch`);
136
157
  }
@@ -422,12 +443,12 @@ async function recordsDelete(domainArg, recordId, flags) {
422
443
  const RECORDS_HELP = `Usage: myapi domain records <subcommand> <domain> [...]
423
444
 
424
445
  Subcommands:
425
- list <domain> [--type A|AAAA|CNAME|MX|TXT]
426
- get <domain> <record-id>
427
446
  create <domain> --type <T> --name <n> --content <c> [--ttl <n>]
428
447
  [--priority <n>] [--proxied]
429
- update <domain> <record-id> [--content ...] [--ttl ...] [--priority ...] [--proxied]
430
448
  delete <domain> <record-id> [--yes]
449
+ get <domain> <record-id>
450
+ list <domain> [--type A|AAAA|CNAME|MX|TXT]
451
+ update <domain> <record-id> [--content ...] [--ttl ...] [--priority ...] [--proxied]
431
452
 
432
453
  Name normalization:
433
454
  --name=@ Apex (e.g. example.com)
@@ -584,19 +605,19 @@ export async function run(subcommand, args, flags) {
584
605
  info(`Usage: myapi domain <subcommand>
585
606
 
586
607
  Subcommands:
587
- list List domains
608
+ assign Assign domain to an org
588
609
  check Check domain availability
589
- register Register a domain
610
+ email-setup Opt in to MyAPI-managed email on a subdomain (default: mail.<domain>)
590
611
  import Bring your own domain (BYOD) — registrar-agnostic
612
+ list List domains
613
+ records Manage DNS records in the zone (list / get / create / update / delete)
614
+ register Register a domain
591
615
  renew Renew a registered domain for another period
592
- assign Assign domain to an org
593
- unassign Unassign domain from its current org
594
- status Get domain status
616
+ retry-provisioning Re-run provisioning when status=infra_error and the failure is retryable
595
617
  settings Get edge/CDN settings
618
+ status Get domain status
619
+ unassign Unassign domain from its current org
596
620
  update-settings Update edge/CDN settings
597
- records Manage DNS records in the zone (list / get / create / update / delete)
598
- email-setup Opt in to MyAPI-managed email on a subdomain (default: mail.<domain>)
599
- retry-provisioning Re-run provisioning when status=infra_error and the failure is retryable
600
621
 
601
622
  Tip: Set defaults with "myapi config set-org <id>" / "set-domain <domain>" to skip flags on every command.`);
602
623
  return;
@@ -163,15 +163,15 @@ export async function run(sub, args, flags) {
163
163
 
164
164
  Subcommands:
165
165
  create <name> Create a campaign (--template-id --from)
166
- list List campaigns
167
166
  get <id> Get a single campaign
168
- update <id> Patch name / per-day-limit
169
- upload-contacts <id> Upload contact list (--emails a@x,b@y)
170
- upload-contacts-file <id> Upload contacts from a CSV file (--file path/to/contacts.csv)
171
- start <id> Start a campaign
167
+ list List campaigns
172
168
  pause <id> Pause a campaign
173
169
  resume <id> Resume a campaign
170
+ start <id> Start a campaign
174
171
  stats <id> Get campaign stats
172
+ update <id> Patch name / per-day-limit
173
+ upload-contacts <id> Upload contact list (--emails a@x,b@y)
174
+ upload-contacts-file <id> Upload contacts from a CSV file (--file path/to/contacts.csv)
175
175
 
176
176
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
177
177
  return;
@@ -79,12 +79,12 @@ export async function run(subcommand, args, flags) {
79
79
  info(`Usage: myapi email <namespace> <subcommand>
80
80
 
81
81
  Namespaces:
82
+ campaign Email campaigns (org-scoped) — create, list, get, update, upload-contacts, start, pause, resume, stats
82
83
  mailbox Mailboxes (account-scoped) — create, list, activate-sending
83
84
  message Send & read mail (account-scoped) — send, status, sent, inbox, outbox, get
84
- warmup Warmup controls (account-scoped) — start, pause, resume, stop, stats
85
85
  template Email templates (org-scoped) — generate, list, edit, send-test, delete
86
- campaign Email campaigns (org-scoped) — create, list, get, update, upload-contacts, start, pause, resume, stats
87
86
  verify Sync single-address email verification (org-scoped) — syntax + DNS + Microsoft probe
87
+ warmup Warmup controls (account-scoped) — start, pause, resume, stop, stats
88
88
 
89
89
  Examples:
90
90
  myapi email mailbox create hello@example.com
@@ -94,11 +94,11 @@ export async function run(sub, args, flags) {
94
94
  info(`Usage: myapi email mailbox <subcommand>
95
95
 
96
96
  Subcommands:
97
+ activate-sending Activate outbound sending for a mailbox
98
+ clear-forwarding Stop forwarding for a mailbox
97
99
  create Create a mailbox (positional <user@domain> or --username/--domain)
98
100
  list List mailboxes on a domain (--domain) or orphaned ones (--filter unassigned)
99
- activate-sending Activate outbound sending for a mailbox
100
- set-forwarding Forward a copy of incoming mail to an external address
101
- clear-forwarding Stop forwarding for a mailbox`);
101
+ set-forwarding Forward a copy of incoming mail to an external address`);
102
102
  return;
103
103
  }
104
104
  if (flags.help) {
@@ -118,12 +118,12 @@ export async function run(sub, args, flags) {
118
118
  info(`Usage: myapi email message <subcommand>
119
119
 
120
120
  Subcommands:
121
- send Send an email (transactional or templated)
122
- status <id> Get delivery status of a sent message
123
- sent List sent emails
121
+ get <id> Get a single message (--address <email>)
124
122
  inbox <addr> Read inbox for a mailbox address
125
123
  outbox <addr> Read outbox for a mailbox address
126
- get <id> Get a single message (--address <email>)`);
124
+ send Send an email (transactional or templated)
125
+ sent List sent emails
126
+ status <id> Get delivery status of a sent message`);
127
127
  return;
128
128
  }
129
129
  if (flags.help) {
@@ -135,13 +135,13 @@ export async function run(sub, args, flags) {
135
135
  info(`Usage: myapi email template <subcommand>
136
136
 
137
137
  Subcommands:
138
+ delete <id> Delete a template
139
+ edit <id> Edit a template via prompt
138
140
  generate <name> Generate AI template (--prompt)
139
- list List templates
140
141
  get <id> Get a template's metadata (subject, preview URL, ...)
142
+ list List templates
141
143
  preview <id> Get a template's rendered preview (no auth required)
142
- edit <id> Edit a template via prompt
143
144
  send-test <id> Send a test email for a template (--to)
144
- delete <id> Delete a template
145
145
 
146
146
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
147
147
  return;
@@ -240,12 +240,12 @@ Create, deploy, and manage functions on the MyAPI edge runtime.
240
240
 
241
241
  Subcommands:
242
242
  create Register a function and get its scoped API key (returned once)
243
+ delete <id> Soft-delete and revoke its scoped API key
243
244
  deploy <id> <file> Upload a JS bundle and go live
244
245
  env <id> <k> <v> Set a Worker Secret on a deployed function
245
- runs <id> List recent invocation records
246
- list List functions in your org
247
246
  get <id> Inspect a function
248
- delete <id> Soft-delete and revoke its scoped API key
247
+ list List functions in your org
248
+ runs <id> List recent invocation records
249
249
 
250
250
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
251
251
  return;
@@ -312,13 +312,13 @@ export async function run(subcommand, args, flags) {
312
312
  info(`Usage: myapi funnel <subcommand>
313
313
 
314
314
  Subcommands:
315
- list List funnels
316
315
  create Create a funnel (optional --name; backend defaults to org's preview_subdomain)
317
- get <id> Get funnel details
318
316
  delete Delete a funnel
317
+ get <id> Get funnel details
318
+ list List funnels
319
+ pages List the pages currently published to a funnel
319
320
  publish Publish a whole local directory as the site (dev or prod)
320
321
  push Push a raw HTML page from stdin to a slug
321
- pages List the pages currently published to a funnel
322
322
  verify Verify a published page is reachable
323
323
 
324
324
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
@@ -191,12 +191,12 @@ export async function run(subcommand, args, flags) {
191
191
  info(`Usage: myapi image <subcommand>
192
192
 
193
193
  Subcommands:
194
- list List all your generated images
194
+ delete <job_id> Delete the asset (job history retained)
195
195
  generate <prompt> Generate a new AI image (async, polls up to 90s; pricing per model — see "image models")
196
196
  get <job_id> Fetch full job metadata (JSON or human-readable)
197
197
  get-url <job_id> Print just the asset URL (curl-friendly)
198
+ list List all your generated images
198
199
  models List available image models with per-image pricing
199
- delete <job_id> Delete the asset (job history retained)
200
200
 
201
201
  All commands accept --org <id> (or set default: myapi config set-org <id>).
202
202
  The asset lands in your org's storage and is also visible via "myapi storage list".`);
@@ -174,8 +174,8 @@ slot grants, and an optional spend cap. A minted key is always a subset of the
174
174
  key that minted it (no privilege escalation).
175
175
 
176
176
  Subcommands:
177
- list List keys with kind, scope, grants, and spend cap
178
177
  create Mint a new key (value shown once)
178
+ list List keys with kind, scope, grants, and spend cap
179
179
  revoke <id> Revoke one key by ID
180
180
  revoke-all Kill switch — revoke every key (or --kind function|manual|account)
181
181
 
@@ -217,12 +217,12 @@ export async function run(subcommand, args, flags) {
217
217
  info(`Usage: myapi org <subcommand>
218
218
 
219
219
  Subcommands:
220
- list List organizations
221
220
  create Create an organization (e.g. myapi org create "Name" --yes)
222
- update Update an organization's fields (name, tagline, description, etc.)
223
- get Get details of an organization
224
221
  delete Delete an organization
225
- sync-brand Sync brand info (name, logo, description) from an existing website`);
222
+ get Get details of an organization
223
+ list List organizations
224
+ sync-brand Sync brand info (name, logo, description) from an existing website
225
+ update Update an organization's fields (name, tagline, description, etc.)`);
226
226
  return;
227
227
  }
228
228
  if (flags.help) {
@@ -189,12 +189,12 @@ Take payments with Stripe Checkout. Connect your Stripe account, then
189
189
  create one-off or recurring charges and refund them.
190
190
 
191
191
  Subcommands:
192
- connect Link your Stripe account (T0 — bring your own key)
193
- status Show the org's Stripe connection status
194
192
  charge Create a charge and get a hosted checkout URL
195
- list List charges in your org
193
+ connect Link your Stripe account (T0 — bring your own key)
196
194
  get <charge_id> Inspect a charge
195
+ list List charges in your org
197
196
  refund <charge_id> Full-refund a charge
197
+ status Show the org's Stripe connection status
198
198
 
199
199
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
200
200
  return;
@@ -113,8 +113,8 @@ export async function run(subcommand, args, flags) {
113
113
  info(`Usage: myapi people <subcommand>
114
114
 
115
115
  Subcommands:
116
- search Filter people across the Goldfox database
117
116
  get Get a single person (with embedded company)
117
+ search Filter people across the Goldfox database
118
118
 
119
119
  All commands accept --org <id> (or set a default: myapi config set-org <id>).
120
120
  Filter shape is shared with company + audience — see myapi audience --help.`);
@@ -156,12 +156,12 @@ export async function run(subcommand, args, flags) {
156
156
  info(`Usage: myapi pixel <subcommand>
157
157
 
158
158
  Subcommands:
159
+ audience Geographic distribution sample of your pixel audience
160
+ events Engagement events (sent / open / click / page_visit) by campaign or domain
161
+ identity Resolve the identity graph (emails, IPs, profiles) for a pixel ID
159
162
  interactions Get a unified timeline of visits and events
160
163
  (requires at least one filter: --website, --campaign-id, or --domain)
161
164
  visits Page-visit timeline scoped to a website host
162
- events Engagement events (sent / open / click / page_visit) by campaign or domain
163
- audience Geographic distribution sample of your pixel audience
164
- identity Resolve the identity graph (emails, IPs, profiles) for a pixel ID
165
165
 
166
166
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
167
167
  return;
@@ -141,12 +141,12 @@ export async function run(subcommand, args, flags) {
141
141
  info(`Usage: myapi storage <subcommand>
142
142
 
143
143
  Subcommands:
144
- list List all your stored assets
145
- ingest <url> Server pulls a public URL into storage
146
- upload <file> Direct upload of a local file
144
+ delete <asset_id> Permanently delete a stored asset
147
145
  get <asset_id> Fetch asset metadata (name, URL, created_at)
148
146
  get-url <asset_id> Print the public CDN URL (no API call)
149
- delete <asset_id> Permanently delete a stored asset
147
+ ingest <url> Server pulls a public URL into storage
148
+ list List all your stored assets
149
+ upload <file> Direct upload of a local file
150
150
 
151
151
  All commands accept --org <id> (or set default: myapi config set-org <id>).`);
152
152
  return;
@@ -159,11 +159,11 @@ export async function run(subcommand, args, flags) {
159
159
  info(`Usage: myapi webhook <subcommand>
160
160
 
161
161
  Subcommands:
162
- list List all inbound webhook endpoints
163
162
  create Create a new endpoint to receive data (returns an inbound URL)
164
- update Patch endpoint name / description / crm-email-path / forward-url
165
163
  delete Delete a webhook endpoint
166
164
  delivery Inspect a specific webhook delivery (payload, received_at)
165
+ list List all inbound webhook endpoints
166
+ update Patch endpoint name / description / crm-email-path / forward-url
167
167
 
168
168
  All commands accept --org <id> (or set default: myapi config set-org <id>).
169
169
 
@@ -360,15 +360,15 @@ export async function run(subcommand, args, flags) {
360
360
  myapi workflow create --help
361
361
 
362
362
  Subcommands:
363
- list List all workflows
364
- get <id> Show a single workflow
365
363
  create Create a workflow (enabled by default; --no-enable to stage)
366
- update <id> Patch name / endpoint-id / steps
367
- enable <id> Enable a workflow
368
- disable <id> Disable a workflow
369
364
  delete <id> Delete a workflow
370
- runs <workflow_id> List recent executions of a workflow
365
+ disable <id> Disable a workflow
366
+ enable <id> Enable a workflow
367
+ get <id> Show a single workflow
371
368
  get-run <run_id> Show a single run with full payload
369
+ list List all workflows
370
+ runs <workflow_id> List recent executions of a workflow
371
+ update <id> Patch name / endpoint-id / steps
372
372
 
373
373
  Step types for --steps:
374
374
  send_email {"type":"send_email","from":"<mailbox>","to":"{{payload.email}}","subject":"...","template_id":"<id>"|"html":"..."}
package/dist/index.js CHANGED
@@ -399,40 +399,40 @@ Usage: myapi <command> [subcommand] [args]
399
399
  myapi --version
400
400
 
401
401
  Commands:
402
+ audience Save filter snapshots as named audiences (people or companies)
402
403
  auth Manage account · setup · whoami · link
403
- status Single-screen view of account + resources in the default org
404
- install-skills Install or update the MyAPI skills pack for AI agents
405
404
  billing Check balance and manage billing
406
- org Manage organizations (tip: myapi org create "name" --yes to auto-set as default)
407
- update Update CLI and skills to the latest version
405
+ company Search the company database (filter by industry, size, country, ...)
406
+ container Run containers services, workers, and scheduled jobs
407
+ crm Canonical store of engaged contacts + companies, with auto-ingest from webhooks
408
+ database KV store with namespaces + CAS — the substrate for stateful agent apps
409
+ doctor Org-wide consistency check — funnels, webhooks, domains, containers
408
410
  domain Manage domain configurations
409
- funnel Manage websites (publish pages, custom domains, funnels)
411
+ email Manage mailboxes, send/read email, templates, and campaigns
410
412
  fn Create and deploy functions on the edge runtime
411
- container Run containers services, workers, and scheduled jobs
413
+ funnel Manage websites (publish pages, custom domains, funnels)
412
414
  git Hosted git repositories — repos, commits, branches, history
415
+ image Generate AI images and manage them in storage
416
+ install-skills Install or update the MyAPI skills pack for AI agents
417
+ llm Run LLM completions and embeddings (chat + embed, with usage/cost)
418
+ org Manage organizations (tip: myapi org create "name" --yes to auto-set as default)
419
+ payments Take payments with Stripe Checkout (connect, charge, refund)
420
+ people Search the contact database (filter by industry, seniority, country, ...)
421
+ pixel Read pixel analytics: visits, events, identity resolution
413
422
  queue Durable job queue — enqueue work, retried against an HTTP consumer
423
+ status Single-screen view of account + resources in the default org
424
+ storage Upload, ingest, list, and serve assets from edge storage
414
425
  task Agent-task queue — file, claim, and resolve units of work
415
- doctor Org-wide consistency check funnels, webhooks, domains, containers
416
- payments Take payments with Stripe Checkout (connect, charge, refund)
426
+ update Update CLI and skills to the latest version
427
+ url Shorten URLs to compact myurlto.com links
417
428
  webhook Manage inbound webhook endpoints and inspect deliveries
418
- email Manage mailboxes, send/read email, templates, and campaigns
419
429
  workflow Run actions (send email, post to Slack) when a webhook fires
420
- image Generate AI images and manage them in storage
421
- storage Upload, ingest, list, and serve assets from edge storage
422
- pixel Read pixel analytics: visits, events, identity resolution
423
- people Search the contact database (filter by industry, seniority, country, ...)
424
- company Search the company database (filter by industry, size, country, ...)
425
- audience Save filter snapshots as named audiences (people or companies)
426
- llm Run LLM completions and embeddings (chat + embed, with usage/cost)
427
- database KV store with namespaces + CAS — the substrate for stateful agent apps
428
- crm Canonical store of engaged contacts + companies, with auto-ingest from webhooks
429
- url Shorten URLs to compact myurlto.com links
430
430
 
431
431
  Aliases:
432
- whoami → myapi auth whoami
432
+ config → myapi auth config
433
433
  keys → myapi auth api-keys
434
434
  setup → myapi auth setup
435
- config → myapi auth config
435
+ whoami → myapi auth whoami
436
436
 
437
437
  Run "myapi <command> --help" for subcommand help.
438
438
 
@@ -50,7 +50,7 @@ pixel_visit | webhook_received
50
50
 
51
51
  Agents cannot write events directly — the closed enum is intentional. If you need custom state, use **mydatabaseapi** (KV) keyed on the contact id; the curated timeline stays authoritative for engagement.
52
52
 
53
- **Engagement-event kinds bump `last_engagement_at`**: email_sent/opened/clicked/replied, pixel_visit, webhook_received. Admin kinds (created, promoted, stage_changed) don't. That's the right semantics — promoting a Goldfox lead into the CRM is not engagement.
53
+ **Engagement-event kinds bump `last_engagement_at`**: email_sent/opened/clicked/replied, pixel_visit, webhook_received. Admin kinds (created, promoted, stage_changed) don't — promoting a Goldfox lead isn't engagement.
54
54
 
55
55
  ### Auto-ingest
56
56
 
@@ -157,8 +157,7 @@ myapi crm contacts events <id> --kind webhook_received
157
157
  ## Notes
158
158
 
159
159
  - **Reserved event kinds — no custom events in v1.** If an agent needs custom state per contact, use `myapi database` keyed by contact id. The curated timeline stays the authoritative engagement record.
160
- - **Event payloads carry an `external_id`** field used by the backend's idempotency index same value as the natural id of the underlying action (`goldfox_person_id` for `promoted`, `delivery_id` for `webhook_received`, future `message_id` for `email_sent`). Read the semantic field (e.g. `goldfox_person_id`); `external_id` is a backend-internal duplicate. Old rows may still carry a legacy `message_id` field same value as `external_id`; safe to ignore.
161
- - **Goldfox enrichment field deferred** — the live join lands once the BQ get-by-id helper is wired backend-side. CLI treats it as optional today.
160
+ - **Event payloads carry an `external_id`** the backend's idempotency key, equal to the underlying action's natural id (`goldfox_person_id` for `promoted`, `delivery_id` for `webhook_received`). Read the semantic field; `external_id` is a backend-internal duplicate. A legacy `message_id` on old rows holds the same value safe to ignore.
162
161
  - **Email + Pixel auto-ingest not yet wired**. Only `webhook_received` events fire today. Email and pixel ingest are coming — the CLI surface stays unchanged when they land.
163
162
  - **Free in v1.** Metered later if usage shows a need.
164
163
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/cli",
3
3
  "license": "Apache-2.0",
4
- "version": "1.3.4",
4
+ "version": "1.3.6",
5
5
  "description": "MyAPI command-line interface",
6
6
  "type": "module",
7
7
  "files": [
@@ -29,7 +29,7 @@
29
29
  "lint:changelog": "node ../../scripts/lint-changelog.js"
30
30
  },
31
31
  "dependencies": {
32
- "@myapihq/sdk": "^1.3.4"
32
+ "@myapihq/sdk": "^1.3.6"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "^25.6.0",