https://github.com/noelukwa/grape
tiny cli to run commands on file change.
https://github.com/noelukwa/grape
cli go nodemon
Last synced: 10 days ago
JSON representation
tiny cli to run commands on file change.
- Host: GitHub
- URL: https://github.com/noelukwa/grape
- Owner: noelukwa
- License: mit
- Created: 2022-09-05T13:39:59.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-10-09T19:01:36.000Z (almost 3 years ago)
- Last Synced: 2025-10-30T01:45:01.421Z (9 months ago)
- Topics: cli, go, nodemon
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🍇 grape cli
Tiny CLI for running commands on file change. Inspired by [nodemon](https://github.com/remy/nodemon).
## Install
Download any of the binaries or :
```bash
go get -u get github.com/noelukwa/grape
```
or
```bash
go install github.com/noelukwa/grape
```
## Usage
In your working directory, create a `grape.json` file.
```go
grape init
```
Create a namespace or run the default with:
```go
grape run dev
```
Watch and run commands without a config file:
```go
grape on -e ".*go" -c "go run main.go"
```
## Config Format
```json
{
"dev": {
"watch": [
".*go"
],
"command": "go run main.go"
},
"build": {
"watch": [
".*go"
],
"command": "go build -o main main.go"
}
}
```
- `watch` is an array of regex patterns to match files to watch
- `command` is the command to run when a file is changed
- `buid,dev` are namespaces to run commands and can be any string
🚧 Under development 🚧