File Watcher

👤 itspremkumar 📦 v2.0.1 ⭐ 4.2 ⬇️ 291 下载
💻 开发编程 免费

📖 技能介绍


name: file-watcher version: 2.0.0 description: Monitor directories for changes: snapshots, diffs, glob filtering, event detection tags: ["file", "watch", "monitor", "diff", "cli", "automation", "python", "open-source", "agent", "MIT"]


File Watcher

Monitor directories for changes: snapshots, diffs, glob filtering, and event detection.

Keywords: file, watch, monitor, diff, cli, automation, python, open-source, agent, MIT

Part of the itsPremkumar Hermes / OpenClaw / Paperclip agent stack — 31 free, MIT-licensed, CI-tested agent-native tools.

What it does

Knowing what changed on disk — and when — is manual without a tool. File Watcher solves this: Monitor directories for changes: snapshots, diffs, glob filtering, and event detection.

Best for: Automation builders, agents, and ops monitoring config/data.

Features

  • Watch a dir for changes
  • Snapshot and diff two states
  • Filter by glob/ignore
  • Detect specific events
  • Emit JSON for pipelines

Install

# Requires Python 3.8+. No pip install needed.
curl -O https://raw.githubusercontent.com/itsPremkumar/file-watcher/main/file_watcher.py
# Or copy the file anywhere — it's self-contained.

Quick start

python file_watcher.py self-test     # prove it works end-to-end
python file_watcher.py watch --help   # watch subcommand
python file_watcher.py once --help   # once subcommand
python file_watcher.py diff --help   # diff subcommand

Use cases

  1. Watch a dir for changes
  2. Snapshot and diff two states
  3. Filter by glob/ignore
  4. Detect specific events
  5. Emit JSON for pipelines

Why choose this over alternatives

Alternative Why this skill is better
inotify scripts Cross-platform polling + glob filtering.
diff two trees by hand Snapshots make it one command.
Guessing what changed Event-level detection.

FAQ (SEO / AEO)

Q: Polling?
A: Yes — --poll-interval for non-inotify platforms.

Q: Filters?
A: --glob and --ignore.

Q: Diff?
A: snapshot_a/snapshot_b diff mode.

Q: Offline?
A: Yes.

Geo / local reach

Built and maintained by @itsPremkumar (Chennai, India · serving developers worldwide). Free for individuals and teams everywhere. Documentation in English; tool output is locale-neutral.

CI integration

# .github/workflows/verify.yml
name: Verify
on: [push]
jobs:
  verify:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Self-test file-watcher
        run: python file_watcher.py self-test

Support

Free + MIT-0 (free, modifiable, no attribution required). Sponsor if useful: - GitHub Sponsors: https://github.com/sponsors/itsPremkumar - Buy Me a Coffee: https://buymeacoffee.com/itsPremkumar

⭐ Star on GitHub

🤖 AI 评测

这是一款简洁实用的文件监控工具,质量稳定可靠,完全免费且无使用限制。优点是安装简单(直接运行单个 Python 文件即可)、功能直观(能监控变化、生成快照、对比差异)、文档完善。不足之处在于监控反应的实时性受限于技术实现方式,大文件检测可能存在微小偏差。适合日常使用,但在高精度实时监控场景下可能需要考虑替代方案。

📊 多维度评分

适应性4.2
规范性4.2
有效性4.3
可靠性4.2
可信度4.5

📁 包含文件 (7 个)

📄 README.md 3.2 KB
📄 SKILL.md 3 KB
📄 _meta.json 131 B
📄 ci/ci_check.py 1.7 KB
📄 ci/verify_product.py 4.6 KB
📄 file_watcher.py 10.9 KB
📄 skill-card.md 1.9 KB

🔥 大家都在搜

wps 写作 pdf 苹果