pai
    Preparing search index...

    Function run

    • Runs one CLI command and returns its exit code: 0 on success, 2 when the API rejected the key, 1 for other errors. verify returns 1 when the check fails. Errors go to io.stderr as JSON. It never calls process.exit.

      Parameters

      • argv: string[] = ...

        The arguments after pai.

      • env: Record<string, string | undefined> = process.env

        The environment to read settings from.

      • io: {
            ask?: (question: string) => Promise<string>;
            isTTY?: boolean;
            stderr: (s: string) => void;
            stdout: (s: string) => void;
        } = ...

        Where output goes, and whether stderr is a terminal (for progress lines).

      Returns Promise<number>