smv-0.1.1 is not a library.
Visit the last successful build:
smv-0.5.0
SMV - Smart Move
A powerful, Rust-based drop-in replacement for the standard Unix mv command with intelligent filename transformation capabilities.
Features
- Drop-in replacement for the standard Unix
mvcommand - Interactive REPL Interface with command history and tab completion
- Smart File Renaming with multiple transformation strategies:
- Convert to snake_case (
document-name.pdf→document_name.pdf) - Convert to kebab-case (
document_name.pdf→document-name.pdf) - Convert to Title Case (
document_name.pdf→Document Name.pdf) - Convert to camelCase (
document_name.pdf→documentName.pdf) - Convert to PascalCase (
document_name.pdf→DocumentName.pdf) - Convert to lowercase or UPPERCASE
- Clean up spaces and special characters
- Convert to snake_case (
- Preview Mode - See changes before they're applied
- Batch Processing - Apply transformations to multiple files at once
- Undo Functionality - Safely revert changes
- Safety Features - File backups and conflict detection
Installation
Using Cargo
From Source
# Clone the repository
# Build and install
Usage
Basic Usage (like standard mv)
SMV works exactly like the standard mv command for basic moving and renaming:
# Move a file to another location
# Move multiple files to a directory
# Rename a file
### Transformation Mode
Interactive Mode
Launch the interactive REPL interface:
# Start interactive session
# or
In the interactive shell:
smv> ls
document.pdf document.docx image.jpg notes.txt
smv> preview snake *.pdf
document.pdf → document.pdf (no change needed)
smv> rename notes.txt
...
Select transformation:
1. Clean up spaces and special characters
...
4. Convert to Title Case
...
Preview of changes:
"notes.txt" → "Notes.txt"
Apply these changes? [y/N] y
Renamed: "notes.txt" → "Notes.txt"
smv> undo
Operation undone successfully.
smv> help
Commands:
preview <transform> <files> - Show transformation without applying
apply <transform> <files> - Apply transformation
rename <files> --options - Interactive renaming wizard
undo - Revert last operation
cd <directory> - Change directory
ls [pattern] - List files
help - Show this help
quit - Exit program
Full Command Options
Options:
-i, --interactive Launch interactive REPL interface
-p, --preview Preview changes without applying them
-r, --recursive Process subdirectories recursively
-e, --extensions <EXTENSIONS> Comma-separated list of file extensions to process
-a, --remove-accents Remove accents from filenames
--clean Clean up spaces and special characters
--snake Convert filenames to snake_case
--kebab Convert filenames to kebab-case
--title Convert filenames to Title Case
--camel Convert filenames to camelCase
--pascal Convert filenames to PascalCase
--lower Convert filenames to lowercase
--upper Convert filenames to UPPERCASE
--dry-run Same as preview - show changes without applying
--exclude <PATTERNS> Comma-separated patterns to exclude
--max-history-size <SIZE> Maximum number of operations in history [default: 50]
-h, --help Print help
-V, --version Print version
Transformations
| Transform | Description | Example |
|---|---|---|
clean |
Clean up spaces and special characters | My File (1).txt → My File 1.txt |
snake |
Convert to snake_case | My-File.txt → my_file.txt |
kebab |
Convert to kebab-case | My_File.txt → my-file.txt |
title |
Convert to Title Case | my_file.txt → My File.txt |
camel |
Convert to camelCase | my_file.txt → myFile.txt |
pascal |
Convert to PascalCase | my_file.txt → MyFile.txt |
lower |
Convert to lowercase | MyFile.txt → myfile.txt |
upper |
Convert to UPPERCASE | myFile.txt → MYFILE.TXT |
Safety Features
Backups
SMV automatically creates backups of modified files in ~/.config/smv/backups/. This allows the undo functionality to work even after the program has been closed and reopened.
Undo Functionality
The undo command reverts the most recent operation. In interactive mode, you can use:
smv> undo
Conflict Detection
SMV will not overwrite existing files unless explicitly instructed to do so, preventing accidental data loss.
Requirements
- Rust (Minimum supported version: 1.65)
- Standard system libraries
Roadmap
- Multi-step transformation pipelines
- Regular expression-based transformations
- Custom user-defined transformations
- Configuration file system
- Directory synchronization features
- Plugin system for add-ons
- Enhanced REPL with syntax highlighting
- Color-coded preview output
License
MIT License