cargo-auto-run

Crates.iocargo-auto-run
lib.rscargo-auto-run
version0.1.2
sourcesrc
created_at2024-07-28 10:40:30.107877
updated_at2024-07-30 09:47:13.762137
descriptionA file watcher for Rust projects that runs a specified command on file changes.
homepage
repositoryhttps://github.com/crypto-priest/cargo-auto-run
max_upload_size
id1317932
size17,802
Mahavir Ganapati Dash (crypto-priest)

documentation

README

Here's the full README.md for your CLI tool, Cargo Auto-Run:

Cargo Auto-Run

Cargo Auto-Run is a versatile CLI tool that watches for file changes in a specified directory and runs a specified command if changes are detected. This tool is particularly useful for automatically running commands like cargo run whenever you make changes to your code, but it can be used with any command you specify.

Features

  • Watches for file changes recursively in the specified directory.
  • Runs a specified command if any changes are detected.
  • Can be used with any command, not just cargo run.

Installation

To install Cargo Auto-Run, use the following command:

cargo install cargo-auto-run

Usage

To use Cargo Auto-Run, navigate to the directory you want to watch and run the following command:

cargo-auto-run --command "<command>"

Arguments

  • --command <command>: The command to run on file changes. This should be the full command you want to execute, e.g., cargo run, make build, npm start, etc.

Example

To watch the current directory for changes and run cargo run if any changes are detected, use:

cargo-auto-run --command "cargo run"

You can also use it with any other command. For example, to watch for changes and run npm start, use:

cargo-auto-run --command "npm start"
Commit count: 0

cargo fmt