/** * Pure command-line parsing for `hikoutei setup`. * * This module owns flag syntax and defaults only; it never touches gcloud, * the filesystem, or the network. The result is an explicit union so the CLI * entry can branch on help / valid / invalid without inspecting message text. */ import { type SetupFailure } from "./errors.js"; /** Default service-account name when `--sa-name` is not given. */ export declare const DEFAULT_SA_NAME = "hikoutei-sa"; /** Default output file name (resolved against the current directory by main). */ export declare const DEFAULT_OUTPUT_FILE_NAME = ".env"; /** Maximum service accounts per setup run (quota-exhaustion guard). */ export declare const MAX_SETUP_SA_COUNT = 10; /** * Validates an `--sa-count` value: a positive safe integer capped at * {@link MAX_SETUP_SA_COUNT}. Returns the count, or an error message. */ export declare function parseSaCount(value: string): { readonly status: "ok"; readonly saCount: number; } | { readonly status: "error"; readonly message: string; }; /** Parsed and defaulted setup options handed to the setup flow. */ export interface SetupOptions { /** Existing Google Cloud project id; when absent the flow creates one. */ readonly projectId?: string; /** Service-account name within the project. */ readonly saName: string; /** * Number of service accounts to provision as a credential pool. Absent * means the flag was not given (default 1); the interactive prompt * (TTY, no --yes) resolves the count, while --yes/non-TTY runs use 1. */ readonly saCount?: number; /** Spreadsheet title; when absent the flow derives `hikoutei-sync-`. */ readonly spreadsheetTitle?: string; /** Output .env path (relative to the current directory). */ readonly output: string; /** Skip interactive confirmation. */ readonly yes: boolean; /** Print the planned command sequence without executing anything. */ readonly dryRun: boolean; } /** Discriminated result of `parseSetupArgs`. */ export type SetupArgsParseResult = { readonly status: "help"; readonly helpText: string; } | { readonly status: "valid"; readonly options: SetupOptions; } | { readonly status: "invalid"; readonly failure: SetupFailure; }; export declare const SETUP_HELP_TEXT: string; /** * Parses raw argv (without node/script) into setup options. * * `--flag value` and `--flag=value` are both accepted. A leading `setup` * token is ignored so the npm bin works both as `hikoutei setup ...` and as * `node dist/cli/setup.js ...`. Unknown flags, missing values, boolean flags * given a value, and other positional arguments are rejected with * `invalid_args`. `--help` short-circuits with the help text. */ export declare function parseSetupArgs(argv: readonly string[]): SetupArgsParseResult; //# sourceMappingURL=args.d.ts.map