Skip to content

d3code/run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Run: AutoReload

Run is a command line application that monitors specified directories for file changes and executes user-defined commands, facilitating development automation processes. It allows you to automate builds, restart programs, and gain insights into command execution through a verbose mode.

Installation

To install Run, follow these steps:

  1. Clone the repository:

    git clone git@github.com:d3code/run.git
  2. Navigate to the project directory:

    cd run
  3. Build and install the application:

    go install ./cmd/run

Usage

Run offers various flags to tailor the monitoring behavior and execution of commands. Here are the available flags:

  • -v, --verbose: Show additional information about command execution.

  • -d, --directory: Specify directories to watch (default: current directory).

  • -e, --extension: Specify extensions to watch (default: none).

  • -i, --ignore: Specify files or sub-directories to ignore (default: .git and .idea directories).

  • -c, --command: Specify the command to run and restart on file change.

Examples

Monitor .go files in the current directory and run main.go on changes:

run -r "go run main.go" -e .go

Monitor .go files in the current and another directory, ignore .git, .idea and bin folders, and run a custom command:

run \
  -d . \
  -d ../other-module \
  -e ".go" \
  -r "go build -o bin/server ./cmd/server;bin/server" \
  -r "cd ../other-module;go build -o bin/server ./cmd/server;bin/server" \
  -i ".git",".idea","bin"

Note that you can specify multiple directories and commands to run. Run will execute the commands in the order they are specified.

Contributing

Contributions to Run are welcome! If you'd like to contribute, please follow the guidelines mentioned in the CONTRIBUTING.md file.

License

Run is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages