Skip to content

ak9024/rustywatch

RustyWatch

Crates.io Total Downloads Crates.io License docs.rs Crates.io Size GitHub Repo stars GitHub Tag Crates.io Version Codecov

RustyWatch

Live Reloading Built with Rust

Inspired by Go Air, RustyWatch provides powerful live reloading capabilities designed for developers working across various programming languages.

Features

  • Universal Live Reloading: Supports live reloading for any programming language (Go, Rust, Node.js, Python, and more).
  • Real-time Binary Reloading: Automatically rebuilds and restarts your binaries on file changes.
  • Monorepo & Multi-Project Support: Run multiple projects concurrently with a single command.
  • Automatic Working Directory: Commands execute in the workspace dir automatically - no cd prefix needed.
  • Process Monitoring Dashboard: Built-in terminal UI (--monitor) with real-time CPU/memory tracking, process management, and system metrics.
  • Smart File Filtering: Intelligent ignore patterns with glob matching for common build artifacts (.git, node_modules, target/, etc.).
  • Async & High Performance: Non-blocking async I/O with Tokio, event debouncing, and efficient data structures.
  • Cross-Platform: Works on macOS, Linux, and Windows.
  • Flexible Configuration: YAML-based config or CLI arguments for quick usage.

Install

Using Cargo

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

cargo install --git https://github.com/ak9024/rustywatch rustywatch

Using Homebrew

# Add the tap
brew tap ak9024/rustywatch
# Install rustywatch
brew install rustywatch

Quick Start

Initialize Configuration

Generate a configuration file interactively:

rustywatch init

Or use auto-detected defaults:

rustywatch init --yes

Run RustyWatch

To start the project, ensure you have a rustywatch.yaml configuration file in the root directory of your project. Then, run the CLI from the root directory to launch RustyWatch.

Configuration

The default configuration file is named rustywatch.yaml, and it must be located in your project's root directory. For a reference configuration, please see the example below:

# define workspaces, rustywatch can be handled multi project at the same time.
# commands automatically run in the workspace directory - no cd needed!
workspaces:
  # first project binary apps
  - dir: 'golang-project' # define path directory
    cmd: 'go build main.go' # runs in golang-project/
    bin_path: './main' # relative to workspace dir (golang-project/)
    bin_arg: # define arguments
     - server
    ignore:
     - '.git'
    env_file: '.env' # load environment variables from golang-project/.env
  # second project binary apps
  - dir: 'rust-project'
    cmd: 'cargo build' # runs in rust-project/
    bin_path: './target/debug/rust-project' # relative to workspace dir
    env_file: '/.env' # load environment variables from project root .env
  # third project non binary apps
  - dir: 'nodejs-project'
    cmd: 'npm run dev' # runs in nodejs-project/
  # more ...
# list directories
ls 
.
└── your-project/
    ├── go-project/
    │   ├── go.mod
    │   ├── go.sum
    │   └── main.go
    ├── rust-project/
    │   ├── src/
    │   │   └── main.rs
    │   ├── Cargo.toml
    │   └── Cargo.lock
    ├── nodejs-project/
    │   ├── index.js
    │   ├── package.json
    │   └── package-lock.json
    └── rustywatch.yaml (config here)

Run the project

rustywatch

Commands

Init Command

Generate a configuration file interactively:

rustywatch init [OPTIONS]
Option Description
-o, --output <FILE> Config file path (default: rustywatch.yaml)
--yes Skip prompts, use auto-detected defaults
-f, --force Overwrite existing config file

Auto-detects project type: Rust, Go, Node.js, Python, Bun.

Process Monitor

Launch with the built-in TUI dashboard for real-time monitoring:

rustywatch --monitor

Features: CPU/memory tracking, process management, system metrics.

Help

rustywatch --help

Update version

cargo install rustywatch

Testing

Run all tests

cargo test

Run unit tests only

cargo test --lib

Run integration tests only

cargo test --test '*'

Run with code coverage

Requires cargo-llvm-cov: cargo install cargo-llvm-cov

cargo llvm-cov

Run benchmarks

cargo bench

Support languages

  • Go
  • Rust
  • Bun
  • Node.js
  • (more)

Star History

Star History Chart

License

MIT & Apache-2.0

About

Live Reloading Built with Rust

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

 
 
 

Contributors