export type CliMainArgs = {
    argv: string[];
    env: Record<string, string | undefined>;
    fetch: typeof fetch;
    stdout: NodeJS.WritableStream;
    stderr: NodeJS.WritableStream;
    exit: (code: number) => void;
    setExitCode: (code: number) => void;
};
export declare function handlePipeErrors(stream: NodeJS.WritableStream, exit: (code: number) => void): void;
export declare function installCliSignalHandlers(exit: (code: number) => void): () => void;
export declare function runCliMain({ argv, env, fetch, stdout, stderr, exit, setExitCode, }: CliMainArgs): Promise<void>;
