Skip to main content

Plugin-based CLI file watcher

Project description

nomnom

CI PyPI Version Python Versions

nomnom is an extensible file watcher for local automation. The core detects file changes and fires events. Plugins do the actual work: moving files, enriching them, or kicking off downstream workflows.

Install

With uv:

uv tool install nomnom-py

With pip:

pip install nomnom-py

Quick Start

Initialize

Generates a default config.toml in your project root. If you use the built-in rules plugin, keep rules.toml in that same directory so nomnom can read both files together.

nomnom setup

Watch

Starts watching your directories based on the configuration.

nomnom watch

Use nomnom watch --once <group> to process a single watch group one time, or nomnom watch --dry to inspect behavior without applying file effects.

Example Configuration

nomnom reads config.toml from the current project by default, or a custom path passed with --config. When the built-in rules plugin is enabled, nomnom also reads rules.toml from that same directory.

[[watch]]
name = "inbox"
paths = ["./fixtures/inbox"]
include = ["*.pdf", "*.txt"]

[[watch]]
name = "archive"
paths = ["./fixtures/archive"]

[[plugins]]
name = "rules"
priority = 10
enabled = true

For a fuller starter file, see config.example.toml.

Plugins

The Built-in Rules Plugin

A rules plugin for declarative file automation driven by rules.toml. It ships with the main nomnom-py install and is configured as rules. Keep config.toml and rules.toml side by side. If you run nomnom --config /path/to/config.toml, the built-in plugin will read /path/to/rules.toml automatically. See RULES.md for the rule format and supported actions, and rules.example.toml for a starter example.

Installing Community Plugins

Plugins can be installed from PyPI or directly from a Git repository:

nomnom plugin add <package-name-or-git-url>

Example:

nomnom plugin add git+https://github.com/<owner>/nomnom-plugin-example

Creating a Plugin

Scaffold a local plugin package inside plugins/:

nomnom plugin create <name>

The generated package includes a pyproject.toml entry point and a stub plugin module. Local plugins are automatically discoverable, no need to configure them.

If you'd like to publish your plugin, move it to its own repo and publish it to GitHub or PyPI. There is no system for discovering plugins yet but shoot me an email if interested.

Development

uv sync --dev
uv run pytest
uv run ruff check
uv run mypy nomnom

Contributor guidance lives in CONTRIBUTING.md.

Dependencies

nomnom is built with these open-source libraries:

Dev dependencies:

CLI Reference

Core Commands:
  nomnom watch [WATCH_GROUP] [OPTS]  Start watching (Opts: -c/--config, -V/--verbose, --dry-run, --once)
  nomnom setup [OPTS]           Create or update the config file
  nomnom --version / -v         Print installed version

Plugin Management:
  nomnom plugin add PACKAGE     Install and register a plugin
  nomnom plugin remove PACKAGE  Remove a plugin
  nomnom plugin enable NAME     Enable a plugin in config
  nomnom plugin disable NAME    Disable a plugin in config
  nomnom plugin list            List active plugins
  nomnom plugin setup           Run setup for specific/all plugins
  nomnom plugin create NAME     Scaffold a new local plugin

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

nomnom_py-1.1.0.tar.gz (77.3 kB view details)

Uploaded Source

Built Distribution

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

nomnom_py-1.1.0-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file nomnom_py-1.1.0.tar.gz.

File metadata

  • Download URL: nomnom_py-1.1.0.tar.gz
  • Upload date:
  • Size: 77.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nomnom_py-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f8d5231b4e65c049f3a91a73722daf59e4d441905ca2c5249cabd57f611715ce
MD5 c769a538c6cb729cb1f6d7b10e9dc90d
BLAKE2b-256 5998a7d393bf40ca5bef0250e05e4aba935886f2afc219b3fd8ab5d3ad06c20b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nomnom_py-1.1.0.tar.gz:

Publisher: publish.yml on MohammadKanaan/nomnom-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nomnom_py-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: nomnom_py-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for nomnom_py-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca13618d5fbfd23657357823ad9bc2a30194714d3b5d22c6ff8a914e51de0ecd
MD5 be390f4fa70dbcf2becf367d742cf79d
BLAKE2b-256 e00b82a089c8daafc3e37e18d8248d0cd6c5b710524e29950cc26f65dc297e5f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nomnom_py-1.1.0-py3-none-any.whl:

Publisher: publish.yml on MohammadKanaan/nomnom-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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