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.1.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.1-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: filemindr-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 936df62b1e0c059ba4838b52c7db142655a5b8bb1808aa3be67030bffd093b36
MD5 e762b90f2e15fb38861231aa552d91b3
BLAKE2b-256 15f2fb33baa6caf1b5c8b9cd361904cfc4c38c3d3367ef56c95391191e105a84

See more details on using hashes here.

File details

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

File metadata

  • Download URL: filemindr-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 53927c663db11cc2ef70ce32d6225fd229db3a572c6235800957e35a48bdf54c
MD5 8e28a079f9448ce799200869b0252cc9
BLAKE2b-256 4d324d8792d31dc12582d9bb851944a80f68a372e4be51e12daad1a0e9037cb2

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