@thecorporation/cli 26.3.35 → 26.3.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3552,6 +3552,10 @@ async function formCommand(opts) {
3552
3552
  right_of_first_refusal: rofr
3553
3553
  };
3554
3554
  if (companyAddress) payload.company_address = companyAddress;
3555
+ if (entityType === "llc") {
3556
+ const principalName = opts.principalName ?? founders[0]?.name;
3557
+ if (principalName) payload.principal_name = principalName;
3558
+ }
3555
3559
  if (opts.dryRun) {
3556
3560
  printDryRun("formation.create_with_cap_table", payload);
3557
3561
  return;
@@ -3976,7 +3980,9 @@ async function formCreateHandler(ctx) {
3976
3980
  await ctx.resolver.stabilizeRecord("entity", result);
3977
3981
  ctx.resolver.rememberFromRecord("entity", result);
3978
3982
  if (result.entity_id) {
3979
- setActiveEntityId(cfg, String(result.entity_id));
3983
+ const newEntityId = String(result.entity_id);
3984
+ setActiveEntityId(cfg, newEntityId);
3985
+ ctx.resolver.remember("entity", newEntityId);
3980
3986
  saveConfig(cfg);
3981
3987
  }
3982
3988
  if (ctx.quiet) {
@@ -4210,7 +4216,8 @@ var init_formation = __esm({
4210
4216
  { flags: "--fiscal-year-end <date>", description: "Fiscal year end (MM-DD)", default: "12-31" },
4211
4217
  { flags: "--s-corp", description: "Elect S-Corp status" },
4212
4218
  { flags: "--transfer-restrictions", description: "Enable transfer restrictions" },
4213
- { flags: "--rofr", description: "Enable right of first refusal" }
4219
+ { flags: "--rofr", description: "Enable right of first refusal" },
4220
+ { flags: "--principal-name <name>", description: "Managing member name for LLCs (auto-set from first member if omitted)" }
4214
4221
  ],
4215
4222
  handler: formHandler,
4216
4223
  produces: { kind: "entity", trackEntity: true },
@@ -4250,7 +4257,7 @@ var init_formation = __esm({
4250
4257
  successTemplate: "Pending entity created: {legal_name}",
4251
4258
  examples: [
4252
4259
  'corp form create --type c_corp --name "Acme Inc" --jurisdiction US-DE --address "123 Main,City,ST,12345"',
4253
- 'corp form create --type llc --name "My LLC" --jurisdiction US-WY'
4260
+ 'corp form create --type llc --name "My LLC" --jurisdiction US-WY --principal-name "Carlos"'
4254
4261
  ]
4255
4262
  },
4256
4263
  {
@@ -4686,7 +4693,7 @@ var init_cap_table = __esm({
4686
4693
  examples: [
4687
4694
  "corp cap-table",
4688
4695
  'corp cap-table issue-equity --grant-type common --shares 1000000 --recipient "Alice Smith"',
4689
- 'corp cap-table issue-safe --investor "Seed Fund" --amount-cents 50000000 --valuation-cap-cents 1000000000',
4696
+ 'corp cap-table issue-safe --investor "Seed Fund" --amount-dollars 500000 --valuation-cap-dollars 10000000',
4690
4697
  "corp cap-table create-valuation --type four_oh_nine_a --date 2026-01-01 --methodology market",
4691
4698
  "corp cap-table transfer --from alice --to bob --shares 1000 --share-class-id COMMON --governing-doc-type bylaws --transferee-rights full_member"
4692
4699
  ]
@@ -5118,30 +5125,30 @@ var init_cap_table = __esm({
5118
5125
  options: [
5119
5126
  { flags: "--investor <name>", description: "Investor name", required: true },
5120
5127
  { flags: "--amount-cents <n>", description: "Principal amount in cents (e.g. 50000000 = $500,000)", type: "int" },
5121
- { flags: "--amount <n>", description: "Amount in dollars (alternative to --amount-cents)", type: "int" },
5128
+ { flags: "--amount-dollars <n>", description: "Principal amount in dollars (e.g. 500000 = $500,000)", type: "int" },
5122
5129
  { flags: "--safe-type <type>", description: "SAFE type", default: "post_money", choices: ["post_money", "pre_money", "mfn"] },
5123
5130
  { flags: "--valuation-cap-cents <n>", description: "Valuation cap in cents (e.g. 100000000 = $1M)", type: "int" },
5124
- { flags: "--valuation-cap <n>", description: "Valuation cap in dollars (alternative to --valuation-cap-cents)", type: "int" },
5131
+ { flags: "--valuation-cap-dollars <n>", description: "Valuation cap in dollars (e.g. 1000000 = $1M)", type: "int" },
5125
5132
  { flags: "--meeting-id <ref>", description: "Board meeting reference required when issuing under a board-governed entity" },
5126
5133
  { flags: "--resolution-id <ref>", description: "Board resolution reference required when issuing under a board-governed entity" }
5127
5134
  ],
5128
5135
  handler: async (ctx) => {
5129
5136
  const eid = await ctx.resolver.resolveEntity(ctx.opts.entityId);
5130
5137
  const investor = ctx.opts.investor;
5131
- if (ctx.opts.amountCents != null && ctx.opts.amount != null) {
5132
- throw new Error("--amount-cents and --amount are mutually exclusive. Use one or the other.");
5138
+ if (ctx.opts.amountCents != null && ctx.opts.amountDollars != null) {
5139
+ throw new Error("--amount-cents and --amount-dollars are mutually exclusive. Use one or the other.");
5133
5140
  }
5134
- const amountCents = ctx.opts.amountCents != null ? ctx.opts.amountCents : ctx.opts.amount != null ? ctx.opts.amount * 100 : void 0;
5141
+ const amountCents = ctx.opts.amountCents != null ? ctx.opts.amountCents : ctx.opts.amountDollars != null ? ctx.opts.amountDollars * 100 : void 0;
5135
5142
  if (amountCents == null) {
5136
- throw new Error("required option '--amount-cents <n>' or '--amount <n>' not specified");
5143
+ throw new Error("required: --amount-cents <n> or --amount-dollars <n>");
5137
5144
  }
5138
5145
  const safeType = ctx.opts.safeType ?? "post_money";
5139
- if (ctx.opts.valuationCapCents != null && ctx.opts.valuationCap != null) {
5140
- throw new Error("--valuation-cap-cents and --valuation-cap are mutually exclusive. Use one or the other.");
5146
+ if (ctx.opts.valuationCapCents != null && ctx.opts.valuationCapDollars != null) {
5147
+ throw new Error("--valuation-cap-cents and --valuation-cap-dollars are mutually exclusive. Use one or the other.");
5141
5148
  }
5142
- const valuationCapCents = ctx.opts.valuationCapCents != null ? ctx.opts.valuationCapCents : ctx.opts.valuationCap != null ? ctx.opts.valuationCap * 100 : void 0;
5149
+ const valuationCapCents = ctx.opts.valuationCapCents != null ? ctx.opts.valuationCapCents : ctx.opts.valuationCapDollars != null ? ctx.opts.valuationCapDollars * 100 : void 0;
5143
5150
  if (valuationCapCents == null) {
5144
- throw new Error("required option '--valuation-cap-cents <n>' or '--valuation-cap <n>' not specified");
5151
+ throw new Error("required: --valuation-cap-cents <n> or --valuation-cap-dollars <n>");
5145
5152
  }
5146
5153
  const email = ctx.opts.email;
5147
5154
  const optMeetingId = ctx.opts.meetingId;
@@ -5190,7 +5197,10 @@ var init_cap_table = __esm({
5190
5197
  },
5191
5198
  produces: { kind: "safe_note" },
5192
5199
  successTemplate: "SAFE created: {investor_name}",
5193
- examples: ["corp cap-table issue-safe --investor 'name' --amount-cents 'n' --valuation-cap-cents 'n'", "corp cap-table issue-safe --json"]
5200
+ examples: [
5201
+ 'corp cap-table issue-safe --investor "Seed Fund" --amount-dollars 500000 --valuation-cap-dollars 10000000',
5202
+ 'corp cap-table issue-safe --investor "Angel" --amount-cents 50000000 --valuation-cap-cents 1000000000'
5203
+ ]
5194
5204
  },
5195
5205
  // --- cap-table transfer ---
5196
5206
  {
@@ -5304,18 +5314,18 @@ var init_cap_table = __esm({
5304
5314
  dryRun: true,
5305
5315
  options: [
5306
5316
  { flags: "--amount-cents <n>", description: "Total distribution amount in cents (e.g. 100000 = $1,000.00)", required: true, type: "int" },
5307
- { flags: "--amount <n>", description: "Amount in dollars (alternative to --amount-cents)", type: "int" },
5317
+ { flags: "--amount-dollars <n>", description: "Total distribution amount in dollars (e.g. 1000 = $1,000.00)", type: "int" },
5308
5318
  { flags: "--type <type>", description: "Distribution type (dividend, return, liquidation)", default: "dividend" },
5309
5319
  { flags: "--description <desc>", description: "Distribution description", required: true }
5310
5320
  ],
5311
5321
  handler: async (ctx) => {
5312
5322
  const eid = await ctx.resolver.resolveEntity(ctx.opts.entityId);
5313
- if (ctx.opts.amountCents != null && ctx.opts.amount != null) {
5314
- throw new Error("--amount-cents and --amount are mutually exclusive. Use one or the other.");
5323
+ if (ctx.opts.amountCents != null && ctx.opts.amountDollars != null) {
5324
+ throw new Error("--amount-cents and --amount-dollars are mutually exclusive. Use one or the other.");
5315
5325
  }
5316
- const amountCents = ctx.opts.amountCents != null ? ctx.opts.amountCents : ctx.opts.amount != null ? ctx.opts.amount * 100 : void 0;
5326
+ const amountCents = ctx.opts.amountCents != null ? ctx.opts.amountCents : ctx.opts.amountDollars != null ? ctx.opts.amountDollars * 100 : void 0;
5317
5327
  if (amountCents == null) {
5318
- throw new Error("required option '--amount-cents <n>' or '--amount <n>' not specified");
5328
+ throw new Error("required: --amount-cents <n> or --amount-dollars <n>");
5319
5329
  }
5320
5330
  const distributionType = ctx.opts.type ?? "dividend";
5321
5331
  const description = ctx.opts.description;
@@ -6477,19 +6487,19 @@ var init_finance = __esm({
6477
6487
  options: [
6478
6488
  { flags: "--customer <name>", description: "Customer name", required: true },
6479
6489
  { flags: "--amount-cents <n>", description: "Amount in cents (e.g. 500000 = $5,000.00)", type: "int" },
6480
- { flags: "--amount <n>", description: "Amount in dollars (converted to cents)", type: "int" },
6490
+ { flags: "--amount-dollars <n>", description: "Amount in dollars (e.g. 5000 = $5,000.00)", type: "int" },
6481
6491
  { flags: "--due-date <date>", description: "Due date (ISO 8601)", required: true },
6482
6492
  { flags: "--description <desc>", description: "Description text", default: "Services rendered" }
6483
6493
  ],
6484
6494
  handler: async (ctx) => {
6485
6495
  const eid = await ctx.resolver.resolveEntity(ctx.opts.entityId);
6486
- if (ctx.opts.amountCents != null && ctx.opts.amount != null) {
6487
- printError("--amount-cents and --amount are mutually exclusive. Use one or the other.");
6496
+ if (ctx.opts.amountCents != null && ctx.opts.amountDollars != null) {
6497
+ printError("--amount-cents and --amount-dollars are mutually exclusive. Use one or the other.");
6488
6498
  process.exit(1);
6489
6499
  }
6490
- const amountCents = ctx.opts.amountCents ?? (ctx.opts.amount != null ? ctx.opts.amount * 100 : void 0);
6500
+ const amountCents = ctx.opts.amountCents ?? (ctx.opts.amountDollars != null ? ctx.opts.amountDollars * 100 : void 0);
6491
6501
  if (amountCents == null) {
6492
- printError("required option '--amount-cents <n>' or '--amount <n>' not specified");
6502
+ printError("required: --amount-cents <n> or --amount-dollars <n>");
6493
6503
  process.exit(1);
6494
6504
  }
6495
6505
  const result = await ctx.client.createInvoice({
@@ -6545,19 +6555,19 @@ var init_finance = __esm({
6545
6555
  entity: true,
6546
6556
  options: [
6547
6557
  { flags: "--amount-cents <n>", description: "Amount in cents (e.g. 500000 = $5,000.00)", type: "int" },
6548
- { flags: "--amount <n>", description: "Amount in dollars (converted to cents)", type: "int" },
6558
+ { flags: "--amount-dollars <n>", description: "Amount in dollars (e.g. 5000 = $5,000.00)", type: "int" },
6549
6559
  { flags: "--recipient <name>", description: "Recipient name", required: true },
6550
6560
  { flags: "--method <method>", description: "Payment method", default: "ach" }
6551
6561
  ],
6552
6562
  handler: async (ctx) => {
6553
6563
  const eid = await ctx.resolver.resolveEntity(ctx.opts.entityId);
6554
- if (ctx.opts.amountCents != null && ctx.opts.amount != null) {
6555
- printError("--amount-cents and --amount are mutually exclusive. Use one or the other.");
6564
+ if (ctx.opts.amountCents != null && ctx.opts.amountDollars != null) {
6565
+ printError("--amount-cents and --amount-dollars are mutually exclusive. Use one or the other.");
6556
6566
  process.exit(1);
6557
6567
  }
6558
- const amountCents = ctx.opts.amountCents ?? (ctx.opts.amount != null ? ctx.opts.amount * 100 : void 0);
6568
+ const amountCents = ctx.opts.amountCents ?? (ctx.opts.amountDollars != null ? ctx.opts.amountDollars * 100 : void 0);
6559
6569
  if (amountCents == null) {
6560
- printError("required option '--amount-cents <n>' or '--amount <n>' not specified");
6570
+ printError("required: --amount-cents <n> or --amount-dollars <n>");
6561
6571
  process.exit(1);
6562
6572
  }
6563
6573
  const method = ctx.opts.method;