Giter Club home page Giter Club logo

monitor's Introduction

Monitor Logo

Monitor

Monitor is a CLI tool for reloading commands/services on filesystem changes. It leverages the `fsnotify` package to watch for changes in a specified directory and executes command when changes are detected.

Warning

Project Status

Monitor is currently under active development and is a part of my daily development workflow.

As I am still learning GoLang, the APIs, features, and other aspects of the tool are subject to regular changes. This project serves as both a practical tool and a learning experience.

I welcome any suggestions on features, code practices, and improvements. If you have any feedback, please feel free to open an issue. I'd love to learn more and discuss potential enhancements!

Features

  • Watches a specified directory for file changes.
  • Debounces events to prevent multiple executions from rapid subsequent changes.
  • Ignores extra CHMOD events on Linux to avoid duplicate command executions.

Installation

To install Monitor, you need to have Go installed on your machine. Then, you can build the project using the following commands:

git clone https://github.com/yourusername/monitor.git
cd monitor
go build -o monitor .

Usage

After building the project, you can run the monitor command with the following options:

./monitor <directory> <command/service to run>

Flags

  • --verbose, -v gives out the verbose output.

Commands

  • version: prints the cli version

Example

To watch the current directory and output hello everytime a modification is made within the directory:

./monitor ./ "echo hello"

or

go run main.go ./ "echo hello"

Contributions

Contributions are welcome! Please feel free to submit a Pull Request for anything you might like to see or have any issues with.

License

This project is Licensed under MIT License

monitor's People

Contributors

maranix avatar

Watchers

 avatar

monitor's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.