Skip to content

shenald-dev/echo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

478 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

echo Logo

πŸ“‘ echo

Ultra-Lightweight File Watcher

Trigger commands on changes instantly. Consumes <5MB RAM.

Python License: MIT


πŸ“‘ Table of Contents


🌟 Overview

echo is an ultra-lightweight, high-performance file watcher built for the terminal. It leverages operating system-native file observation to trigger your custom CLI commands the exact millisecond a file changes, making it the ultimate local development companion.


πŸš€ Enterprise Features

  • πŸͺΆ Ultra Lightweight: Uses native OS file capabilities via watchdog to consume virtually 0 resources (<5MB RAM).
  • ⚑ Instant Feedback: Re-runs your commands natively without spinning up complex wrapper pipelines.
  • πŸ’» Cross Platform: Built with Python + Rich bindings to operate seamlessly across Windows, MacOS, and Linux.
  • ⚑ Unblocked & Multi-threaded: Runs execution in background threads so your file-watching event loop never pauses. Removed lock contention overhead during event evaluation for higher throughput.
  • πŸ”„ Smart Reloads: Automatically terminates running processes if a new file change is detected. If processes become unresponsive or ignore termination signals, Echo forcefully escalates to SIGKILL after a short timeout to prevent deadlocks.
  • ⏱️ Stable Debouncing: Leverages monotonic clocks internally to guarantee reliable duration tracking, avoiding bugs related to system clock shifts and NTP syncs.
  • πŸš€ Fast Event-Driven Shutdown: Uses thread-safe events to instantly unblock background timers during exit, eliminating artificial sleep latency and ensuring clean shutdowns.
  • βš™οΈ Crash Recovery: Restarts automatically if encountering an unexpected system error.

⚑ Quick Start Guide

Installation

pip install echo-watcher

πŸ’» Comprehensive Usage

Watch a Directory

Tell echo what directory to watch, and what command to execute on change:

echo-watch --path ./src --cmd "pytest"

Advanced Usage

You can fine-tune the debouncing and recursive behavior:

echo-watch --path ./app --cmd "npm run build" --debounce 500 --no-recursive

🀝 Contributing

Help us keep Echo as lightweight and precise as possible! πŸ¦‡

  • πŸ› Found a bug? Open an issue to let us know.
  • ✨ Have a feature idea? We are open to PRs! Just make sure not to bloat the watcher logic.
  • 🎨 Documentation tweaks? Always welcome!

Built by a Vibe Coder. Let the code compile itself.

About

πŸ“‘ Lightweight file watcher. Trigger commands on changes. <5MB RAM, single binary.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages