#remove #move #copy #progress-bar #cli #file-io

app bcmr

Better Copy Move Remove (BCMR) - A modern CLI tool for file operations with progress bar and advanced features

3 unstable releases

new 0.2.1 Jan 9, 2025
0.2.0 Jan 9, 2025
0.1.0 Jan 7, 2025

#1140 in Command line utilities

Download history 201/week @ 2025-01-04

201 downloads per month

GPL-3.0 license

730KB
1.5K SLoC

Rust 1.5K SLoC // 0.1% comments Shell 181 SLoC // 0.2% comments

🚀 BCMR (Better Copy Move Remove)

Making file operations simpler and more modern! BCMR is a command-line tool written in Rust that lets you elegantly copy, move, and remove files.

Demo

📥 Installation

cargo install bcmr

Building from Source

git clone https://github.com/Bengerthelorf/bcmr
cd bcmr
cargo build --release

The compiled binary will be available at target/release/bcmr.

✨ Features

  • 🎯 Real-time Progress Bar - No more guessing how long it'll take
  • 🔄 Recursive Directory Operations - Handle entire folders with one command
  • 🎨 Attribute Preservation - Keep timestamps, permissions, and more
  • ⚡ Asynchronous I/O - Faster file operations
  • 🛡️ Safe Confirmation System - Prevent accidental overwrites or deletions
  • 🎭 File Exclusion - Flexibly ignore unwanted files
  • 📊 Detailed Operation Info - Know exactly what's happening
  • 🔌 Shell Integration - Customize command names with flexible prefixes

📖 Detailed Usage Guide

Shell Integration

BCMR provides flexible shell integration similar to zoxide. You can customize command names with prefixes or replace native commands.

Basic syntax:

bcmr init [shell] [options]

Available options:

  • --cmd <prefix>: Set command prefix (e.g., 'b' creates bcp, bmv, brm)
  • --no-cmd: Don't create command aliases
  • --uninstall: Remove previously installed commands

Examples:

# Add to your ~/.bashrc or ~/.zshrc:
# Use custom prefix (creates testcp, testmv, testrm)
eval "$(bcmr init zsh --cmd test)"

# Replace native commands (creates cp, mv, rm)
eval "$(bcmr init zsh --cmd '')"

# Use 'b' prefix (creates bcp, bmv, brm)
eval "$(bcmr init bash --cmd b)"

# Uninstall commands (remove previously added commands)
eval "$(bcmr init zsh --cmd test --uninstall)"

Supported shells:

  • Bash
  • Zsh
  • Fish

Copy Command

Basic syntax:

bcmr copy [options] <source> <destination>

Available options:

  • -r, --recursive: Copy directories recursively
  • --preserve: Preserve file attributes (timestamps, permissions)
  • -f, --force: Force overwrite existing files
  • -y, --yes: Skip confirmation when using force
  • --exclude=<pattern>: Exclude files matching pattern (comma-separated)

Examples:

# Copy a single file
bcmr copy document.txt backup/

# Recursively copy a directory
bcmr copy -r projects/ backup/

# Copy with attribute preservation
bcmr copy --preserve important.conf /etc/

# Force overwrite without prompting
bcmr copy -f -y source.txt destination.txt

# Copy with exclusions
bcmr copy -r --exclude=.git,*.tmp src/ dest/

Move Command

Basic syntax:

bcmr move [options] <source> <destination>

Available options:

  • -r, --recursive: Move directories recursively
  • --preserve: Preserve file attributes
  • -f, --force: Force overwrite existing files
  • -y, --yes: Skip overwrite confirmation
  • --exclude=<pattern>: Exclude matching files

Examples:

# Move a single file
bcmr move old_file.txt new_location/

# Recursively move a directory
bcmr move -r old_project/ new_location/

# Force move with attribute preservation
bcmr move -f --preserve config.json /etc/

# Move with exclusions
bcmr move -r --exclude=node_modules,*.log project/ new_place/

Remove Command

Basic syntax:

bcmr remove [options] <path1> [path2 ...]

Available options:

  • -r, --recursive: Recursively remove directories
  • -f, --force: Force removal without confirmation
  • -i, --interactive: Prompt before each removal
  • -v, --verbose: Show detailed removal process
  • -d: Remove empty directories
  • --exclude=<pattern>: Exclude matching files

Examples:

# Remove a single file
bcmr remove unnecessary.txt

# Recursively remove a directory
bcmr remove -r old_project/

# Interactive removal of multiple files
bcmr remove -i file1.txt file2.txt file3.txt

# Remove empty directory
bcmr remove -d empty_directory/

# Force recursive removal with verbose output
bcmr remove -rf -v outdated_folder/

# Remove with exclusions
bcmr remove -r --exclude=*.important,*.backup trash/

🤝 Contributing

Issues and PRs are welcome! Whether it's bug reports or feature suggestions, we appreciate all contributions.

  1. Fork the project
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🐛 Bug Reports

If you find a bug or have any suggestions, please submit them to the GitHub Issues page. When reporting, please include:

  • BCMR version used
  • Operating system details
  • Steps to reproduce the issue
  • Expected behavior
  • Actual behavior

📝 License

GPL-3.0 © Zane Leong

Dependencies

~11–21MB
~305K SLoC