Declarative local file pipelines in Python
Project description
Filemindr --- Rule-Driven Local File Automation (v2)
Declarative local file automation using profiles.
Filemindr lets you describe what should happen to your files --- not how.
You define rule pipelines in YAML (extensions, regex, age, priority), group them into profiles, and run them safely via a clean CLI.
Built as a learning + portfolio project with strong focus on:
- predictable behavior\
- safety by default\
- excellent CLI DX
✨ Features (v2)
Core
- Profiles-based configuration (
~/.filemindr) - Declarative YAML rules
- Rule engine with priority (highest wins)
- Match by:
- file extensions
- regex on filename
- file age (
older_than_days)
- Actions:
move_tocopy_to
- Global and per-rule conflict policies:
renameskipoverwritetrash
- Dry-run mode
- Final summary report
- Structured logging (
INFO,DEBUG) - Cross-platform (Windows, macOS, Linux)
📦 Installation
pipx install filemindr
or
pip install filemindr
Dev:
uv sync
🧠 Profiles (core concept)
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 (home, work, media, etc)
- 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: images
priority: 40
match:
extensions: ["jpg", "png", "webp"]
action:
move_to: ~/Downloads/images
Preview:
filemindr run -p home --dry-run
Run:
filemindr run -p home
Verbose:
filemindr run -p home --log-level DEBUG
📂 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
filemindr explain -p home ~/Downloads
✅ Validate
filemindr validate -p home
🩺 Doctor
filemindr doctor
⚔ Conflict Policy
Supported:
renameskipoverwritetrash
🧪 Development
uv run pytest
🛠 Status
Stable v2.
📄 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.0.0.tar.gz.
File metadata
- Download URL: filemindr-1.0.0.tar.gz
- Upload date:
- Size: 41.2 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 |
efc028944676bc2f02cc51271169a62921b145c25f6b549a58c7952637ad89b1
|
|
| MD5 |
71ee93ff997d294fb2108ed51e8984bd
|
|
| BLAKE2b-256 |
a74abbbaa0278a7efc2dffdaaab638fb5a03b9aa852c4feea9445cf0ff7e693c
|
File details
Details for the file filemindr-1.0.0-py3-none-any.whl.
File metadata
- Download URL: filemindr-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.3 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 |
f4f08acf60477a07ca7d757fa2c754741230edfa33e756dc141040315eac3b16
|
|
| MD5 |
8092c2a1e70f8925ec14130b097a9b48
|
|
| BLAKE2b-256 |
d4f799d90e92af4df4d36cf4602c1fd5435b2fbc6a881ffc25435155d165a3b3
|