| Crates.io | better-cp |
| lib.rs | better-cp |
| version | 0.2.0 |
| created_at | 2026-01-01 08:20:51.034121+00 |
| updated_at | 2026-01-01 08:20:51.034121+00 |
| description | Modern replacement for cp/mv with progress reporting, safety guarantees, resumable transfers, and intelligent optimizations |
| homepage | |
| repository | https://github.com/nom-nom-hub/BetterDefaultCPMV |
| max_upload_size | |
| id | 2015887 |
| size | 179,429 |
A modern replacement for cp and mv commands with progress reporting, safety guarantees, resumable transfers, and intelligent optimizations.
git clone <repo>
cd better-cp
cargo build --release
./target/release/better-cp --version
Releases available at: https://github.com/betterdefaultcpmv/better-cp/releases
better-cp large_file.iso backup/
Shows real-time progress:
Copying: large_file.iso → backup/
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73%
3.2 GB / 4.4 GB | 285 MB/s | ⏱ 4m 15s remaining
better-cp --resume source/large.iso /backup/
# Copy interrupted? Just run again:
better-cp --resume source/large.iso /backup/
# Continues from where it left off!
# Prompt before overwriting (default)
better-cp --overwrite=prompt source.txt dest.txt
# Never overwrite
better-cp --overwrite=never source.txt dest.txt
# Always overwrite without asking
better-cp --overwrite=always source.txt dest.txt
# Smart: only overwrite if source is newer
better-cp --overwrite=smart source.txt dest.txt
# Preview what would happen without copying
better-cp --dry-run source.txt destination.txt
# Output:
# 📋 Dry Run Preview (File)
# Source: source.txt (1.5 GB)
# Target: destination.txt (already exists)
# Action: overwrite
# ✓ No files were modified (--dry-run)
# Copy entire directory tree recursively
better-cp source_dir/ backup/source_dir/
# Copies: nested directories, all files, preserves structure
# Machine-readable output for scripting
better-cp --json large_file.iso backup/ | jq '.summary'
# Output:
# {
# "bytes_transferred": 1650000000,
# "files_copied": 1,
# "duration_secs": 5.8,
# "speed_mbps": 285.0,
# "verified": true
# }
$ better-cp missing.txt backup/
# Output:
# ❌ Source not found: missing.txt
# Tip: Check that the source file/directory exists and the path is correct.
$ better-cp large.iso /readonly/
# Output:
# ❌ Permission denied: /readonly/
# Tip: Try running with elevated privileges (sudo on Linux/macOS).
$ better-cp file.zip /disk/ --verify=full
# Output:
# ❌ Checksum mismatch!
# Expected: abc123def456...
# Actual: xyz789abc123...
# Tip: This indicates file corruption during transfer.
# Try copying again with --resume flag or check disk integrity.
# Minimal output
better-cp --quiet large_file.iso backup/
# Detailed per-file output
better-cp --verbose source/ backup/
# Normal output (default)
better-cp source.txt backup/
better-cp [OPTIONS] SOURCE [SOURCE...] DESTINATION
| Flag | Default | Description |
|---|---|---|
--overwrite=MODE |
prompt |
Overwrite behavior: never|prompt|always|smart |
--resume |
auto | Resume interrupted transfers |
--no-resume |
- | Disable resume |
--verify=MODE |
fast |
Verification: none|fast|full |
--no-verify |
- | Skip checksums |
--atomic |
true | Use atomic operations |
--parallel=N |
auto | Number of parallel threads |
--buffer=SIZE |
64M | Internal buffer size |
--dry-run |
false | Show what would happen |
-v, --verbose |
false | Detailed per-file output |
-q, --quiet |
false | Minimal output |
--json |
false | JSON output format |
--log=FILE |
- | Write operation log |
better-mv [OPTIONS] SOURCE [SOURCE...] DESTINATION
(Currently in development)
Configuration file: ~/.config/better-cp/config.toml (Linux/macOS) or %APPDATA%\better-cp\config.toml (Windows)
Example config:
[defaults]
overwrite = "prompt"
resume = true
verify = "fast"
parallel = 4
sparse = true
reflink = "auto"
[behavior]
follow_symlinks = false
preserve_times = true
preserve_permissions = true
atomic = true
[performance]
buffer_size = "64M"
chunk_size = "100M"
resume_threshold = "100M"
[ui]
color = true
progress_style = "bars"
show_per_file = false
clap)| Scenario | Expected Improvement |
|---|---|
| Single 10GB file | ~56% faster (with reflink: instant) |
| 1000 small files | ~4x faster (parallelization) |
| Interrupted transfer | Resume saves re-copying already-transferred data |
src/
├── lib.rs # Library exports
├── main.rs # CLI entrypoint
├── cli.rs # Argument parsing
├── copy.rs # Core copy logic
├── error.rs # Error types
├── progress.rs # Progress tracking
├── resume.rs # Resume state management
├── verify.rs # Checksum verification
└── config.rs # Configuration loading
cargo build --release
cargo test
cargo clippy
git checkout -b feature/amazing-featuregit commit -am 'Add amazing feature'git push origin feature/amazing-featurebetter-mv full implementationApache 2.0 - See LICENSE file for details