Registry / devops / cp-cli

cp-cli

JSON →
library2.0.0jsnpmunverified

cp-cli is a Node.js CLI tool that replicates the UNIX cp command for cross-platform file and directory copying. Current stable version is 2.0.0, which exits with code 1 on error instead of 0 as in prior versions. It is a lightweight alternative to shell commands or more complex build tools, with no runtime dependencies after installation (only dev deps). Release cadence is irregular; the last release was v2.0.0 with a breaking change in exit code behavior.

devops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

The package is an ESM module since v2.0.0. Use import instead of require.

#!/usr/bin/env node import cp from 'cp-cli';

The package exports a default function, not a named export.

import cp from 'cp-cli';

For CLI usage, install globally or use npx. Not a node require() use case.

npx cp-cli source target

The -d flag enables dereferencing symlinks, but both forms work. Only listing -d as common shorthand.

cp-cli -d source target

Demonstrates global installation and common copy operations using cp-cli CLI.

# Install globally npm install -g cp-cli # Copy a file cp-cli foo.txt bar.txt # Copy file into directory cp-cli foo.txt dest/ # Using npx (no install) npx cp-cli source.txt target.txt
cp-cli --version
Debug
Known footguns
breakingExit code changed from 0 to 1 on error in v2.0.0
gotchaDoes not support recursive copying by default; no -R option
gotchaOnly copies a single file or into an existing directory; no glob or multiple sources
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
0 hits · last 30 days

No traffic data recorded yet.

Resources