Package Exports
- copyflow
- copyflow/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (copyflow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
CopyFlow
A high-performance command-line tool for copying large files efficiently. Designed especially for copying large files (like videos) to USB drives and external storage with seamless flow and smart retry logic.
Features
- 🚀 Efficient streaming: Uses Node.js streams to copy files without loading them entirely into memory
- 📊 Progress tracking: Real-time progress bar showing copy status
- 🔍 Integrity verification: Optional MD5 hash verification to ensure file integrity
- 🔄 Automatic retry: Configurable retry mechanism for failed transfers
- ⚡ Speed monitoring: Shows transfer speed and estimated time
- 💾 Memory efficient: Works with files of any size without memory issues
Installation
Install globally
npm run install-globalOr use directly with npx
npx copyflow <source> <destination>Usage
Basic usage
copyflow /path/to/source.mp4 /media/usb/destination.mp4With integrity verification
copyflow --verify /large-file.zip /backup/large-file.zipWith custom retry count
copyflow --retries 5 /video.mkv /external/video.mkvShow help
copyflow --helpOptions
--help, -h: Show help message--verify, -v: Verify file integrity after copying using MD5 hash--retries, -r <number>: Set number of retry attempts (default: 3)
Examples
Copy a 2GB video file to USB drive:
copyflow /home/user/movie.mp4 /media/usb/movies/movie.mp4Copy with verification (recommended for important files):
copyflow --verify /important/document.pdf /backup/document.pdfCopy with 10 retry attempts:
copyflow --retries 10 /large/database.sql /external/backup.sqlDevelopment
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build the project
npm run build
# Install globally for testing
npm run install-global
# Uninstall global installation
npm run uninstall-globalWhat Makes CopyFlow Unique?
🎯 Specialized for Large Files
Unlike standard cp or GUI file managers, CopyFlow is specifically optimized for large files (2GB+ videos, databases, backups) that often cause issues with traditional copying methods.
🔄 Smart Retry System
- Automatic retry with configurable attempts (1-10 retries)
- Intelligent error recovery for network drives and USB devices
- Handles temporary connection drops gracefully
📊 Real-Time Visual Feedback
- Beautiful progress bar with Unicode characters (█░)
- Live speed monitoring (MB/s)
- File size formatting (Bytes → KB → MB → GB)
- Percentage completion tracking
🛡️ Built-in Integrity Verification
- Optional MD5 hash verification to ensure file integrity
- Detects corruption during transfer
- Critical for important data transfers
💾 Memory Efficient Streaming
- Uses Node.js streams instead of loading files into memory
- Can copy files larger than available RAM
- Constant memory usage regardless of file size
⚡ Performance Optimized
- Chunked reading/writing for optimal I/O performance
- Async operations prevent UI blocking
- Cross-platform compatibility (Linux, macOS, Windows)
🎨 User Experience Focus
- Clean, emoji-enhanced CLI interface
- Detailed error messages with context
- Professional help system
- Easy global installation
Comparison with Alternatives
| Feature | CopyFlow | Standard cp |
GUI File Managers | rsync |
|---|---|---|---|---|
| Progress Bar | ✅ Real-time | ❌ None | ✅ Basic | ✅ Basic |
| Speed Display | ✅ MB/s | ❌ None | ✅ Limited | ✅ Basic |
| Retry Logic | ✅ Configurable | ❌ None | ❌ Manual | ✅ Limited |
| Integrity Check | ✅ MD5 Hash | ❌ None | ❌ None | ✅ Checksum |
| Memory Usage | ✅ Constant | ✅ Constant | ❌ Variable | ✅ Constant |
| Large File Support | ✅ Optimized | ✅ Basic | ❌ Often fails | ✅ Good |
| CLI Interface | ✅ Modern | ✅ Basic | ❌ None | ✅ Complex |
Why Not Just Use cp or rsync?
Standard cp command:
- No progress indication for large files
- No retry mechanism
- No integrity verification
- Limited error handling
rsync:
- Complex syntax and options
- Overkill for simple file copying
- No visual progress bar
- Primarily designed for synchronization
GUI File Managers:
- Often freeze with very large files
- Limited retry options
- No integrity verification
- Can't be automated or scripted
CopyFlow fills the gap by providing a simple, reliable, and visually appealing solution specifically for large file transfers.