RustyWatch
╭━━━╮╱╱╱╱╱╭╮╱╱╱╱╭╮╭╮╭╮╱╱╭╮╱╱╱╭╮
┃╭━╮┃╱╱╱╱╭╯╰╮╱╱╱┃┃┃┃┃┃╱╭╯╰╮╱╱┃┃
┃╰━╯┣╮╭┳━┻╮╭╋╮╱╭┫┃┃┃┃┣━┻╮╭╋━━┫╰━╮
┃╭╮╭┫┃┃┃━━┫┃┃┃╱┃┃╰╯╰╯┃╭╮┃┃┃╭━┫╭╮┃
┃┃┃╰┫╰╯┣━━┃╰┫╰━╯┣╮╭╮╭┫╭╮┃╰┫╰━┫┃┃┃
╰╯╰━┻━━┻━━┻━┻━╮╭╯╰╯╰╯╰╯╰┻━┻━━┻╯╰╯
╱╱╱╱╱╱╱╱╱╱╱╱╭━╯┃
╱╱╱╱╱╱╱╱╱╱╱╱╰━━╯
version: v0.1.5
Live reloading for any programing languages
Usage: rustywatch [OPTIONS] --cmd <COMMAND>
Options:
-d, --dir <DIR> [default: .]
-c, --cmd <COMMAND>
-i, --ignore <IGNORE>
--bin-path <BIN_PATH>
-h, --help Print help
-V, --version Print version
Live reloading inspired by Go Air build with Rust.
Features
- Live reloading support for all programming languages
- Real-time reloading for binaries
- Optimized build process
- Automatic detection and monitoring of new directories
- Enhanced, colorful log output
Install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
cargo install rustywatch
Usage
rustywatch -d . -c "echo 'Files changes!'" --ignore .git --ignore ./tmp
- Example using with config
# create rustywatch.yaml
touch rustywatch.yaml
- Config
rustywatch.yaml
dir: "." # required
cmd: "go build main.go" # required
ignore: # optional
- ".git"
bin_path: "./main" #optional but recommend
bin_arg: # optional
- "--args"
# run rustywatch with config
rustywatch --config rustywatch.yaml
- Example using with Rust (cargo)
# create new project
cargo new hello-world;
cd hello-world;
# run rustywatch in `./src` directory
rustywatch -d './src' -c 'cargo run'
- Example using with Go
# create new project
mkdir hello-world;
cd hello-world;
# init go module
go mod init go-project;
# create file main.go
touch main.go;
# edit file main.go
vim main.go
# and run the project with rustywatch
# then the project will be running with hot reload.
rustywatch -d . -c 'go run main.go' --ignore .git
- Example using with Go (Fiber)
mkdir go-fiber;
cd go-fiber;
go mod init go-fiber;
# install fiber framework
go get github.com/gofiber/fiber/v2
# start live reload with rustywatch
rustywatch -d . -c 'go build main.go' --bin-path './main' --bin-arg server
- Example using with NodeJS
# create new project
mkdir hello-world;
cd nodejs-project;
# create index.js
touch index.js
# edit file index.js and and run the project with rustywatch
vim index.js
# then the project will be running with hot reload
rustywatch -d . -c 'node index.js' --ignore '.tmp' --ignore '.git'
Support languages
- NodeJS
- Go
- Rust
- Javascript
- (more) Need to testing
Star History
License
MIT & Apache-2.0