import { type OutputStream } from "./output-stream.js";
import type { ModuleRegistry } from "./modules/registry.js";
type CliStream = OutputStream;
type CliProcess = Pick<NodeJS.Process, "off" | "on">;
type FileStats = {
    isFile(): boolean;
};
export type ReadMarkdownFile = (filepath: string, encoding: "utf8") => Promise<string>;
export type WriteMarkdownFile = (filepath: string, source: string, options: {
    encoding: "utf8";
}) => Promise<void>;
export type RunCliOptions = {
    cwd?: string;
    modulesFor?: (frontmatter: Record<string, unknown>, meta: HarnessMeta, streams: {
        stderr: CliStream;
        stdout: CliStream;
    }) => ModuleRegistry;
    process?: CliProcess;
    readFile?: ReadMarkdownFile;
    stat?: (filepath: string) => Promise<FileStats>;
    stdout?: CliStream;
    stderr?: CliStream;
    writeFile?: WriteMarkdownFile;
};
type HarnessMeta = {
    filepath: string;
    kind: unknown;
    version: unknown;
};
export declare function runCli(argv: readonly string[], options?: RunCliOptions): Promise<number>;
export {};
