move-cli is a command-line interface (CLI) tool designed to move files and directories, acting as a robust alternative to `fs.rename` and mimicking the Unix `mv` utility. Its key differentiator is the ability to move items across different storage devices and to handle directories recursively, which standard `fs.rename` does not support natively. The package is built upon `andrewrk/node-mv` for its underlying moving logic. The current stable version is 2.0.0, released in late 2023, primarily focusing on dependency vulnerability fixes and CLI option parsing corrections. Its release cadence appears to be driven by maintenance and security updates rather than frequent feature additions, making it a stable choice for automated scripts and build processes.
npm install move-cliVerified import paths — ran on the pinned version, not inferred.
Demonstrates global installation, moving single files, moving directories with parent creation, and moving multiple files with glob patterns and no-clobber option.
Review existing scripts and update single-dash long flags (e.g., `-mkdirp`) to their correct double-dash counterparts (e.g., `--mkdirp`, `--noclobber`, `--limit`).
Always install the latest version of `move-cli` (`npm install -g move-cli@latest` or `npm install move-cli@latest`) to benefit from security fixes.
Add the `--noclobber` or `-nc` flag to your `move-cli` command when overwriting is not desired: `move-cli source dest --noclobber`.
If intending global use: `npm install -g move-cli`. If local: `npx move-cli ...` or add to `package.json` scripts.
Either rename the destination, remove the existing destination, or omit the `--noclobber` flag if overwriting is acceptable.
Ensure the current user has appropriate file system permissions for both the source and destination directories. You may need to use `sudo` (on macOS/Linux) or run your terminal as an administrator (on Windows) as a last resort, though this is generally not recommended for regular use.