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.
- 🔄 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.
To install Gomon, use the following command:
go install github.com/Itzhep/gomon@latest
-
Clone the repository:
git clone https://github.com/Itzhep/gomon.git cd gomon
-
Build the project:
go build -o gomon
-
Install the Project:
go install
-
Move to bin (optional):
move gomon.exe C:\path\to\your\bin
-
Start Gomon with the path to your main application file:
gomon start --app path/to/your/app.go
-
Press
rs
in the CLI to manually restart the application.
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.
--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
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.
Gomon can be run inside a Docker container. Use the provided Dockerfile
and docker-compose.yml
for easy setup.
Contributions are welcome! Please submit a pull request or open an issue if you find any bugs or have suggestions.
If you find Gomon useful, please give it a star on GitHub to support development and stay updated with new features.
This project is licensed under the MIT License - see the LICENSE file for details.
🚀 Happy coding with Gomon!