Skip to content

Commit

Permalink
Readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
cheina97 committed May 29, 2023
1 parent 1bce575 commit 63c58e0
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,57 @@
# GoWatch

GoWatch is a CLI utility to check a program output and send a signal in case a pattern is recognized.
GoWatch is a CLI utility to check a program output (using **regex**) and send a signal if a pattern is recognized.

## Installation

To install GoWatch, you have two options:
### Precompiled binaries

Download it from the [releases page](https://github.com/cheina97/gowatch/releases/download/latest)

### Build from source

```bash
git clone https://github.com/cheina97/gowatch.git
make build
chmod +x gowatch
```

Optionally, you can move the binary to a directory in your PATH, for example:

```bash
sudo mv gowatch /usr/local/bin/gowatch
```

## Usage

**GoWatch** allows you to check the output of a program using **regex** and send a **signal** when a pattern is recognized.

First of all create a **json** file containing some **regex** patterns to check:

```json
["regex1", "regex2", "regex3"]
```

Then run **gowatch** and pass the program you want to check as argument:

```bash
gowatch -f patterns.json command arg1 arg2
```

## Options

These flags can be used to customize the behavior of **gowatch**:

```bash
Usage of ./gowatch:
-c int
Number of concurrent workers (default 4)
-d Enable debug mode
-f string
Path to the json file which contains the patterns to check
-q Disable output
-s value
Signal to send to the command's process when its output matches a pattern (default killed)
-v Show version
```

0 comments on commit 63c58e0

Please sign in to comment.