You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redesign README with SVG logo and architecture diagram
Add a custom SVG logo (terminal + mail icon), ASCII flow diagram,
Mermaid architecture graph, and restructured sections with better
visual hierarchy.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
You're already running `watch` to keep an eye on things. But you can't stare at a terminal forever.
19
+
20
+
**watch+** is a drop-in replacement for GNU `watch` that adds email alerts via [Resend](https://resend.com). Same flags, same behavior — plus a `--email` flag that changes everything.
21
+
22
+
```
23
+
┌─────────────┐
24
+
│ your shell │
25
+
│ command │
26
+
└──────┬───────┘
27
+
│ runs every N seconds
28
+
▼
29
+
┌──────────────┐
30
+
│ watch+ │──────────┐
31
+
│ │ │ output changed?
32
+
└──────┬───────┘ ▼
33
+
│ ┌──────────────┐
34
+
│ │ 📧 Resend │
35
+
▼ │ email alert │
36
+
┌──────────────┐ └──────────────┘
37
+
│ terminal │
38
+
│ (fullscreen │
39
+
│ with diff │
40
+
│ highlight) │
41
+
└──────────────┘
15
42
```
16
43
17
-
### Linux (amd64)
44
+
##Quickstart
18
45
19
46
```bash
47
+
# Install dependencies
20
48
bun install
21
-
bun build --compile --target=bun-linux-x64 src/index.ts --outfile watch+-linux-amd64
22
-
```
23
49
24
-
### Development
50
+
# Build a standalone binary
51
+
bun run build # → ./watch+
25
52
26
-
```bash
53
+
# Or run directly
27
54
bun run src/index.ts -n 1 date
28
55
```
29
56
30
-
## Usage
57
+
> **Cross-compile for Linux:**`bun build --compile --target=bun-linux-x64 src/index.ts --outfile watch+-linux-amd64`
31
58
59
+
## Examples
60
+
61
+
```bash
62
+
# 🕐 Live-updating clock
63
+
watch+ -n 1 date
64
+
65
+
# 🔍 Highlight changes to a file
66
+
watch+ -d -n 1 "cat /tmp/test.txt"
67
+
68
+
# 🚪 Exit as soon as output changes
69
+
watch+ -g -n 1 "date +%S"
70
+
71
+
# 📧 Email yourself when an API response changes
72
+
watch+ --email me@example.com \
73
+
--from noreply@mydomain.com \
74
+
--cooldown 30s \
75
+
-n 2 \
76
+
"curl -s https://api.example.com/status"
77
+
78
+
# 📊 Count errors in a log file
79
+
watch+ -n 5 -- grep -c ERROR /var/log/app.log
32
80
```
33
-
watch+ [options] <command...>
34
-
```
35
81
36
-
### GNU watch flags
82
+
## Flags
83
+
84
+
### GNU watch compatible
85
+
86
+
All the flags you know. Fully compatible — swap `watch` for `watch+` in your scripts.
37
87
38
88
| Flag | Description |
39
89
|------|-------------|
40
-
|`-n, --interval <secs>`| Seconds between updates (default: 2) |
90
+
|`-n, --interval <secs>`| Seconds between updates (default: `2`) |
41
91
|`-d, --differences [permanent]`| Highlight changes between updates |
42
92
|`-e, --errexit`| Exit on non-zero return code |
43
93
|`-g, --chgexit`| Exit when output changes |
@@ -49,45 +99,68 @@ watch+ [options] <command...>
49
99
|`-p, --precise`| Attempt precise timing |
50
100
|`-b, --beep`| Beep on change |
51
101
52
-
### Email flags
102
+
### Email notifications (the + in watch+)
53
103
54
104
| Flag | Description |
55
105
|------|-------------|
56
106
|`--email <address>`| Email address to notify on change |
57
107
|`--from <address>`| Sender email address (required with `--email`) |
58
-
|`--cooldown <duration>`| Min time between emails (default: `1m`) |
108
+
|`--cooldown <duration>`| Min time between emails — e.g. `30s`, `5m`, `1h`(default: `1m`) |
0 commit comments