import { OutputMode } from "@outfitter/cli/types"; import { Result } from "@outfitter/contracts"; import { AddBlockResult } from "@outfitter/tooling"; /** * Input for the add command. */ interface AddInput { /** Block name to add */ readonly block: string; /** Working directory (defaults to cwd) */ readonly cwd?: string; /** Show what would be done without making changes */ readonly dryRun: boolean; /** Overwrite existing files */ readonly force: boolean; } /** * Error returned when adding a block fails. */ declare class AddError extends Error { readonly _tag: "AddError"; constructor(message: string); } /** * Runs the add command programmatically. * * @param input - Add command input * @returns Result with details of what was added * * @example * ```typescript * const result = await runAdd({ * block: "scaffolding", * force: false, * dryRun: false, * }); * * if (result.isOk()) { * console.log(`Created ${result.value.created.length} files`); * } * ``` */ declare function runAdd(input: AddInput): Promise>; /** * Prints the results of the add command. */ declare function printAddResults(result: AddBlockResult, dryRun: boolean, options?: { mode?: OutputMode; }): Promise; /** * Lists available blocks. */ declare function listBlocks(): Result; export { runAdd, printAddResults, listBlocks, AddInput, AddError };