Various CLI helper tools in one Rust project. Produces separate binaries for each tool.
./build.sh
./install.shThe CLI binaries can be configured with a user config file in addition to the CLI arguments.
The config file goes to ~/.config/cli-tools.toml,
and has separate sections for each binary.
An example config cli-tools.toml is provided in the repo root.
Print divider comment with centered text
Usage: div [OPTIONS] [TEXT]...
Arguments:
[TEXT]... Optional divider text(s)
Options:
-l, --length <LENGTH> Divider length in number of characters [default: 120]
-c, --char <CHARACTER> Divider character to use [default: %]
-a, --align Align multiple divider texts to same start position
-h, --help Print help
-V, --version Print versionMove files to directories based on name
Usage: dirmove [OPTIONS] [PATH]
Arguments:
[PATH] Optional input directory or file
Options:
-a, --auto Auto-confirm all prompts without asking
-c, --create Create directories for files with matching prefixes
-D, --debug Print debug information
-f, --force Overwrite existing files
-n, --include <INCLUDE> Include files that match the given pattern
-e, --exclude <EXCLUDE> Exclude files that match the given pattern
-i, --ignore <IGNORE> Ignore prefix when matching filenames
-o, --override <OVERRIDE> Override prefix to use for directory names
-g, --group <COUNT> Minimum number of matching files needed to create a group [default: 3]
-p, --print Only print changes without moving files
-r, --recurse Recurse into subdirectories
-l, --completion <SHELL> Generate shell completion [possible values: bash, elvish, fish, powershell, zsh]
-v, --verbose Print verbose output
-h, --help Print help
-V, --version Print versionRename files to use dot formatting
Usage: dots [OPTIONS] [PATH]
Arguments:
[PATH] Optional input directory or file
Options:
-c, --case Convert casing
--debug Enable debug prints
-d, --directory Rename directories
-f, --force Overwrite existing files
-n, --include <INCLUDE> Include files that match the given pattern
-e, --exclude <EXCLUDE> Exclude files that match the given pattern
-i, --increment Increment conflicting file name with running index
-p, --print Only print changes without renaming files
-r, --recurse Recurse into subdirectories
-x, --prefix <PREFIX> Append prefix to the start
-b, --prefix-dir Prefix files with directory name
-j, --suffix-dir Suffix files with directory name
-u, --suffix <SUFFIX> Append suffix to the end
-s, --substitute <PATTERN> <REPLACEMENT> Substitute pattern with replacement in filenames
-m, --random Remove random strings
-z, --remove <PATTERN> Remove pattern from filenames
-g, --regex <PATTERN> <REPLACEMENT> Substitute regex pattern with replacement in filenames
-y, --year Assume year is last in short dates
-l, --completion <SHELL> Create shell completion [possible values: bash, elvish, fish, powershell, zsh]
-v, --verbose Print verbose output
-h, --help Print help
-V, --version Print versionFind duplicate video files based on identifier patterns, and detect files with the same name but different resolutions, codecs, or file extensions.
Find duplicate video files based on identifier patterns
Usage: dupefind [OPTIONS] [PATHS]...
Arguments:
[PATHS]... Input directories to search
Options:
-g, --pattern <PATTERN> Identifier patterns to search for (regex)
-e, --extension <EXTENSION> Video file extensions to include
-m, --move-files Move duplicates to a "Duplicates" directory
-p, --print Only print changes without moving files
-r, --recurse Recurse into subdirectories
-d, --default Use default paths from config file
-l, --completion <SHELL> Generate shell completion [possible values: bash, elvish, fish, powershell, zsh]
-v, --verbose Print verbose output
-h, --help Print help
-V, --version Print versionRename files and directories to use yyyy.mm.dd date format for files,
and yyyy-mm-dd for directories.
Flip dates in file and directory names to start with year
Usage: flipdate [OPTIONS] [PATH]
Arguments:
[PATH] Optional input directory or file
Options:
-d, --dir Use directory rename mode
-f, --force Overwrite existing
-e, --extensions <EXTENSION> Specify file extension(s)
-y, --year Assume year is first in short dates
-p, --print Only print changes without renaming
-r, --recurse Recurse into subdirectories
-s, --swap Swap year and day around
-v, --verbose Print verbose output
-h, --help Print help
-V, --version Print versionConvert video files to HEVC (H.265) format using ffmpeg and NVENC.
Convert video files to HEVC (H.265) format using ffmpeg and NVENC
Usage: vconvert [OPTIONS] [PATH]
Arguments:
[PATH] Optional input directory or file
Options:
-a, --all Convert all known video file types (default is only .mp4 and .mkv)
-b, --bitrate <LIMIT> Skip files with bitrate lower than LIMIT kbps [default: 8000]
-c, --count <COUNT> Limit the number of files to convert
-d, --delete Delete input files immediately instead of moving to trash
-p, --print Print commands without running them
-f, --force Overwrite existing output files
-n, --include <INCLUDE> Include files that match the given pattern
-e, --exclude <EXCLUDE> Exclude files that match the given pattern
-t, --extension <EXTENSION> Override file extensions to convert
-o, --other Convert all known video file types except MP4 files
-r, --recurse Recurse into subdirectories
-k, --skip-convert Skip conversion
-m, --skip-remux Skip remuxing
-s, --sort <ORDER> Sort files [default: "name (alphabetical)"] [possible values: bitrate, bitrate-asc, size, size-asc, duration, duration-asc, resolution, resolution-asc, name, name-desc]
-l, --completion <SHELL> Generate shell completion [possible values: bash, elvish, fish, powershell, zsh]
-v, --verbose Print verbose output
-h, --help Print help (see more with '--help')
-V, --version Print versionAdd video resolution labels to filenames based on actual video dimensions.
Add video resolution to filenames
Usage: vres [OPTIONS] [PATH]
Arguments:
[PATH] Optional input directory or file path
Options:
-d, --debug Enable debug prints
-x, --delete [<DELETE>] Delete files with width or height smaller than limit (default: 500)
-f, --force Overwrite existing files
-p, --print Only print file names without renaming or deleting
-r, --recurse Recursive directory iteration
-v, --verbose Print verbose output
-h, --help Print help
-V, --version Print versionParse Finvoice credit card statements and output items as CSV and Excel sheet.
Parse Finvoice XML credit card statement files
Usage: visaparse [OPTIONS] [PATH]
Arguments:
[PATH] Optional input directory or XML file path
Options:
-o, --output <OUTPUT_PATH> Optional output path (default is the input directory)
-p, --print Only print information without writing to file
-n, --number <NUMBER> How many total sums to print with verbose output [default: 20]
-v, --verbose Print verbose output
-h, --help Print help
-V, --version Print versionCreate git version tags for a Rust project
Usage: vtag [OPTIONS] [PATH]
Arguments:
[PATH] Optional git repository path. Defaults to current directory
Options:
-d, --dryrun Only print information without creating or pushing tags
-p, --push Push tags to remote
-n, --new Only push new tags that did not exist locally
-s, --single Use a single push to push all tags
-v, --verbose Print verbose output
-h, --help Print help
-V, --version Print version