Registry / devops / move-cli

move-cli

JSON →
library2.0.0jsnpmunverified

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-cli
INSTALL
IMPORT
SIG · MOVE-CLI
M
move-cli
devopsjavascriptv2.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18226 runs
build_error
glibc
node 18226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

move-cli (Global Install)
$ npm install -g move-cli $ move-cli source/path dest/path
This package is primarily a CLI tool. After global installation, it's executed directly in the terminal.
move-cli (Local Install via npx)
$ npm install move-cli $ npx move-cli source/path dest/path
For local installations, `npx` is the recommended way to execute the CLI tool without adding it to the global PATH.
move-cli (package.json script)
{ "scripts": { "move-files": "move-cli 'src/**/*.js' dist/js" } }
Common pattern for integrating `move-cli` into build or automation workflows within a project's `package.json` scripts.

Demonstrates global installation, moving single files, moving directories with parent creation, and moving multiple files with glob patterns and no-clobber option.

npm install -g move-cli # Create some dummy files and directories mkdir -p source/folder1 source/folder2 touch source/folder1/file1.txt source/folder2/file2.js # Move a single file move-cli source/folder1/file1.txt destination/newfile.txt # Move a directory (and create destination parent if needed) move-cli source/folder2 destination/new_folder --mkdirp # Move multiple files using a glob pattern, preventing overwrite move-cli 'source/**/*.js' other_destination --noclobber
move-cli --version
Debug
Known issues
breakingVersion 2.0.0 fixed an issue with command-line flag parsing, specifically regarding single-dash versus double-dash for long options. While `--mkdirp` was the intended usage, older scripts might have incorrectly used `-mkdirp`. Post v2.0.0, ensure correct double-dash syntax for long options.
fix
Review existing scripts and update single-dash long flags (e.g., `-mkdirp`) to their correct double-dash counterparts (e.g., `--mkdirp`, `--noclobber`, `--limit`).
affects: <2.0.0
gotchaPrior versions (1.2.0 and earlier) had reported dependency vulnerabilities. Although v2.0.0 explicitly addresses these, it's crucial to ensure you are running the latest stable version for security patches.
fix
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.
affects: <2.0.0
gotchaBy default, `move-cli` will overwrite existing files at the destination. If you need to prevent overwriting, you must explicitly use the `--noclobber` or `-nc` option.
fix
Add the `--noclobber` or `-nc` flag to your `move-cli` command when overwriting is not desired: `move-cli source dest --noclobber`.
affects: >=1.1.2
Errors
Common errors & fixes
move-cli: command not found
The `move-cli` package is not installed globally or is not in your system's PATH, or a locally installed version is not being called via `npx` or a `package.json` script.
fix
If intending global use: `npm install -g move-cli`. If local: `npx move-cli ...` or add to `package.json` scripts.
Error: EEXIST: file already exists, '...' -> '...'
The destination file or directory already exists, and the `--noclobber` option was used, preventing an overwrite.
fix
Either rename the destination, remove the existing destination, or omit the `--noclobber` flag if overwriting is acceptable.
Error: EACCES: permission denied, rename '...' -> '...'
The user running the `move-cli` command lacks the necessary read/write permissions for either the source or destination paths.
fix
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.
Upgrade
Version history
2.0.0latest on npm
Audit
Dependencies
mvrequiredCore underlying library for file and directory moving logic, especially for cross-device operations.
Agent activity
2 hits · last 30 days
node
2
Resources
move-cli — npm install move-cli · libregistry