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.0.tar.gz (41.2 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.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

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

Hashes for filemindr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 efc028944676bc2f02cc51271169a62921b145c25f6b549a58c7952637ad89b1
MD5 71ee93ff997d294fb2108ed51e8984bd
BLAKE2b-256 a74abbbaa0278a7efc2dffdaaab638fb5a03b9aa852c4feea9445cf0ff7e693c

See more details on using hashes here.

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

Hashes for filemindr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f4f08acf60477a07ca7d757fa2c754741230edfa33e756dc141040315eac3b16
MD5 8092c2a1e70f8925ec14130b097a9b48
BLAKE2b-256 d4f799d90e92af4df4d36cf4602c1fd5435b2fbc6a881ffc25435155d165a3b3

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