Skip to content

Getting Started

RustyWatch Now Supports Multiple Projects! 🤘

Installation

Using Cargo:

Terminal window
cargo install rustywatch

Or using Homebrew:

Terminal window
brew tap ak9024/rustywatch
brew install rustywatch

Quick Start with Init

Generate a configuration file automatically:

Terminal window
rustywatch init

Or use auto-detected defaults:

Terminal window
rustywatch init --yes

Configuration

in the root directory of your projects. create file named rustywatch.yaml.

workspaces:
# define your directory here.
- dir: go-project
# commands run automatically in 'go-project/' directory
cmd: go build
# binary path relative to workspace dir
bin_path: './go-project'
# optional: if do you have a specific arguments
bin_arg:
- server # go run main.go server
# ignore or skip to listen from RustyWatch
ignore:
- '.git/'
# optional: load environment variables from .env file
env_file: '.env'
# Add another projects
- dir: <your_dir>
cmd: <your_commands>
bin_path: <your_bin_location> # relative to workspace dir
bin_arg: <your_bin_arguments>
ignore: <ignore>
env_file: <path_to_env_file>

Usage

Once you’ve set up the configuration file, simply run RustyWatch by typing:

Terminal window
rustywatch

RustyWatch will automatically start building your projects based on the settings in your rustywatch.yaml