Declarative local file pipelines in Python
Project description
Filemindr
Declarative local file automation using profiles.
Filemindr lets you describe what should happen to your files, not how.
You define rule pipelines in YAML, group them into profiles, and run them safely through a clean CLI.
Built as a learning and portfolio project with strong focus on:
- predictable behavior
- safety by default
- excellent CLI DX
Features
- Profile-based configuration in
~/.filemindr - Declarative YAML rules
- Rule engine with priority, where the highest match wins
- Match by:
- file extension
- filename regex
- file age with
older_than_days
- Actions:
move_tocopy_torename_template
- Global and per-rule conflict policies:
renameskipoverwritetrash
- Dry-run mode
- Explain mode
- Watch mode
- Final summary report
- Structured logging with
INFOandDEBUG - Cross-platform support for Windows, macOS, and Linux
Installation
pipx install filemindr
or
pip install filemindr
Development setup:
uv sync --extra dev
Profiles
Instead of a single global YAML, Filemindr uses profiles.
Each profile lives in:
~/.filemindr/rules/<profile>/rules.yaml
And all profiles are registered in:
~/.filemindr/profiles.yaml
This allows:
- multiple setups such as
home,work, ormedia - explicit selection via CLI
- zero ambiguity about which config is running
Quick Start
Create your first profile:
filemindr profile init home
This creates:
~/.filemindr/
├── profiles.yaml
└── rules/
└── home/
└── rules.yaml
Open and edit the rules:
filemindr profile open home
Example rules.yaml:
source: ~/Downloads
default_target: ~/Downloads/others
conflict_policy: rename
rules:
- name: invoices
priority: 100
match:
extensions: ["pdf"]
regex: "(?i)invoice|nota|nf"
action:
move_to: ~/Downloads/finance/invoices
- name: dated-pdfs
priority: 70
match:
extensions: ["pdf"]
action:
move_to: ~/Downloads/archive/{yyyy}/{mm}
rename_template: "{stem}_{yyyy}-{mm}{suffix}"
- name: images
priority: 40
match:
extensions: ["jpg", "png", "webp"]
action:
move_to: ~/Downloads/images
Important notes:
- Rule priority matters. If two rules match the same file, the higher priority wins.
rename_templateonly defines the final file name, not folders.move_toandcopy_tocan use templates in the destination path.
Supported template fields:
{name}{stem}{suffix}{ext}{parent}{yyyy}{mm}{dd}
Preview:
filemindr run -p home --dry-run
Verbose preview:
filemindr run -p home --dry-run --log-level DEBUG
Run:
filemindr run -p home
Profile Commands
Create:
filemindr profile init home
List:
filemindr profile list
Show path:
filemindr profile show home
Open in editor:
filemindr profile open home
Remove completely:
filemindr profile remove home
Watch Mode
Continuous:
filemindr watch -p home
Single batch:
filemindr watch -p home --once
Explain Mode
Explain a directory:
filemindr explain -p home ~/Downloads
Explain a single file with spaces in the path:
filemindr explain -p home "C:\Users\you\Downloads\Day Trade-2025.pdf"
Validate
filemindr validate -p home
Doctor
filemindr doctor
Conflict Policy
Supported values:
renameskipoverwritetrash
Development
Install development dependencies:
uv sync --extra dev
Run tests:
uv run pytest -q
Status
Current release line: 1.1.x
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file filemindr-1.1.0.tar.gz.
File metadata
- Download URL: filemindr-1.1.0.tar.gz
- Upload date:
- Size: 44.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c7d9a5baed5e81a4d0fffd2df63d2a5c41d0df53e1bbdbb714ccbae31689312
|
|
| MD5 |
ae61f7425a883e8bd3f54963073f4241
|
|
| BLAKE2b-256 |
9d3155e83a95b27f686596cd23d2c3c796c049210bc8140f7e789965f99bc44d
|
File details
Details for the file filemindr-1.1.0-py3-none-any.whl.
File metadata
- Download URL: filemindr-1.1.0-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1ed25e6d8f7fa6fcf7e87182a92342959fced1510afb96678f8d8f8dee52c70e
|
|
| MD5 |
80031980f0deac87ddcf09eb8e905182
|
|
| BLAKE2b-256 |
0c50b07832b2d778c6b6a229def105b6714b146f98412fcac2fba57d6ed06e81
|