/** * Configuration options for move command operations. * * Controls the behavior of the move command including preview mode and output verbosity. * * @category Commands */ export interface MoveOptions { /** Perform a dry run without making actual changes */ dryRun?: boolean; /** Enable verbose output with detailed progress information */ verbose?: boolean; /** Treat wikilinks as Obsidian vault links resolved by note basename */ obsidian?: boolean; /** Treat the positional arguments as alternating source/destination pairs moved in one operation */ pairs?: boolean; /** Read source/destination pairs from this file, one tab-separated pair per line ('-' reads stdin) */ pairsFile?: string; } /** * A single source/destination relocation within a multi-pair move. * * Both paths are literal paths: pair mode performs no glob expansion and moves no directories as units, so the caller's shell does any matching up front. * * @category Commands */ export interface MovePair { /** Literal path of the file to move */ source: string; /** Destination path; a directory destination receives the source's basename */ destination: string; } /** * Parse the pairs input format read by --pairs-file. * * Each non-blank line is one pair: a source path, the first tab character on the line, and a destination path. The tab is the separator precisely because paths may contain spaces, so splitting at the first tab keeps the remainder of the line intact for the destination. Fields are trimmed, so padded input and CRLF line endings parse identically to plain input. A non-blank line without a tab is malformed and throws naming its 1-based line number. * * @example * ```typescript * parsePairsInput('acme/acme.md\tacme/README.md\n'); * // => [{ source: 'acme/acme.md', destination: 'acme/README.md' }] * ```; * * @param input - Raw pairs input text * * @returns Pairs in input order * * @throws Error naming the offending 1-based line number when a non-blank line has no tab * * @internal */ export declare function parsePairsInput(input: string): MovePair[]; /** * Execute the move command to relocate markdown files (or files they link to) with intelligent link * refactoring. * * This is the main entry point for the move command functionality. It supports: * * - Single file moves to a new location * - Multiple file moves to a target directory * - Glob pattern expansion for source files * - Multi-pair moves via --pairs (alternating source/destination arguments) or --pairs-file * (tab-separated pairs from a file or stdin), each batch executed as one operation * - Moving non-markdown assets (images and other linked files), updating every markdown link that * points at them * - Dry run mode for previewing changes * - Comprehensive link integrity validation and updates * * The command automatically discovers and updates all cross-references to moved files throughout * the project, ensuring that no links are broken during the move operation. * * @category Commands * * @example * Single file move ```typescript await moveCommand(['docs/old.md', 'docs/new.md'], { verbose: true }); ``` * * @example * Moving a linked image, updating any markdown files that reference it ```typescript await moveCommand(['image.png', 'assets/image.png'], { verbose: true }); ``` * * @example * Multiple files to directory ```typescript await moveCommand(['*.md', 'archive/'], { dryRun: true }); ``` * * @example * Glob pattern with dry run ```typescript await moveCommand(['docs/**\/*.md', 'backup/'], { dryRun: true, verbose: true }); ``` * * @example * Multi-pair move, renaming two folder-named indexes in one operation ```typescript await moveCommand(['acme/acme.md', 'acme/README.md', 'globex/globex.md', 'globex/README.md'], { pairs: true }); ``` * * @param sources - Classic mode: source patterns with the destination last. Pair mode (--pairs): an alternating source/destination list. Unused with --pairs-file. * @param options - Configuration options for the move operation * * @throws Will exit the process with code 1 if the operation fails */ export declare function moveCommand(sources: string[], options: MoveOptions): Promise; //# sourceMappingURL=move.d.ts.map