| Crates.io | cfrename |
| lib.rs | cfrename |
| version | 0.4.0 |
| created_at | 2025-12-15 13:13:19.992589+00 |
| updated_at | 2025-12-17 12:31:42.792899+00 |
| description | CLI tool for standardizing file renaming and organization |
| homepage | |
| repository | https://github.com/swiizyy/cfrename |
| max_upload_size | |
| id | 1986066 |
| size | 107,180 |
cfrename is a CLI (command-line) tool designed to standardize file renaming and organization using a strict naming convention and user-defined hierarchical configuration.
The project now has a functional first version (MVP).
The goal of cfrename is to provide a reliable and durable tool that:
The project is built on a few simple principles:
Configuration describes the rules Categories, types, descriptions, and constraints are never hardcoded.
No implicit assumptions Every piece of necessary information is explicitly requested or defined.
Hierarchy before automation Documents are classified according to a logical and navigable structure.
Durability Generated filenames must remain readable and understandable years from now.
YYYY-MM-DD_TYPE_DESCRIPTION.ext
Examples:
2024-11-15_TAX_Notice.pdf
2023-06-01_BANK_Statement.pdf
Some documents are linked to an external entity (company, bank, organization).
YYYY-MM-DD_TYPE_ENTITY_DESCRIPTION.ext
Examples:
2025-10-05_WORK_ACME_Contract_Permanent.pdf
2023-03-15_BANK_BNP_Statement.pdf
The inclusion of the entity depends on the document type and is defined by the configuration.
Category
โโโ Type
โโโ Description
Navigation is guided, without dangerous free-form input.
The tool's behavior is entirely driven by an external configuration file stored in platform-specific standard directories:
~/.config/cfrename/config.toml~/Library/Application Support/io.swiizyy.cfrename/config.toml%APPDATA%\swiizyy\cfrename\config.tomlThe configuration defines:
See the USAGE.md file for complete installation and usage instructions.
# Build the project
cargo build --release
# On first run, cfrename will prompt you to create a default configuration
# Just run the tool and answer 'Yes' when prompted:
./target/release/cfrename <file>
# Or manually copy the example configuration
mkdir -p ~/.config/cfrename
cp config.example.toml ~/.config/cfrename/config.toml
# Edit the configuration to match your needs
# Set language (english/french), base_path, and customize categories
nano ~/.config/cfrename/config.toml
# Rename a document interactively
cfrename ~/Downloads/document.pdf
# Use a custom configuration file
cfrename ~/Downloads/document.pdf --config /path/to/config.toml
Functional MVP with core features implemented:
This is a personal project, but contributions, suggestions, and feedback are welcome!
Please ensure that any contributions adhere to the project's core philosophy:
MIT License - Free for personal and commercial use.
# Build
cargo build
# Build release
cargo build --release
# Run
cargo run -- <file>
# Run with custom config
cargo run -- <file> --config config.example.toml
# Test
cargo test
# Test specific test
cargo test <test_name>
# Check without building
cargo check
The codebase is organized into focused modules:
All document categories, types, descriptions, and entities are configuration-driven. The implementation maintains strict separation between business rules and technical implementation.