import { HelpInfo } from "../output/formatter.mjs"; //#region src/docs/index.d.ts type DocsFormat = 'markdown' | 'html' | 'man' | 'json'; type DocsOptions = { /** Output format. Defaults to 'markdown'. */format?: DocsFormat; /** Output directory. If not set, docs are returned but not written. */ output?: string; /** Include hidden commands and options. Defaults to false. */ includeHidden?: boolean; /** Frontmatter generator for markdown files (VitePress, Starlight, etc.). */ frontmatter?: (info: HelpInfo, depth: number) => Record; /** Whether to overwrite existing files. Defaults to true. */ overwrite?: boolean; /** Print what would be written without writing. */ dryRun?: boolean; }; type DocsPage = { /** File path relative to output directory (e.g., "deploy.md", "index.md"). */path: string; /** Generated content for this page. */ content: string; /** The command name this page documents. */ command: string; }; type DocsResult = { /** All generated pages. */pages: DocsPage[]; /** Files that were written (empty if no output dir). */ written: string[]; /** Files that were skipped (already exist, no overwrite). */ skipped: string[]; /** Files that failed to write. */ errors: { file: string; error: Error; }[]; }; /** * Generate documentation for a Padrone CLI program or command tree. * Accepts either a PadroneProgram (from createPadrone()) or a raw AnyPadroneCommand. */ declare function generateDocs(program: object, options?: DocsOptions): DocsResult; type SetupManPagesResult = { /** Directory where man pages were written. */dir: string; /** Man page files that were written. */ written: string[]; /** Whether existing pages were overwritten (true) or newly created (false). */ updated: boolean; }; /** * Installs man pages for a Padrone CLI program into the local man directory. * Generates man pages for all commands and writes them to `~/.local/share/man/man1/`. * * After installation, `man ` and `man -` should work * (assuming `~/.local/share/man` is in `MANPATH` or `manpath` picks it up). */ declare function setupManPages(program: object): Promise; /** * Removes installed man pages for a Padrone CLI program. */ declare function removeManPages(program: object): Promise<{ dir: string; removed: string[]; }>; //#endregion export { DocsFormat, DocsOptions, DocsPage, DocsResult, SetupManPagesResult, generateDocs, removeManPages, setupManPages }; //# sourceMappingURL=index.d.mts.map