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. browser and sandbox run return the exit code of the command they ran (124 when the sandbox times out). Errors go to io.stderr as JSON through handleError. It never calls process.exit, except that autotopup --every loops until the process is stopped.

      Parameters

      • argv: string[] = ...

        The arguments after pai.

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

        The environment to read settings from.

      • io: { 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>