Skip to content

Itzhep/gomon

Repository files navigation

🛠️ Gomon - A Nodemon Clone Go File Watcher 🚀

Gomon is a Go-based file watcher that automatically reloads your application when file changes are detected. Inspired by nodemon, it helps streamline development by automatically restarting your app.

Build Stats

Go

Project Stats

GitHub repo size GitHub Release GitHub Repo stars GitHub License GitHub Issues GitHub Forks

📦 Features

  • 🔄 Automatic file watching and reloading: Detects file changes and restarts your application automatically.
  • 🎨 CLI with color support: Enhanced visibility with color-coded output.
  • 📝 Simple and clean configuration: Minimal setup required to get started.
  • 🐳 Docker support: Run your application inside Docker containers.
  • 🌐 Live reload server: Supports live reloading for browser-based applications.

🏗️ Installation

Via Go

To install Gomon, use the following command:

go install github.com/Itzhep/gomon@latest

Manual Build

  1. Clone the repository:

    git clone https://github.com/Itzhep/gomon.git
    cd gomon
  2. Build the project:

    go build -o gomon
  3. Install the Project:

    go install
  4. Move to bin (optional):

    move gomon.exe C:\path\to\your\bin

🚀 Usage

  1. Start Gomon with the path to your main application file:

    gomon start --app path/to/your/app.go
  2. Press rs in the CLI to manually restart the application.

🛠️ Configuration

Gomon supports a variety of configurations directly from the CLI. You can specify the file to watch and other options like color settings for better CLI appearance.

CLI Options

  • --app, -a: Path to the Go application to run (required)
  • --debounce, -d: Debounce duration for file changes (default: 1s)
  • --docker: Use Docker for restarting the app
  • --exclude, -e: Directories to exclude from watching (default: .git, vendor, node_modules)
  • --verbose, -v: Enable verbose logging

📝 Example

Here's a basic example of how to use Gomon:

gomon start --app path/to/your/app.go

This command starts Gomon, watches for file changes, and restarts your application automatically.

🐳 Docker Support

Gomon can be run inside a Docker container. Use the provided Dockerfile and docker-compose.yml for easy setup.

🗂️ Contributing

Contributions are welcome! Please submit a pull request or open an issue if you find any bugs or have suggestions.

🌟 Star the Project

If you find Gomon useful, please give it a star on GitHub to support development and stay updated with new features.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🚀 Happy coding with Gomon!