coffee-time 1.0.0 → 1.2.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +94 -26
  2. package/package.json +16 -2
package/README.md CHANGED
@@ -1,42 +1,110 @@
1
- # coffee-time
1
+ # coffee-time
2
2
 
3
3
  A lightweight CLI that schedules recurring coffee breaks while you code.
4
4
 
5
5
  ## Why
6
+
6
7
  Long uninterrupted work sessions hurt focus. `coffee-time` keeps a reliable, low-noise loop that nudges you to step away at predictable intervals.
7
8
 
9
+ ---
10
+
8
11
  ## Install
12
+
13
+ ### Global install (recommended)
14
+
15
+ ```bash
16
+ npm install -g coffee-time
9
17
  ```
10
- npm install -g .
18
+
19
+ ### Run without installing (try it instantly)
20
+
21
+ ```bash
22
+ npx coffee-time start --interval 45
11
23
  ```
12
24
 
25
+ > After a global install, the `coffee-time` command is available anywhere.
26
+
27
+ ---
28
+
13
29
  ## Usage
30
+
14
31
  Start a continuous break loop with a required interval (minutes):
32
+
33
+ ```bash
34
+ coffee-time start --interval 45
35
+ ```
36
+
37
+ ---
38
+
39
+ ## What happens
40
+
41
+ * Prints a single startup line:
42
+ `Coffee breaks scheduled every 45 minutes. Press Ctrl+C to stop.`
43
+ * Waits 45 minutes, then triggers a break notification.
44
+ * Immediately schedules the next interval and repeats until you stop it (`Ctrl+C`).
45
+
46
+ ---
47
+
48
+ ## Interval rules
49
+
50
+ * Integer minutes only.
51
+ * Must be **≥ 1**.
52
+ * Invalid values:
53
+
54
+ * print a clear error to **stderr**
55
+ * exit with code **2**
56
+
57
+ ---
58
+
59
+ ## Notifications
60
+
61
+ * Always prints a console message on each break:
62
+ `☕ Time for a coffee break! (45 min interval)`
63
+ * Attempts a desktop notification where available:
64
+
65
+ * **macOS:** `osascript -e 'display notification …'`
66
+ * **Linux:** `notify-send` (if installed)
67
+ * **Windows:** PowerShell toast (best-effort)
68
+ * Missing notification tools **never crash** the app — console output is the fallback.
69
+
70
+ ---
71
+
72
+ ## Stopping
73
+
74
+ Press `Ctrl+C` to stop cleanly.
75
+
76
+ * Exit code: `0`
77
+ * Message: `Stopped. Stay fresh ☕`
78
+
79
+ ---
80
+
81
+ ## Exit codes
82
+
83
+ * `0` — normal exit (including Ctrl+C)
84
+ * `2` — usage / argument error
85
+ * `>0` — unexpected runtime error
86
+
87
+ ---
88
+
89
+ ## Development / contributing
90
+
91
+ For local development only (not for end users):
92
+
93
+ ```bash
94
+ git clone <your-repo-url>
95
+ cd coffee-time
96
+ npm install
97
+ npm link
15
98
  ```
99
+
100
+ Run locally:
101
+
102
+ ```bash
16
103
  coffee-time start --interval 45
17
104
  ```
18
105
 
19
- ### What happens
20
- - Prints a single startup line: `Coffee breaks scheduled every 45 minutes. Press Ctrl+C to stop.`
21
- - Waits 45 minutes, then triggers a break notification.
22
- - Immediately schedules the next interval and repeats until you stop it (Ctrl+C).
23
-
24
- ### Interval rules
25
- - Integer minutes only, must be >= 1.
26
- - Invalid values print a clear error to stderr and exit with code `2`.
27
-
28
- ### Notifications
29
- - Always prints a console message on each break: `☕ Time for a coffee break! (45 min interval)`.
30
- - Attempts a desktop notification where available:
31
- - macOS: `osascript -e 'display notification ...'`
32
- - Linux: `notify-send` (if installed)
33
- - Windows: toast via PowerShell (best-effort)
34
- - Missing notification tools never crash the app; console output is the fallback.
35
-
36
- ### Stopping
37
- Press `Ctrl+C` to stop cleanly. Exits with code `0` and prints `Stopped. Stay fresh ☕`.
38
-
39
- ### Exit codes
40
- - `0` — normal exit (including Ctrl+C)
41
- - `2` — usage/argument error
42
- - `>0` — unexpected runtime error
106
+ Unlink when done:
107
+
108
+ ```bash
109
+ npm unlink -g coffee-time
110
+ ```
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.0.0",
6
+ "version": "1.2.0-beta.1",
7
7
  "description": "Lightweight CLI to schedule coffee breaks at a fixed interval.",
8
8
  "bin": {
9
9
  "coffee-time": "./bin/coffee-time.js"
@@ -12,5 +12,19 @@
12
12
  "type": "commonjs",
13
13
  "scripts": {
14
14
  "start": "node ./bin/coffee-time.js"
15
- }
15
+ },
16
+ "keywords": [
17
+ "Coffee Time",
18
+ "Coffee-time",
19
+ "coffee-break",
20
+ "coffee break",
21
+ "Template",
22
+ "coffee",
23
+ "break",
24
+ "productivity",
25
+ "cli",
26
+ "developer",
27
+ "timer",
28
+ "reminder"
29
+ ]
16
30
  }