@myapihq/cli 2.31.8 → 2.31.9

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.
@@ -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 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 resume-sending Turn email sending back on after an automatic pause (account or org)\n sending Whether this account can send email, and how close it is to the limits\n setup Configure your account\n switch [index] Switch active account by index or email\n whoami Show current account \u00B7 supports --json";
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] Attach an email to a pre-2026-10 anonymous account (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 resume-sending Turn email sending back on after an automatic pause (account or org)\n sending Whether this account can send email, and how close it is to the limits\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
8
  export declare const SUBCOMMAND_USAGE: Record<string, string>;
9
9
  export declare function link(flags?: Flags, emailArg?: string): Promise<void>;
@@ -51,7 +51,7 @@ Subcommands:
51
51
  import-key Import an existing API key non-interactively
52
52
  install-skills DEPRECATED — use \`myapi install-skills\` instead
53
53
  keys Alias for api-keys
54
- link [email] Upgrade anonymous account to registered (or add a second session)
54
+ link [email] Attach an email to a pre-2026-10 anonymous account (or add a second session)
55
55
  Use myapi account setup to create a completely new account
56
56
  login Sign in via your browser — Google or email code (preview: --mock)
57
57
  mailing-address Get or set the account's mailing address (CAN-SPAM)
@@ -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 login [--no-browser] [--mock]\n\nSigns in to MyAPI in your browser \u2014 Google, or an email code \u2014 and stores the\nsession in ~/.myapi/config.json. The account created/linked here is the same\naccount model as `myapi account setup`; anonymous setup stays available and\nunchanged.\n\nFlags:\n --no-browser Print the sign-in URL instead of opening a browser\n --mock Run the flow against an in-process mock (offline UX preview;\n nothing is saved, no network calls leave your machine)";
6
+ export declare const HELP = "Usage: myapi login [--no-browser] [--mock]\n\nSigns in to MyAPI in your browser \u2014 Google, or an email code \u2014 and stores the\nsession in ~/.myapi/config.json. The account created/linked here is the same\naccount model as `myapi account setup`: one account type, always with a\nverified email. Anonymous accounts are no longer created.\n\nFlags:\n --no-browser Print the sign-in URL instead of opening a browser\n --mock Run the flow against an in-process mock (offline UX preview;\n nothing is saved, no network calls leave your machine)";
7
7
  export interface Pkce {
8
8
  verifier: string;
9
9
  challenge: string;
@@ -28,8 +28,8 @@ export const HELP = `Usage: myapi login [--no-browser] [--mock]
28
28
 
29
29
  Signs in to MyAPI in your browser — Google, or an email code — and stores the
30
30
  session in ~/.myapi/config.json. The account created/linked here is the same
31
- account model as \`myapi account setup\`; anonymous setup stays available and
32
- unchanged.
31
+ account model as \`myapi account setup\`: one account type, always with a
32
+ verified email. Anonymous accounts are no longer created.
33
33
 
34
34
  Flags:
35
35
  --no-browser Print the sign-in URL instead of opening a browser
@@ -25,7 +25,6 @@ function getCliVersion() {
25
25
  return _cliVersion;
26
26
  }
27
27
  export const EXPOSES = [
28
- 'POST /hq/account/anonymous',
29
28
  'POST /hq/account/send-code',
30
29
  'POST /hq/account/verify-code',
31
30
  'GET /hq/account/me',
@@ -215,9 +214,6 @@ async function registeredFlow() {
215
214
  const data = await hq.verifyCode(email, code);
216
215
  return { ...data, email };
217
216
  }
218
- async function anonymousFlow() {
219
- return hq.createAnonymousAccount();
220
- }
221
217
  // ---------------------------------------------------------------------------
222
218
  // Main setup command
223
219
  // ---------------------------------------------------------------------------
@@ -241,13 +237,14 @@ Examples:
241
237
  echo "$MY_KEY" | myapi account import-key
242
238
  MYAPI_API_KEY="$MY_KEY" myapi account import-key --install-skills
243
239
  myapi account import-key < key.txt`;
244
- const SETUP_HELP = `Usage: myapi account setup [--anonymous] [--yes] [--install-skills|--no-skills]
240
+ const SETUP_HELP = `Usage: myapi account setup [--yes] [--install-skills|--no-skills]
245
241
 
246
- Configures your account and stores your default org and funnel so you don't
247
- need to pass --org or --funnel on every command.
242
+ Creates your account with an email code, grants the $5 free credit, and stores
243
+ your default org and funnel so you don't need to pass --org or --funnel on
244
+ every command. There is one account type: every account has a verified email.
245
+ For CI or Docker, mint a key in your account and use \`myapi account import-key\`.
248
246
 
249
247
  Flags:
250
- --anonymous Skip registration, create anonymous account
251
248
  --yes Skip confirmation prompts
252
249
  --install-skills Auto-install skills pack
253
250
  --no-skills Skip skills installation`;
@@ -362,34 +359,23 @@ export async function setup(flags = {}) {
362
359
  }
363
360
  // Fall through to setup flow — new account will be added to the list.
364
361
  }
365
- let apiKey = '';
366
- let accountId = '';
367
- let defaultOrg = '';
368
- let defaultFunnel = '';
369
- let subdomainUrl = '';
370
- let isAnonymous = false;
371
- let email = '';
372
- const useAnon = flags.anonymous || flags.anon;
373
- const wantsRegister = useAnon ? false : await confirm('› Register with email? (Y/n, or N to continue anonymously) ', true);
374
- if (wantsRegister) {
375
- const data = await registeredFlow();
376
- apiKey = data.api_key;
377
- accountId = data.account_id;
378
- defaultOrg = data.default_org;
379
- defaultFunnel = data.default_funnel;
380
- email = data.email;
381
- }
382
- else {
383
- info('› Continuing as anonymous — sites ship to *.makeautonomous.com');
384
- info(' (Anonymous accounts have $0 credit. Link an email anytime to unlock $5 free credit and paid actions: myapi account link <email>)');
385
- const data = await anonymousFlow();
386
- apiKey = data.api_key;
387
- accountId = data.account_id;
388
- defaultOrg = data.default_org;
389
- defaultFunnel = data.default_funnel;
390
- subdomainUrl = data.subdomain_url;
391
- isAnonymous = true;
362
+ // Anonymous accounts were retired on 2026-10-04: a key with no identity was
363
+ // the abuse surface for free pages and functions, could not be measured in
364
+ // the funnel, and could never receive the $5 credit. Accounts created that
365
+ // way before the cut keep working (`myapi account link` attaches an email);
366
+ // new ones are refused here and by the backend.
367
+ if (flags.anonymous || flags.anon) {
368
+ throw new Error('Anonymous accounts are no longer created. Every account has a verified email:\n' +
369
+ ' myapi account setup — email code, $5 free credit, no card\n' +
370
+ ' myapi login — Google or email, in the browser\n' +
371
+ ' myapi account import-key — a key minted in an existing account (CI, Docker)');
392
372
  }
373
+ const data = await registeredFlow();
374
+ const apiKey = data.api_key;
375
+ const accountId = data.account_id;
376
+ let defaultOrg = data.default_org;
377
+ let defaultFunnel = data.default_funnel;
378
+ const email = data.email;
393
379
  const wantsSkills = await resolveSkillsPreference(flags);
394
380
  await installAndPersistSkills({
395
381
  api_key: apiKey,
@@ -397,7 +383,7 @@ export async function setup(flags = {}) {
397
383
  email: email || undefined,
398
384
  default_org: defaultOrg,
399
385
  default_funnel: defaultFunnel,
400
- is_anonymous: isAnonymous,
386
+ is_anonymous: false,
401
387
  }, wantsSkills);
402
388
  // Report where the config ACTUALLY went. This was hardcoded to
403
389
  // `~/.myapi/config.json`, which became a lie the moment MYAPI_CONFIG_DIR
@@ -423,15 +409,7 @@ export async function setup(flags = {}) {
423
409
  }
424
410
  }
425
411
  catch { /* non-fatal */ }
426
- if (isAnonymous) {
427
- success('› Setup complete. No card, no email, ready to ship.');
428
- if (subdomainUrl)
429
- info(`› Your funnel: ${subdomainUrl}`);
430
- info('› Upgrade anytime — myapi account link');
431
- }
432
- else {
433
- success(`› Setup complete. Org ${defaultOrg} ready · $5.00 free credits added.`);
434
- }
412
+ success(`› Setup complete. Org ${defaultOrg} ready · $5.00 free credits added.`);
435
413
  // The key just saved is account-wide, and it has to be: an org-locked key
436
414
  // cannot create orgs or manage billing, so locking the operator's own
437
415
  // credential would break the next thing they do. The scoping belongs on the
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: my-api-hq
3
- version: 1.3.2
3
+ version: 1.3.3
4
4
  description: >
5
5
  Auth, organizations, and billing hub. Start here to get an api_key and org_id — every other service depends on both.
6
6
  triggers: [api key, account, organization, org, billing, balance, topup, credits, setup, defaults, brand, sync brand, doctor, health check, is my org healthy]
7
- checksum: sha256-d09b77d74b93ca44d7b913fce6b684a6dda21d0dff9efe2686143abffeb217ee
7
+ checksum: sha256-c6e5e9de3396995e6ea7bfb044c8253a46df12f0f9fac27fd23f5f8864a25f53
8
8
  ---
9
9
 
10
10
  # MyApiHQ
@@ -15,14 +15,11 @@ The root service. It manages accounts, API keys, organizations, and billing. No
15
15
  <!-- llm:start -->
16
16
  MyApiHQ is the platform's foundation: every other service needs an `api_key` and (for org-scoped resources) an `org_id` minted here. `myapi account setup` provisions an account, key and first org into `~/.myapi/config.json`, and later commands pick those up.
17
17
 
18
- ### Anonymous vs registered accounts
18
+ ### One account type
19
19
 
20
- Two tiers, chosen at setup time:
20
+ Every account has a verified email. `myapi account setup` sends a code, verifies it, and grants **$5 free credit** — no card. `myapi login` does the same in the browser (Google or email). For CI or Docker, mint a key in an existing account and use `myapi account import-key`.
21
21
 
22
- - **Anonymous** (`myapi account setup --anonymous`): zero friction, **$0 credit.** Fine for browsing the catalog and reading help.
23
- - **Registered** (verify email via `myapi account link <email>`): unlocks $5 free credit and the paid surface (LLM, image, email, domain register).
24
-
25
- An anonymous account upgrades any time with `myapi account link <email>`; the credit grants on verification.
22
+ Anonymous accounts are no longer created (`--anonymous` is refused). Pre-October-2026 ones keep working; `myapi account link <email>` attaches an email and grants the credit.
26
23
 
27
24
  ### Health check
28
25
 
@@ -1,10 +1,10 @@
1
1
  ---
2
2
  name: my-auth-api
3
- version: 1.1.1
3
+ version: 1.1.2
4
4
  description: >
5
5
  Add authentication to apps you build on MyAPI — a managed OIDC identity provider for your app's END USERS (à la Kinde/Auth0). One auth tenant per org; register OIDC clients; sign users in with managed Google or the hosted login page; verify RS256 tokens against the tenant JWKS.
6
6
  triggers: [auth, authentication, login, sign-in, oidc, oauth, jwt, jwks, sso, google sign-in, user accounts, identity provider, kinde, auth0, clerk]
7
- checksum: sha256-92ed5cff8e8cd5bed3f59564b3ebb6a66eb572f0914de28322fbda1b8b6ae943
7
+ checksum: sha256-858dd9e20e5ca44e2266424fdceddd898b0d9935373f53ba4ac5dbe92de46b85
8
8
  ---
9
9
 
10
10
  # MyAuthAPI
@@ -120,12 +120,14 @@ myapi auth client list
120
120
  `http://localhost…` for local dev).
121
121
  - `402 INSUFFICIENT_FUNDS` = empty wallet → `myapi billing topup <amount>` (or keep it funded automatically: `myapi billing auto-recharge set`). `402 SPEND_CAP_EXCEEDED` = you hit your account spend ceiling → raise it with `myapi billing spend-cap`.
122
122
 
123
- ## Anonymous accounts
123
+ ## Machine-owned and throwaway accounts
124
124
 
125
- `myapi account setup --anonymous` skips registration and creates an account
126
- with no email — for throwaway or machine-owned orgs. It cannot receive
127
- password resets or magic links, so attach a real identity before anything
128
- depends on it. `myapi status` shows `Type: anonymous`.
125
+ Anonymous accounts are no longer created (`myapi account setup --anonymous`
126
+ is refused). For a machine-owned or throwaway identity, mint an org-locked key
127
+ in a real account (`myapi keys create --org <id> --grant '*'`) and hand that
128
+ to the workload with `myapi account import-key`. A pre-October-2026 anonymous
129
+ account still shows `Type: anonymous` in `myapi status`; attach an email with
130
+ `myapi account link <email>` before anything depends on it.
129
131
 
130
132
  **End-to-end example:** `examples/authenticated-app/` in github.com/myapihq/myapi walks the full seam — hosted login → token verification → per-user KV record → deployed container — including the parts that cost real users hours (verify the id_token for identity; the access token is a bearer credential for `<issuer>/userinfo`).
131
133
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@myapihq/cli",
3
3
  "license": "Apache-2.0",
4
- "version": "2.31.8",
4
+ "version": "2.31.9",
5
5
  "description": "Command-line interface for MyAPI — websites on your own domain, business email, payments, a customer list. Agents should use the MyAPI MCP server instead: https://api.myapihq.com/mcp",
6
6
  "type": "module",
7
7
  "files": [
@@ -45,7 +45,7 @@
45
45
  "lint:skills:strict": "node scripts/copy-skills.js && node scripts/lint-skills.js --strict"
46
46
  },
47
47
  "dependencies": {
48
- "@myapihq/sdk": "^2.31.8"
48
+ "@myapihq/sdk": "^2.31.9"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@types/node": "^25.6.0",