Skip to main content

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_to
    • copy_to
  • Global and per-rule conflict policies:
    • rename
    • skip
    • overwrite
    • trash
  • 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:

  • rename
  • skip
  • overwrite
  • trash

🧪 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

filemindr-1.0.4.tar.gz (43.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

filemindr-1.0.4-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

Details for the file filemindr-1.0.4.tar.gz.

File metadata

  • Download URL: filemindr-1.0.4.tar.gz
  • Upload date:
  • Size: 43.3 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

Hashes for filemindr-1.0.4.tar.gz
Algorithm Hash digest
SHA256 970ba95bf16329dc34be1c2e32bd9195443b778c730f1a8ca69405613b172005
MD5 9b35a26c2e2f8d02fb856d0962e481a0
BLAKE2b-256 4d1704e8a37f6f62a00a75f4121b42096847556c8d6d2e051062d2f690794472

See more details on using hashes here.

File details

Details for the file filemindr-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: filemindr-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 15.8 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

Hashes for filemindr-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b23158832044e861c80de226be556cc40242a0d0cf6724f556153f8d5c9d5364
MD5 f5ddfaa4652f347da20a6e685eda2271
BLAKE2b-256 758c87aceeea29dd676a4e93f1967acdf59f00f9eaee98a3e06c0f66d8c972ea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page