@kjanat/dreamcli 4.1.0 → 5.0.0

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 (43) hide show
  1. package/README.md +3 -1
  2. package/dist/{adapter-YM5QGi3M.d.mts → adapter-DBeedKmD.d.mts} +5 -3
  3. package/dist/{completion-CUMeOnAz.mjs → completion-Bh-qywmB.mjs} +4 -4
  4. package/dist/completion.d.mts +1 -11
  5. package/dist/completion.mjs +1 -1
  6. package/dist/config-DruA8aFV.mjs +1 -0
  7. package/dist/config.d.mts +1 -1
  8. package/dist/config.mjs +1 -1
  9. package/dist/core-B9YNSJeA.mjs +19 -0
  10. package/dist/{index-Cap0MA2V.d.mts → index-AIC5Gler.d.mts} +18 -12
  11. package/dist/{index-BziI2aKc.d.mts → index-BIMjOsR6.d.mts} +316 -53
  12. package/dist/{index-3l8uj16E.d.mts → index-BidVVmln.d.mts} +51 -11
  13. package/dist/index-D683D09G.d.mts +129 -0
  14. package/dist/{index-DWsnGZlx.d.mts → index-DpslpOVV.d.mts} +160 -154
  15. package/dist/{index-BAj2y70U.d.mts → index-hzYPRc_O.d.mts} +65 -14
  16. package/dist/{index-Cp9kt2t-.d.mts → index-jq_FJRKt.d.mts} +1 -7
  17. package/dist/index.d.mts +18 -11
  18. package/dist/index.mjs +1 -1
  19. package/dist/json-schema-DF5fXdKQ.mjs +59 -0
  20. package/dist/json-schema.d.mts +2 -2
  21. package/dist/json-schema.mjs +1 -1
  22. package/dist/package-json-fYhxDdWD.mjs +3 -0
  23. package/dist/prompt.d.mts +32 -5
  24. package/dist/prompt.mjs +1 -1
  25. package/dist/runtime.d.mts +2 -2
  26. package/dist/runtime.mjs +1 -1
  27. package/dist/session-Crtzt7LY.mjs +1 -0
  28. package/dist/terminal-DRsRn4sc.mjs +7 -0
  29. package/dist/test-prompter-BLNGCOA_.mjs +1 -0
  30. package/dist/testkit.d.mts +5 -7
  31. package/dist/testkit.mjs +1 -1
  32. package/dist/version.d.mts +1 -3
  33. package/dist/version.mjs +1 -1
  34. package/dreamcli.schema.json +155 -3
  35. package/package.json +24 -24
  36. package/skills/cli-creation/SKILL.md +1 -1
  37. package/skills/cli-creation/scripts/scaffold_cli.py +12 -4
  38. package/dist/config-CrlScpYX.mjs +0 -1
  39. package/dist/core-DvXUolc_.mjs +0 -17
  40. package/dist/json-schema-DRlrz_IV.mjs +0 -52
  41. package/dist/package-json-BgE9YjjQ.mjs +0 -3
  42. package/dist/terminal-C8KTXjv5.mjs +0 -6
  43. package/dist/test-prompter-v__jT2yG.mjs +0 -1
@@ -1,5 +1,4 @@
1
1
  import { Colors, Formatter } from "ansispeck";
2
- //#region src/core/schema/brand.d.ts
3
2
  /**
4
3
  * Type-only seal for framework-normalized schema values.
5
4
  *
@@ -12,8 +11,6 @@ import { Colors, Formatter } from "ansispeck";
12
11
  * @module dreamcli/core/schema/brand
13
12
  */
14
13
  declare const schemaBrand: unique symbol;
15
- //#endregion
16
- //#region src/core/schema/activity.d.ts
17
14
  /**
18
15
  * Activity types — spinner and progress bar handles, options, events.
19
16
  *
@@ -200,8 +197,6 @@ interface TableOptionsText {
200
197
  }
201
198
  /** Per-call rendering options for {@link Out.table}. */
202
199
  type TableOptions = TableOptionsAuto | TableOptionsJson | TableOptionsText;
203
- //#endregion
204
- //#region src/core/help/theme.d.ts
205
200
  /**
206
201
  * Semantic styling roles for help output.
207
202
  *
@@ -251,8 +246,72 @@ type HelpDescription = string | ((theme: HelpTheme) => string);
251
246
  * unconditionally, gating is the framework's job.
252
247
  */
253
248
  type HelpThemeFactory = (colors: Colors) => Partial<HelpTheme>;
254
- //#endregion
255
- //#region src/core/schema/number-constraints.d.ts
249
+ /**
250
+ * An indexed env family whose entries are single values.
251
+ *
252
+ * ```text
253
+ * SERVER_COUNT=2 SERVER_0=a.example.com SERVER_1=b.example.com
254
+ * ```
255
+ *
256
+ * reads as `['a.example.com', 'b.example.com']`.
257
+ */
258
+ interface IndexedValueEnvBinding {
259
+ /**
260
+ * Variable holding how many entries the family declares, as a canonical
261
+ * non-negative integer. When it is unset the env source supplies nothing;
262
+ * `0` supplies an explicit empty list.
263
+ */
264
+ readonly count: string;
265
+ /** Variable template for one entry, with `{index}` standing for the zero-based index. */
266
+ readonly value: string;
267
+ /** Not available on a value family; see {@link IndexedRecordEnvBinding}. */
268
+ readonly fields?: never;
269
+ }
270
+ /**
271
+ * An indexed env family whose entries are records, one variable per field.
272
+ *
273
+ * ```text
274
+ * CONFIG_COUNT=1 CONFIG_KEY_0=user.name CONFIG_VALUE_0=Kaj
275
+ * ```
276
+ *
277
+ * with `fields: { key: 'CONFIG_KEY_{index}', value: 'CONFIG_VALUE_{index}' }`
278
+ * reads as `[{ key: 'user.name', value: 'Kaj' }]`.
279
+ */
280
+ interface IndexedRecordEnvBinding {
281
+ /**
282
+ * Variable holding how many entries the family declares, as a canonical
283
+ * non-negative integer. When it is unset the env source supplies nothing;
284
+ * `0` supplies an explicit empty list.
285
+ */
286
+ readonly count: string;
287
+ /**
288
+ * One variable template per record field, each with `{index}` standing for
289
+ * the zero-based index. Every field is required for every declared entry.
290
+ */
291
+ readonly fields: Readonly<Record<string, string>>;
292
+ /** Not available on a record family; see {@link IndexedValueEnvBinding}. */
293
+ readonly value?: never;
294
+ }
295
+ /**
296
+ * A numbered family of environment variables read as one input's env source.
297
+ *
298
+ * Pass it to `.env()` in place of a variable name. The count variable decides
299
+ * whether the env stage supplied a value at all, and how many entries it owns;
300
+ * a declared entry with a missing member is an error, never a fallback to a
301
+ * later source.
302
+ */
303
+ type IndexedEnvBinding = IndexedValueEnvBinding | IndexedRecordEnvBinding;
304
+ /** Options accepted by `.env()` beside the variable name or indexed binding. */
305
+ interface EnvOptions {
306
+ /**
307
+ * Read the name exactly as written, ignoring the CLI-wide namespace set by
308
+ * `CLIBuilder.envPrefix()`. Use it for variables the CLI does not own, such
309
+ * as `HOME`, `CI`, or a credential another tool exports.
310
+ *
311
+ * @defaultValue `false` (the name is relative to the CLI namespace)
312
+ */
313
+ readonly absolute?: boolean;
314
+ }
256
315
  /**
257
316
  * Numeric constraints for number-valued flags and args.
258
317
  *
@@ -309,8 +368,6 @@ type NumberConstraintViolation = {
309
368
  readonly kind: 'max';
310
369
  readonly bound: number;
311
370
  };
312
- //#endregion
313
- //#region src/core/schema/prompt.d.ts
314
371
  /**
315
372
  * Prompt type definitions for interactive flag resolution.
316
373
  *
@@ -322,12 +379,13 @@ type NumberConstraintViolation = {
322
379
  * @module dreamcli/core/schema/prompt
323
380
  */
324
381
  /** All prompt kind discriminators as a runtime array. */
325
- declare const PROMPT_KINDS: readonly ["confirm", "input", "select", "multiselect"];
382
+ declare const PROMPT_KINDS: readonly ["confirm", "input", "password", "select", "multiselect"];
326
383
  /**
327
384
  * The kind of interactive prompt to present.
328
385
  *
329
386
  * - `'confirm'` — yes/no boolean question
330
387
  * - `'input'` — free-text string input
388
+ * - `'password'` — hidden text input, preserving whitespace
331
389
  * - `'select'` — single selection from a list
332
390
  * - `'multiselect'` — multiple selections from a list
333
391
  */
@@ -336,6 +394,8 @@ type PromptKind = (typeof PROMPT_KINDS)[number];
336
394
  interface PromptConfigBase {
337
395
  /** The question displayed to the user. */
338
396
  readonly message: string;
397
+ /** Suppress framework-controlled value hints and diagnostics. */
398
+ readonly sensitive?: boolean;
339
399
  }
340
400
  /** Yes/no confirmation prompt — maps to `boolean` flags. Part of {@link PromptConfig}. */
341
401
  interface ConfirmPromptConfig extends PromptConfigBase {
@@ -354,6 +414,10 @@ interface InputPromptConfig extends PromptConfigBase {
354
414
  readonly kind: 'input';
355
415
  /** Placeholder text shown before user types (informational only). */
356
416
  readonly placeholder?: string;
417
+ /** Trim surrounding whitespace. Defaults to `true` for compatibility. */
418
+ readonly trim?: boolean;
419
+ /** Empty submission policy. Defaults to `skip` (fall through to input defaults). */
420
+ readonly empty?: 'skip' | 'accept' | 'retry';
357
421
  /**
358
422
  * Value used when the user submits an empty line (presses Enter), shown in
359
423
  * the hint as `(default: <value>)`. When set, an empty submission resolves
@@ -367,7 +431,16 @@ interface InputPromptConfig extends PromptConfigBase {
367
431
  * Inline validation function. Return `true` if valid, or a string
368
432
  * error message if invalid. Called before coercion to flag kind.
369
433
  */
370
- readonly validate?: (value: string) => true | string;
434
+ readonly validate?: (value: string) => true | string | Promise<true | string>;
435
+ }
436
+ /** Hidden text entry. Whitespace is preserved and defaults are never displayed or accepted. */
437
+ interface PasswordPromptConfig extends PromptConfigBase {
438
+ /** Request terminal echo suppression; unsupported hosts must reject before reading. */
439
+ readonly kind: 'password';
440
+ /** Empty submission policy. Defaults to `retry`. */
441
+ readonly empty?: 'accept' | 'retry';
442
+ /** Validate the unchanged password; invalid answers may be corrected. */
443
+ readonly validate?: (value: string) => true | string | Promise<true | string>;
371
444
  }
372
445
  /** Single-selection prompt — maps to `enum` flags or any flag with {@link SelectChoice choices}. Part of {@link PromptConfig}. */
373
446
  interface SelectPromptConfig extends PromptConfigBase {
@@ -424,12 +497,12 @@ interface SelectChoice {
424
497
  * }
425
498
  * ```
426
499
  */
427
- type PromptConfig = ConfirmPromptConfig | InputPromptConfig | SelectPromptConfig | MultiselectPromptConfig;
500
+ type PromptConfig = ConfirmPromptConfig | InputPromptConfig | PasswordPromptConfig | SelectPromptConfig | MultiselectPromptConfig;
428
501
  /**
429
502
  * The raw result returned by a prompt engine for a single prompt.
430
503
  *
431
504
  * - `answered: true` — user provided a value
432
- * - `answered: false` — user cancelled/aborted (Ctrl+C, ESC, etc.)
505
+ * - `answered: false` — no answer; cancellation unless `reason: 'invalid'`
433
506
  *
434
507
  * Coercion to the flag's kind is the resolver's responsibility, not the
435
508
  * prompt engine's.
@@ -440,11 +513,11 @@ type PromptResult = {
440
513
  /** The raw value from the prompt engine (not yet coerced). */
441
514
  readonly value: unknown;
442
515
  } | {
443
- /** User cancelled or aborted (Ctrl+C, ESC, etc.). */
516
+ /** No answer was provided. */
444
517
  readonly answered: false;
518
+ /** Retry exhaustion; omitted for cancellation or EOF. */
519
+ readonly reason?: 'invalid';
445
520
  };
446
- //#endregion
447
- //#region src/core/schema/standard.d.ts
448
521
  /**
449
522
  * The Standard Schema v1 interface, vendored as types only.
450
523
  *
@@ -535,8 +608,6 @@ type StandardSchemaV1Types<Input = unknown, Output = Input> = StandardSchemaV1.T
535
608
  type InferStandardInput<Schema extends StandardSchemaV1> = StandardSchemaV1.InferInput<Schema>;
536
609
  /** Flat alias for {@link StandardSchemaV1.InferOutput}. */
537
610
  type InferStandardOutput<Schema extends StandardSchemaV1> = StandardSchemaV1.InferOutput<Schema>;
538
- //#endregion
539
- //#region src/core/schema/stdin.d.ts
540
611
  /**
541
612
  * The stdin binding shared by the `flag` and `arg` factories.
542
613
  *
@@ -600,8 +671,6 @@ interface StdinOptions {
600
671
  */
601
672
  readonly trim?: boolean | undefined;
602
673
  }
603
- //#endregion
604
- //#region src/core/schema/string-constraints.d.ts
605
674
  /**
606
675
  * String constraints for string-valued flags.
607
676
  *
@@ -661,8 +730,6 @@ type StringConstraintViolation = {
661
730
  readonly kind: 'pattern';
662
731
  readonly pattern: string;
663
732
  };
664
- //#endregion
665
- //#region src/core/schema/value-parsers.d.ts
666
733
  /**
667
734
  * Value-level machinery behind the sugar factories on both `flag` and `arg`
668
735
  * (`url()`, `path()`, `date()`, `duration()`, `bytes()`).
@@ -756,8 +823,6 @@ interface PathChecks {
756
823
  /** Create the directory (recursively) when nothing exists at the path. */
757
824
  readonly create: boolean;
758
825
  }
759
- //#endregion
760
- //#region src/core/schema/flag.d.ts
761
826
  /** All flag presence states as a runtime array. */
762
827
  declare const FLAG_PRESENCES: readonly ["optional", "required", "defaulted"];
763
828
  /**
@@ -871,7 +936,7 @@ type InferFlags<T extends Record<string, FlagBuilder<FlagConfig>>> = { [K in key
871
936
  * - `'count'` / `'keyValue'` → `never` (not promptable)
872
937
  */
873
938
  type PromptConfigByFlagKind = {
874
- readonly string: InputPromptConfig | SelectPromptConfig;
939
+ readonly string: InputPromptConfig | PasswordPromptConfig | SelectPromptConfig;
875
940
  readonly number: InputPromptConfig;
876
941
  readonly boolean: ConfirmPromptConfig;
877
942
  readonly enum: SelectPromptConfig | InputPromptConfig;
@@ -970,6 +1035,26 @@ interface FlagSchema<K extends FlagKind = FlagKind> {
970
1035
  readonly stdin: StdinBinding | undefined;
971
1036
  /** Environment variable name for v0.2+ resolution. */
972
1037
  readonly envVar: string | undefined;
1038
+ /**
1039
+ * Indexed environment family read as the env source, set by `.env()` with an
1040
+ * {@link IndexedEnvBinding} (`undefined` otherwise). A flag declares at most
1041
+ * one env source, so this and {@link FlagSchema.envVar} are never both set.
1042
+ */
1043
+ readonly envIndexed: IndexedEnvBinding | undefined;
1044
+ /**
1045
+ * Whether the env source is read exactly as written, outside the CLI-wide
1046
+ * namespace set by `CLIBuilder.envPrefix()` (set by `.env(…, { absolute:
1047
+ * true })`). Applies to {@link FlagSchema.envVar} and
1048
+ * {@link FlagSchema.envIndexed} alike.
1049
+ *
1050
+ * @defaultValue `false`
1051
+ */
1052
+ readonly envAbsolute: boolean;
1053
+ /**
1054
+ * Whether `.env()` was called without a name. Registration on a command
1055
+ * replaces it with the derived {@link FlagSchema.envVar}.
1056
+ */
1057
+ readonly envFromName: boolean;
973
1058
  /** Dotted config path for v0.2+ resolution (e.g. `'deploy.region'`). */
974
1059
  readonly configPath: string | undefined;
975
1060
  /** Human-readable description for help text. */
@@ -1126,6 +1211,23 @@ interface FlagDefinitionBase {
1126
1211
  * @defaultValue `undefined`
1127
1212
  */
1128
1213
  readonly envVar?: string | undefined;
1214
+ /**
1215
+ * Indexed environment family read as the env source, in place of
1216
+ * {@link FlagDefinitionBase.envVar}. Requires kind `'array'` or `'custom'`.
1217
+ * @defaultValue `undefined`
1218
+ */
1219
+ readonly envIndexed?: IndexedEnvBinding | undefined;
1220
+ /**
1221
+ * Read the env source exactly as written, outside the CLI-wide namespace.
1222
+ * Requires `envVar` or `envIndexed`.
1223
+ * @defaultValue `false`
1224
+ */
1225
+ readonly envAbsolute?: boolean | undefined;
1226
+ /**
1227
+ * Derive `envVar` from the registered name.
1228
+ * @defaultValue `false`
1229
+ */
1230
+ readonly envFromName?: boolean | undefined;
1129
1231
  /**
1130
1232
  * Dotted config path for config resolution (e.g. `'deploy.region'`).
1131
1233
  * @defaultValue `undefined`
@@ -1472,7 +1574,12 @@ declare class FlagBuilder<C extends FlagConfig> {
1472
1574
  * The env value is read after CLI and stdin, and before config, the prompt,
1473
1575
  * and the default: CLI → stdin → **env** → config → prompt → default.
1474
1576
  *
1577
+ * Under a CLI-wide namespace (`CLIBuilder.envPrefix()`) the name is relative:
1578
+ * `.env('TOKEN')` in `cli('foo').envPrefix()` reads `FOO_TOKEN`. Pass
1579
+ * `{ absolute: true }` to read the name exactly as written.
1580
+ *
1475
1581
  * @param varName - Environment variable name (e.g. `'PORT'`).
1582
+ * @param options - Whether the name ignores the CLI namespace.
1476
1583
  * @returns The builder (for chaining).
1477
1584
  *
1478
1585
  * @example
@@ -1481,9 +1588,57 @@ declare class FlagBuilder<C extends FlagConfig> {
1481
1588
  *
1482
1589
  * // $ API_KEY=sk-123 mycli request → apiKey = 'sk-123'
1483
1590
  * // $ mycli request --api-key sk-456 → apiKey = 'sk-456' (CLI wins)
1591
+ *
1592
+ * flag.path().env('HOME', { absolute: true }) // never namespaced
1593
+ * ```
1594
+ */
1595
+ env(varName: string, options?: EnvOptions): FlagBuilder<WithoutElementEligibility<C>>;
1596
+ /**
1597
+ * Bind to an indexed family of environment variables, read as one env source.
1598
+ *
1599
+ * The count variable owns indices `0..count-1`; `{index}` in each template
1600
+ * expands to the zero-based index. An unset count means the env source
1601
+ * supplied nothing, so resolution continues to config, the prompt, and the
1602
+ * default. A set count claims the flag: `0` resolves an empty list, and a
1603
+ * malformed count or a missing member is an error, never a fallback.
1604
+ *
1605
+ * A `value` family reads a list of strings, so it suits `flag.array()` (each
1606
+ * entry decoded by the element) and `flag.custom()` (handed the whole list).
1607
+ * A `fields` family reads a list of records, one variable per field, so it
1608
+ * suits `flag.array(flag.custom(...))` and `flag.custom()`.
1609
+ *
1610
+ * Under a CLI-wide namespace the count and every template are relative, the
1611
+ * same as a single name; `{ absolute: true }` reads them as written.
1612
+ *
1613
+ * @param binding - The count variable plus a `value` template or `fields` templates.
1614
+ * @param options - Whether the names ignore the CLI namespace.
1615
+ * @returns The builder (for chaining).
1616
+ * @throws {CLIError} With code `'INVALID_SCHEMA'` on a malformed template or a
1617
+ * flag kind that cannot hold a list.
1618
+ *
1619
+ * @example
1620
+ * ```ts
1621
+ * flag.array(flag.string()).env({ count: 'SERVER_COUNT', value: 'SERVER_{index}' })
1622
+ * // SERVER_COUNT=2 SERVER_0=a SERVER_1=b → ['a', 'b']
1623
+ *
1624
+ * flag.custom(gitConfigEntries).env({
1625
+ * count: 'GIT_CONFIG_COUNT',
1626
+ * fields: { key: 'GIT_CONFIG_KEY_{index}', value: 'GIT_CONFIG_VALUE_{index}' },
1627
+ * })
1628
+ * // GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=user.name GIT_CONFIG_VALUE_0=Kaj
1629
+ * // → gitConfigEntries receives [{ key: 'user.name', value: 'Kaj' }]
1484
1630
  * ```
1485
1631
  */
1486
- env(varName: string): FlagBuilder<WithoutElementEligibility<C>>;
1632
+ env(binding: IndexedEnvBinding, options?: EnvOptions): FlagBuilder<WithoutElementEligibility<C>>;
1633
+ /**
1634
+ * Bind to an environment variable derived from this input's registered
1635
+ * name (`api-token` and `apiToken` → `API_TOKEN`), relative to the CLI
1636
+ * namespace unless `{ absolute: true }`.
1637
+ *
1638
+ * @param options - Whether the derived name ignores the CLI namespace.
1639
+ * @returns The builder (for chaining).
1640
+ */
1641
+ env(options?: EnvOptions): FlagBuilder<WithoutElementEligibility<C>>;
1487
1642
  /**
1488
1643
  * Let this flag read its value from piped stdin.
1489
1644
  *
@@ -2254,8 +2409,6 @@ interface FlagFactory {
2254
2409
  * {@link FlagBuilder} with full type inference and safe modifier chaining.
2255
2410
  */
2256
2411
  declare const flag: FlagFactory;
2257
- //#endregion
2258
- //#region src/core/schema/cardinality.d.ts
2259
2412
  /** All split formats as a runtime array. */
2260
2413
  declare const SPLIT_FORMATS: readonly ["whole", "delimiter", "lines", "json"];
2261
2414
  /** How one source's text decodes into collection elements. */
@@ -2341,8 +2494,6 @@ declare const DUPLICATE_KEYS: readonly ["first", "last", "error"];
2341
2494
  * @defaultValue `'last'`
2342
2495
  */
2343
2496
  type DuplicateKeys = (typeof DUPLICATE_KEYS)[number];
2344
- //#endregion
2345
- //#region src/core/schema/arg.d.ts
2346
2497
  /** All arg presence states as a runtime array. */
2347
2498
  declare const ARG_PRESENCES: readonly ["required", "optional", "defaulted"];
2348
2499
  /**
@@ -2456,7 +2607,7 @@ type ArgDefaultValue<C extends ArgConfig> = C['argKind'] extends 'keyValue' ? C[
2456
2607
  * - `'keyValue'` → `never` (not promptable)
2457
2608
  */
2458
2609
  type PromptConfigByArgKind = {
2459
- readonly string: InputPromptConfig | SelectPromptConfig;
2610
+ readonly string: InputPromptConfig | PasswordPromptConfig | SelectPromptConfig;
2460
2611
  readonly number: InputPromptConfig;
2461
2612
  readonly boolean: ConfirmPromptConfig;
2462
2613
  readonly enum: SelectPromptConfig | InputPromptConfig;
@@ -2521,6 +2672,28 @@ interface ArgSchema<K extends ArgKind = ArgKind> {
2521
2672
  * @see {@link ArgBuilder.env} for the builder method.
2522
2673
  */
2523
2674
  readonly envVar: string | undefined;
2675
+ /**
2676
+ * Indexed environment family read as the env source, set by `.env()` with an
2677
+ * {@link IndexedEnvBinding} (`undefined` otherwise). An arg declares at most
2678
+ * one env source, so this and {@link ArgSchema.envVar} are never both set.
2679
+ *
2680
+ * @see {@link ArgBuilder.env} for the builder method.
2681
+ */
2682
+ readonly envIndexed: IndexedEnvBinding | undefined;
2683
+ /**
2684
+ * Whether the env source is read exactly as written, outside the CLI-wide
2685
+ * namespace set by `CLIBuilder.envPrefix()` (set by `.env(…, { absolute:
2686
+ * true })`). Applies to {@link ArgSchema.envVar} and
2687
+ * {@link ArgSchema.envIndexed} alike.
2688
+ *
2689
+ * @defaultValue `false`
2690
+ */
2691
+ readonly envAbsolute: boolean;
2692
+ /**
2693
+ * Whether `.env()` was called without a name. Registration on a command
2694
+ * replaces it with the derived {@link ArgSchema.envVar}.
2695
+ */
2696
+ readonly envFromName: boolean;
2524
2697
  /**
2525
2698
  * Dotted config path for config resolution (e.g. `'deploy.region'`).
2526
2699
  *
@@ -2673,6 +2846,24 @@ interface ArgDefinitionBase {
2673
2846
  * @defaultValue `undefined`
2674
2847
  */
2675
2848
  readonly envVar?: string | undefined;
2849
+ /**
2850
+ * Indexed environment family read as the env source, in place of
2851
+ * {@link ArgDefinitionBase.envVar}. Requires a variadic arg, or a custom arg
2852
+ * without a string parse function.
2853
+ * @defaultValue `undefined`
2854
+ */
2855
+ readonly envIndexed?: IndexedEnvBinding | undefined;
2856
+ /**
2857
+ * Read the env source exactly as written, outside the CLI-wide namespace.
2858
+ * Requires `envVar` or `envIndexed`.
2859
+ * @defaultValue `false`
2860
+ */
2861
+ readonly envAbsolute?: boolean | undefined;
2862
+ /**
2863
+ * Derive `envVar` from the registered name.
2864
+ * @defaultValue `false`
2865
+ */
2866
+ readonly envFromName?: boolean | undefined;
2676
2867
  /**
2677
2868
  * Dotted config path for config resolution (e.g. `'deploy.region'`).
2678
2869
  * @defaultValue `undefined`
@@ -3173,7 +3364,12 @@ declare class ArgBuilder<C extends ArgConfig> {
3173
3364
  *
3174
3365
  * Help output shows `[env: VAR]` next to the arg description.
3175
3366
  *
3367
+ * Under a CLI-wide namespace (`CLIBuilder.envPrefix()`) the name is relative:
3368
+ * `.env('TARGET')` in `cli('foo').envPrefix()` reads `FOO_TARGET`. Pass
3369
+ * `{ absolute: true }` to read the name exactly as written.
3370
+ *
3176
3371
  * @param varName - Environment variable name (e.g. `'DEPLOY_TARGET'`).
3372
+ * @param options - Whether the name ignores the CLI namespace.
3177
3373
  * @returns The builder (for chaining).
3178
3374
  *
3179
3375
  * @example
@@ -3187,7 +3383,34 @@ declare class ArgBuilder<C extends ArgConfig> {
3187
3383
  * });
3188
3384
  * ```
3189
3385
  */
3190
- env(varName: string): ArgBuilder<WithoutArgElementEligibility<C>>;
3386
+ env(varName: string, options?: EnvOptions): ArgBuilder<WithoutArgElementEligibility<C>>;
3387
+ /**
3388
+ * Bind to an indexed family of environment variables, read as one env
3389
+ * source; see `FlagBuilder.env()` for the count and template rules. A
3390
+ * `value` family needs a variadic arg (call `.variadic()` first), and a
3391
+ * `fields` family a Standard Schema `arg.custom()`.
3392
+ *
3393
+ * @param binding - The count variable plus a `value` template or `fields` templates.
3394
+ * @param options - Whether the names ignore the CLI namespace.
3395
+ * @returns The builder (for chaining).
3396
+ * @throws {CLIError} With code `'INVALID_SCHEMA'` on a malformed template or an
3397
+ * arg that cannot hold a list.
3398
+ *
3399
+ * @example
3400
+ * ```ts
3401
+ * arg.string().variadic().env({ count: 'FILE_COUNT', value: 'FILE_{index}' })
3402
+ * ```
3403
+ */
3404
+ env(binding: IndexedEnvBinding, options?: EnvOptions): ArgBuilder<WithoutArgElementEligibility<C>>;
3405
+ /**
3406
+ * Bind to an environment variable derived from this input's registered
3407
+ * name (`api-token` and `apiToken` → `API_TOKEN`), relative to the CLI
3408
+ * namespace unless `{ absolute: true }`.
3409
+ *
3410
+ * @param options - Whether the derived name ignores the CLI namespace.
3411
+ * @returns The builder (for chaining).
3412
+ */
3413
+ env(options?: EnvOptions): ArgBuilder<WithoutArgElementEligibility<C>>;
3191
3414
  /**
3192
3415
  * Bind to a dotted config path.
3193
3416
  *
@@ -3822,14 +4045,41 @@ interface ArgFactory {
3822
4045
  * ```
3823
4046
  */
3824
4047
  declare const arg: ArgFactory;
3825
- //#endregion
3826
- //#region src/core/output/contracts.d.ts
3827
4048
  /** Ordered output verbosity levels owned by the output policy layer. */
3828
4049
  declare const OUTPUT_VERBOSITY_LEVELS: readonly ["normal", "quiet"];
3829
4050
  /** Stable text verbosity labels. */
3830
4051
  type Verbosity = (typeof OUTPUT_VERBOSITY_LEVELS)[number];
3831
- //#endregion
3832
- //#region src/core/schema/middleware.d.ts
4052
+ /** Infer an answer, preserving literal choice values. */
4053
+ type InferPrompt<C extends PromptConfig> = C extends ConfirmPromptConfig ? boolean : C extends {
4054
+ readonly kind: 'multiselect';
4055
+ readonly choices: readonly (infer Choice extends SelectChoice)[];
4056
+ } ? Choice['value'][] : C extends {
4057
+ readonly kind: 'select';
4058
+ readonly choices: readonly (infer Choice extends SelectChoice)[];
4059
+ } ? Choice['value'] : C extends MultiselectPromptConfig ? string[] : string;
4060
+ /** Standalone selections cannot inherit choices from a flag or argument schema. */
4061
+ type StandalonePromptConfig = InputPromptConfig | PasswordPromptConfig | ConfirmPromptConfig | ((SelectPromptConfig | MultiselectPromptConfig) & {
4062
+ readonly choices: readonly [SelectChoice, ...SelectChoice[]];
4063
+ });
4064
+ /** Ask one question with explicit, non-empty selection choices. Cancellation rejects with `PromptCancelledError`. */
4065
+ type Ask = <const C extends StandalonePromptConfig>(config: C) => Promise<InferPrompt<C>>;
4066
+ /** Build reusable definitions for schemas, handler-level `ask`, and standalone sessions. */
4067
+ declare const prompt: {
4068
+ /** Text input; empty answers retry unless an explicit policy/default is supplied. */
4069
+ input(options: Omit<InputPromptConfig, 'kind'>): InputPromptConfig;
4070
+ /** Hidden input, preserving all surrounding whitespace. */
4071
+ password(options: Omit<PasswordPromptConfig, 'kind'>): PasswordPromptConfig;
4072
+ /** Yes/no question. */
4073
+ confirm(options: Omit<ConfirmPromptConfig, 'kind'>): ConfirmPromptConfig;
4074
+ /** Select one typed string value. Standalone definitions require explicit choices. */
4075
+ select<const C extends Omit<SelectPromptConfig, 'kind'>>(options: C): C & {
4076
+ kind: 'select';
4077
+ };
4078
+ /** Select several typed string values. */
4079
+ multiselect<const C extends Omit<MultiselectPromptConfig, 'kind'>>(options: C): C & {
4080
+ kind: 'multiselect';
4081
+ };
4082
+ };
3833
4083
  /**
3834
4084
  * Parameters received by a middleware function at runtime.
3835
4085
  *
@@ -3854,6 +4104,8 @@ interface MiddlewareParams {
3854
4104
  readonly ctx: Readonly<Record<string, unknown>>;
3855
4105
  /** Output channel. */
3856
4106
  readonly out: Out;
4107
+ /** Invocation-scoped interactive questions. */
4108
+ readonly ask: Ask;
3857
4109
  /** CLI program metadata (name, bin, version, command). */
3858
4110
  readonly meta: CommandMeta;
3859
4111
  /**
@@ -3884,6 +4136,8 @@ type MiddlewareHandler<Output extends Record<string, unknown>> = (params: {
3884
4136
  readonly sources: ErasedInputSources;
3885
4137
  readonly ctx: Readonly<Record<string, unknown>>;
3886
4138
  readonly out: Out;
4139
+ /** Invocation-scoped interactive questions. */
4140
+ readonly ask: Ask;
3887
4141
  readonly meta: CommandMeta;
3888
4142
  /** Pass context additions downstream. Must include all `Output` properties. */
3889
4143
  readonly next: (additions: Output) => Promise<void>;
@@ -3955,8 +4209,6 @@ type Middleware<Output extends Record<string, unknown>> = MiddlewareImpl & {
3955
4209
  * ```
3956
4210
  */
3957
4211
  declare function middleware<Output extends Record<string, unknown>>(handler: MiddlewareHandler<Output>): Middleware<Output>;
3958
- //#endregion
3959
- //#region src/core/schema/provenance.d.ts
3960
4212
  /**
3961
4213
  * Where a resolved value came from.
3962
4214
  *
@@ -3975,13 +4227,21 @@ declare function middleware<Output extends Record<string, unknown>>(handler: Mid
3975
4227
  * 'dash' }`; an absent input takes the fallback stage between CLI and env and
3976
4228
  * reports `{ stage: 'stdin', via: 'stdin', trigger: 'fallback' }`.
3977
4229
  *
4230
+ * The `'env'` stage is two records the same way. A variable bound by name
4231
+ * reports `{ stage: 'env', envVar }`, the one concrete variable that supplied
4232
+ * the value. An indexed family bound with an `IndexedEnvBinding` reports
4233
+ * `{ stage: 'env', via: 'indexed', count, envVars }`: the count variable that
4234
+ * claimed the input and every member variable read, in entry order and, within
4235
+ * an entry, in field order. `envVars` is empty when the count is `0`. Test
4236
+ * `'envVar' in source` (or `source.via`) before reading either shape's fields.
4237
+ *
3978
4238
  * @example
3979
4239
  * ```ts
3980
4240
  * command('deploy')
3981
4241
  * .flag('region', flag.string().env('REGION').default('us'))
3982
4242
  * .action(({ sources }) => {
3983
4243
  * const region = sources.flags.region;
3984
- * if (region?.stage === 'env') console.log(`from ${region.envVar}`);
4244
+ * if (region?.stage === 'env' && 'envVar' in region) console.log(`from ${region.envVar}`);
3985
4245
  * });
3986
4246
  * ```
3987
4247
  */
@@ -3998,6 +4258,11 @@ type ResolutionProvenance = {
3998
4258
  } | {
3999
4259
  readonly stage: 'env';
4000
4260
  readonly envVar: string;
4261
+ } | {
4262
+ readonly stage: 'env';
4263
+ readonly via: 'indexed';
4264
+ readonly count: string;
4265
+ readonly envVars: readonly string[];
4001
4266
  } | {
4002
4267
  readonly stage: 'config';
4003
4268
  readonly configPath: string;
@@ -4053,8 +4318,6 @@ interface InputSources<F, A> {
4053
4318
  * ```
4054
4319
  */
4055
4320
  declare function wasExplicit(source: ResolutionProvenance | undefined): boolean;
4056
- //#endregion
4057
- //#region src/core/schema/command.d.ts
4058
4321
  /**
4059
4322
  * Widen the context type when adding middleware.
4060
4323
  *
@@ -4367,6 +4630,8 @@ interface ActionParams<F extends Record<string, FlagBuilder<FlagConfig>>, A exte
4367
4630
  readonly ctx: Readonly<C>;
4368
4631
  /** Structured output channel for stdout, stderr, JSON, tables, and spinners. */
4369
4632
  readonly out: Out;
4633
+ /** Ask a typed question after selecting the operation or receiving a server challenge. */
4634
+ readonly ask: Ask;
4370
4635
  /** Runtime metadata about the CLI program and current command. */
4371
4636
  readonly meta: CommandMeta;
4372
4637
  }
@@ -4396,6 +4661,8 @@ type ErasedActionHandler = (params: {
4396
4661
  readonly sources: ErasedInputSources;
4397
4662
  readonly ctx: Readonly<Record<string, unknown>>;
4398
4663
  readonly out: Out;
4664
+ /** Ask a typed question after selecting the operation or receiving a server challenge. */
4665
+ readonly ask: Ask;
4399
4666
  readonly meta: CommandMeta;
4400
4667
  }) => void | Promise<void>;
4401
4668
  /**
@@ -4432,6 +4699,8 @@ type ErasedDeriveHandler = (params: {
4432
4699
  readonly sources: ErasedInputSources;
4433
4700
  readonly ctx: Readonly<Record<string, unknown>>;
4434
4701
  readonly out: Out;
4702
+ /** Ask a typed question after selecting the operation or receiving a server challenge. */
4703
+ readonly ask: Ask;
4435
4704
  readonly meta: CommandMeta;
4436
4705
  }) => undefined | Readonly<Record<string, unknown>> | Promise<undefined | Readonly<Record<string, unknown>>>;
4437
4706
  /**
@@ -5159,15 +5428,13 @@ declare function command(name: string): CommandBuilder;
5159
5428
  * @returns A fresh {@link CommandBuilder} with empty flags, args, and context.
5160
5429
  */
5161
5430
  declare function group(name: string): CommandBuilder;
5162
- //#endregion
5163
- //#region src/core/prompt/index.d.ts
5164
5431
  /**
5165
5432
  * A select prompt config with choices guaranteed non-empty.
5166
5433
  *
5167
5434
  * The resolution chain populates choices from `FlagSchema.enumValues`
5168
5435
  * when the user's {@linkcode PromptConfig} omits them.
5169
5436
  */
5170
- interface ResolvedSelectPromptConfig {
5437
+ interface ResolvedSelectPromptConfig extends PromptConfigBase {
5171
5438
  /** Discriminant — single-choice selection prompt. */
5172
5439
  readonly kind: 'select';
5173
5440
  /** User-facing question text. */
@@ -5181,7 +5448,7 @@ interface ResolvedSelectPromptConfig {
5181
5448
  * Same guarantee as {@linkcode ResolvedSelectPromptConfig} — choices are always
5182
5449
  * present and non-empty.
5183
5450
  */
5184
- interface ResolvedMultiselectPromptConfig {
5451
+ interface ResolvedMultiselectPromptConfig extends PromptConfigBase {
5185
5452
  /** Discriminant — multiple-choice selection prompt. */
5186
5453
  readonly kind: 'multiselect';
5187
5454
  /** User-facing question text. */
@@ -5200,7 +5467,7 @@ interface ResolvedMultiselectPromptConfig {
5200
5467
  *
5201
5468
  * confirm and input configs pass through unchanged.
5202
5469
  */
5203
- type ResolvedPromptConfig = ConfirmPromptConfig | InputPromptConfig | ResolvedSelectPromptConfig | ResolvedMultiselectPromptConfig;
5470
+ type ResolvedPromptConfig = ConfirmPromptConfig | InputPromptConfig | PasswordPromptConfig | ResolvedSelectPromptConfig | ResolvedMultiselectPromptConfig;
5204
5471
  /**
5205
5472
  * Prompt engine interface.
5206
5473
  *
@@ -5228,7 +5495,8 @@ interface PromptEngine {
5228
5495
  *
5229
5496
  * @param config - The resolved prompt configuration (choices guaranteed
5230
5497
  * for select/multiselect).
5231
- * @returns The user's answer, or `{ answered: false }` if cancelled.
5498
+ * @returns The user's answer, `{ answered: false }` if cancelled, or
5499
+ * `{ answered: false, reason: 'invalid' }` when invalid attempts are exhausted.
5232
5500
  */
5233
5501
  promptOne(config: ResolvedPromptConfig): Promise<PromptResult>;
5234
5502
  }
@@ -5260,8 +5528,6 @@ type ReadFn = () => Promise<string | null>;
5260
5528
  * @throws Error if select/multiselect has no choices and no enum values
5261
5529
  */
5262
5530
  declare function resolvePromptConfig(config: PromptConfig, enumValues: readonly string[] | undefined): ResolvedPromptConfig;
5263
- //#endregion
5264
- //#region src/core/output/writer.d.ts
5265
5531
  /**
5266
5532
  * Minimal I/O seam — the only write primitive the output module depends on.
5267
5533
  *
@@ -5291,8 +5557,6 @@ declare function resolvePromptConfig(config: PromptConfig, enumValues: readonly
5291
5557
  * ```
5292
5558
  */
5293
5559
  type WriteFn = (data: string) => void;
5294
- //#endregion
5295
- //#region src/core/output/index.d.ts
5296
5560
  /**
5297
5561
  * Configuration for creating an output channel.
5298
5562
  *
@@ -5436,5 +5700,4 @@ interface CapturedOutput {
5436
5700
  * ```
5437
5701
  */
5438
5702
  declare function createCaptureOutput(options?: Omit<OutputOptions, 'stdout' | 'stderr'>): [out: Out, captured: CapturedOutput];
5439
- //#endregion
5440
- export { ArgParseFn as $, WithoutElementEligibility as $t, Out as A, PromptResult as An, DefaultValueOptions as At, MiddlewareHandler as B, ProgressHandle as Bn, FlagKind as Bt, ErasedActionHandler as C, StandardSchemaV1Types as Cn, SplitOptions as Ct, InteractiveParams as D, PromptConfig as Dn, BooleanFlagDefinition as Dt, ExecutionStep as E, MultiselectPromptConfig as En, ArrayFlagDefinition as Et, InputSources as F, HelpDescription as Fn, FlagDefinition as Ft, ArgConfig as G, TableFormat as Gn, InferFlag as Gt, middleware as H, SpinnerHandle as Hn, FlagParseFn as Ht, ResolutionProvenance as I, HelpTheme as In, FlagDefinitionBase as It, ArgDefinitionBase as J, schemaBrand as Jn, NumberFlagDefinition as Jt, ArgDefaultValue as K, TableOptions as Kn, InferFlags as Kt, SourcesOf as L, HelpThemeFactory as Ln, FlagDefinitionByKind as Lt, createCommandSchema as M, SelectPromptConfig as Mn, EnumFlagDefinition as Mt, group as N, NumberConstraintViolation as Nn, FlagBuilder as Nt, InteractiveResolver as O, PromptConfigBase as On, CountFlagDefinition as Ot, resolveExampleCommand as P, NumberConstraints as Pn, FlagConfig as Pt, ArgKind as Q, WithPresence as Qt, wasExplicit as R, ActivityEvent as Rn, FlagDefinitionOverrides as Rt, DeriveParams as S, StandardSchemaV1SuccessResult as Sn, SplitFormat as St, ExampleMeta as T, InputPromptConfig as Tn, SplitSetting as Tt, Verbosity as U, SpinnerOptions as Un, FlagPresence as Ut, MiddlewareParams as V, ProgressOptions as Vn, FlagNegation as Vt, ArgBuilder as W, TableColumn as Wn, FlagSchema as Wt, ArgDefinitionOverrides as X, StringElementConfig as Xt, ArgDefinitionByKind as Y, ResolvedValue as Yt, ArgFactory as Z, StringFlagDefinition as Zt, CommandDefinition as _, StandardSchemaV1Issue as _n, DUPLICATE_KEYS as _t, WriteFn as a, PathFlagOptions as an, InferArg as at, CommandSchema as b, StandardSchemaV1Props as bn, SourceSplitBinding as bt, ResolvedMultiselectPromptConfig as c, StringConstraints as cn, NumberArgDefinition as ct, resolvePromptConfig as d, StdinOptions as dn, StringArgElementConfig as dt, createFlagSchema as en, ArgPresence as et, ActionHandler as f, StdinWhen as fn, WithArgPresence as ft, CommandBuilder as g, StandardSchemaV1FailureResult as gn, createArgSchema as gt, CommandArgEntryDefinition as h, StandardSchemaV1 as hn, arg as ht, createOutput as i, PathChecks as in, EnumArgDefinition as it, command as j, SelectChoice as jn, DuplicatePolicy as jt, InteractiveResult as k, PromptKind as kn, CustomFlagDefinition as kt, ResolvedPromptConfig as l, StdinBinding as ln, ResolvedArgValue as lt, CommandArgEntry as m, InferStandardOutput as mn, WithoutArgElementEligibility as mt, OutputOptions as n, getFlagNegatedName as nn, BooleanArgDefinition as nt, PromptEngine as o, UrlFlagOptions as on, InferArgs as ot, ActionParams as p, InferStandardInput as pn, WithVariadic as pt, ArgDefinition as q, TableStream as qn, KeyValueFlagDefinition as qt, createCaptureOutput as r, DateFlagOptions as rn, CustomArgDefinition as rt, ReadFn as s, StringConstraintViolation as sn, KeyValueArgDefinition as st, CapturedOutput as t, flag as tn, ArgSchema as tt, ResolvedSelectPromptConfig as u, StdinConsume as un, StringArgDefinition as ut, CommandExample as v, StandardSchemaV1Options as vn, DuplicateKeys as vt, ExampleCommand as w, ConfirmPromptConfig as wn, SplitPolicy as wt, DeriveHandler as x, StandardSchemaV1Result as xn, SplitBinding as xt, CommandMeta as y, StandardSchemaV1PathSegment as yn, SPLIT_FORMATS as yt, Middleware as z, Fallback as zn, FlagFactory as zt };
5703
+ export { ArgDefinitionOverrides as $, TableFormat as $n, StringElementConfig as $t, Out as A, PasswordPromptConfig as An, BooleanFlagDefinition as At, MiddlewareHandler as B, IndexedEnvBinding as Bn, FlagDefinitionByKind as Bt, ErasedActionHandler as C, StandardSchemaV1Props as Cn, SourceSplitBinding as Ct, InteractiveParams as D, ConfirmPromptConfig as Dn, SplitPolicy as Dt, ExecutionStep as E, StandardSchemaV1Types as En, SplitOptions as Et, InputSources as F, SelectChoice as Fn, EnumFlagDefinition as Ft, prompt as G, HelpThemeFactory as Gn, FlagParseFn as Gt, middleware as H, IndexedValueEnvBinding as Hn, FlagFactory as Ht, ResolutionProvenance as I, SelectPromptConfig as In, FlagBuilder as It, ArgConfig as J, ProgressHandle as Jn, InferFlag as Jt, Verbosity as K, ActivityEvent as Kn, FlagPresence as Kt, SourcesOf as L, NumberConstraintViolation as Ln, FlagConfig as Lt, createCommandSchema as M, PromptConfigBase as Mn, CustomFlagDefinition as Mt, group as N, PromptKind as Nn, DefaultValueOptions as Nt, InteractiveResolver as O, InputPromptConfig as On, SplitSetting as Ot, resolveExampleCommand as P, PromptResult as Pn, DuplicatePolicy as Pt, ArgDefinitionByKind as Q, TableColumn as Qn, ResolvedValue as Qt, wasExplicit as R, NumberConstraints as Rn, FlagDefinition as Rt, DeriveParams as S, StandardSchemaV1PathSegment as Sn, SPLIT_FORMATS as St, ExampleMeta as T, StandardSchemaV1SuccessResult as Tn, SplitFormat as Tt, Ask as U, HelpDescription as Un, FlagKind as Ut, MiddlewareParams as V, IndexedRecordEnvBinding as Vn, FlagDefinitionOverrides as Vt, InferPrompt as W, HelpTheme as Wn, FlagNegation as Wt, ArgDefinition as X, SpinnerHandle as Xn, KeyValueFlagDefinition as Xt, ArgDefaultValue as Y, ProgressOptions as Yn, InferFlags as Yt, ArgDefinitionBase as Z, SpinnerOptions as Zn, NumberFlagDefinition as Zt, CommandDefinition as _, InferStandardOutput as _n, WithoutArgElementEligibility as _t, WriteFn as a, getFlagNegatedName as an, BooleanArgDefinition as at, CommandSchema as b, StandardSchemaV1Issue as bn, DUPLICATE_KEYS as bt, ResolvedMultiselectPromptConfig as c, PathFlagOptions as cn, InferArg as ct, resolvePromptConfig as d, StringConstraints as dn, NumberArgDefinition as dt, StringFlagDefinition as en, TableOptions as er, ArgFactory as et, ActionHandler as f, StdinBinding as fn, ResolvedArgValue as ft, CommandBuilder as g, InferStandardInput as gn, WithVariadic as gt, CommandArgEntryDefinition as h, StdinWhen as hn, WithArgPresence as ht, createOutput as i, flag as in, ArgSchema as it, command as j, PromptConfig as jn, CountFlagDefinition as jt, InteractiveResult as k, MultiselectPromptConfig as kn, ArrayFlagDefinition as kt, ResolvedPromptConfig as l, UrlFlagOptions as ln, InferArgs as lt, CommandArgEntry as m, StdinOptions as mn, StringArgElementConfig as mt, OutputOptions as n, WithoutElementEligibility as nn, schemaBrand as nr, ArgParseFn as nt, PromptEngine as o, DateFlagOptions as on, CustomArgDefinition as ot, ActionParams as p, StdinConsume as pn, StringArgDefinition as pt, ArgBuilder as q, Fallback as qn, FlagSchema as qt, createCaptureOutput as r, createFlagSchema as rn, ArgPresence as rt, ReadFn as s, PathChecks as sn, EnumArgDefinition as st, CapturedOutput as t, WithPresence as tn, TableStream as tr, ArgKind as tt, ResolvedSelectPromptConfig as u, StringConstraintViolation as un, KeyValueArgDefinition as ut, CommandExample as v, StandardSchemaV1 as vn, arg as vt, ExampleCommand as w, StandardSchemaV1Result as wn, SplitBinding as wt, DeriveHandler as x, StandardSchemaV1Options as xn, DuplicateKeys as xt, CommandMeta as y, StandardSchemaV1FailureResult as yn, createArgSchema as yt, Middleware as z, EnvOptions as zn, FlagDefinitionBase as zt };