@wonsukchoi/crondex 0.1.0 → 0.1.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.
- package/README.md +29 -11
- package/bin/crondex.js +1 -1
- package/catalog.json +76 -1
- package/jobs/personal/bill-due-reminder.yaml +32 -0
- package/jobs/personal/habit-checkin.yaml +35 -0
- package/jobs/personal/meal-plan-reminder.yaml +31 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,21 +18,35 @@ adjusts `schedule`/`variables`, and wires it into whatever scheduler it has.
|
|
|
18
18
|
|
|
19
19
|
## CLI
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
Published on npm as `@wonsukchoi/crondex` (the plain name `crondex` was
|
|
22
|
+
blocked by npm's anti-typosquat check). The command itself is still
|
|
23
|
+
`crondex` once installed — only the package name is scoped:
|
|
23
24
|
|
|
24
25
|
```bash
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
npx @wonsukchoi/crondex list # browse everything
|
|
27
|
+
npx @wonsukchoi/crondex list --category devops # filter by category or --tag
|
|
28
|
+
npx @wonsukchoi/crondex show backup-reminder # print one job's YAML
|
|
29
|
+
npx @wonsukchoi/crondex add backup-reminder --dest ./cron/backup-reminder.yaml
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Or install once and drop the scope prefix on every call:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npm install -g @wonsukchoi/crondex
|
|
36
|
+
crondex list
|
|
30
37
|
```
|
|
31
38
|
|
|
32
39
|
`add` copies the job's YAML as-is into your project — it's yours to edit
|
|
33
|
-
from there
|
|
34
|
-
|
|
35
|
-
|
|
40
|
+
from there. `npx` always pulls the latest published catalog; a global
|
|
41
|
+
install needs `npm update -g @wonsukchoi/crondex` to see new jobs (`crondex
|
|
42
|
+
list` prints a reminder either way).
|
|
43
|
+
|
|
44
|
+
A clone works too, no npm required:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
git clone https://github.com/wonsukchoi/crondex.git && cd crondex
|
|
48
|
+
node bin/crondex.js list
|
|
49
|
+
```
|
|
36
50
|
|
|
37
51
|
## Layout
|
|
38
52
|
|
|
@@ -43,7 +57,8 @@ crondex/
|
|
|
43
57
|
├── schema/job.schema.json spec every job file follows
|
|
44
58
|
├── jobs/
|
|
45
59
|
│ ├── devops/
|
|
46
|
-
│
|
|
60
|
+
│ ├── productivity/
|
|
61
|
+
│ └── personal/
|
|
47
62
|
└── scripts/
|
|
48
63
|
├── build-catalog.js regenerates catalog.json from jobs/**/*.yaml
|
|
49
64
|
└── validate-jobs.js validates every job against the schema
|
|
@@ -63,6 +78,9 @@ crondex/
|
|
|
63
78
|
| `daily-standup-summary` | productivity | `0 8 * * 1-5` | script + agent-prompt |
|
|
64
79
|
| `inbox-triage` | productivity | `0 7,13 * * 1-5` | agent-prompt only |
|
|
65
80
|
| `weekly-report` | productivity | `0 16 * * 5` | script + agent-prompt |
|
|
81
|
+
| `bill-due-reminder` | personal | `0 9 * * *` | script |
|
|
82
|
+
| `habit-checkin` | personal | `0 20 * * *` | script |
|
|
83
|
+
| `meal-plan-reminder` | personal | `0 9 * * 0` | script + agent-prompt |
|
|
66
84
|
|
|
67
85
|
Full details (description, tags, variables) live in `catalog.json` and each
|
|
68
86
|
job's YAML file.
|
package/bin/crondex.js
CHANGED
|
@@ -42,7 +42,7 @@ function catalogInfoLine() {
|
|
|
42
42
|
const viaNpx = process.env.npm_command === "exec";
|
|
43
43
|
const freshness = viaNpx
|
|
44
44
|
? "running via npx — you're always on the latest catalog."
|
|
45
|
-
:
|
|
45
|
+
: `running from a local/global install — run \`npm update -g ${PKG.name}\` (or re-pull) if new jobs seem missing.`;
|
|
46
46
|
return `crondex v${PKG.version} — ${CATALOG.count} jobs. ${freshness}`;
|
|
47
47
|
}
|
|
48
48
|
|
package/catalog.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"generated_by": "scripts/build-catalog.js",
|
|
3
3
|
"schema": "schema/job.schema.json",
|
|
4
|
-
"count":
|
|
4
|
+
"count": 13,
|
|
5
5
|
"jobs": [
|
|
6
6
|
{
|
|
7
7
|
"id": "backup-reminder",
|
|
@@ -27,6 +27,30 @@
|
|
|
27
27
|
],
|
|
28
28
|
"path": "jobs/devops/backup-reminder.yaml"
|
|
29
29
|
},
|
|
30
|
+
{
|
|
31
|
+
"id": "bill-due-reminder",
|
|
32
|
+
"version": 1,
|
|
33
|
+
"name": "Bill Due Reminder",
|
|
34
|
+
"description": "Warns you a few days before a recurring monthly bill is due. Use this if you've ever paid a late fee just because you forgot the date.",
|
|
35
|
+
"category": "personal",
|
|
36
|
+
"tags": [
|
|
37
|
+
"bills",
|
|
38
|
+
"finance",
|
|
39
|
+
"reminder"
|
|
40
|
+
],
|
|
41
|
+
"schedule": "0 9 * * *",
|
|
42
|
+
"timezone": "America/Los_Angeles",
|
|
43
|
+
"runner": "shell",
|
|
44
|
+
"modes": [
|
|
45
|
+
"script"
|
|
46
|
+
],
|
|
47
|
+
"compatible_agents": [
|
|
48
|
+
"generic",
|
|
49
|
+
"claude",
|
|
50
|
+
"codex"
|
|
51
|
+
],
|
|
52
|
+
"path": "jobs/personal/bill-due-reminder.yaml"
|
|
53
|
+
},
|
|
30
54
|
{
|
|
31
55
|
"id": "cost-alert",
|
|
32
56
|
"version": 1,
|
|
@@ -108,6 +132,30 @@
|
|
|
108
132
|
],
|
|
109
133
|
"path": "jobs/devops/dependency-audit.yaml"
|
|
110
134
|
},
|
|
135
|
+
{
|
|
136
|
+
"id": "habit-checkin",
|
|
137
|
+
"version": 1,
|
|
138
|
+
"name": "Daily Habit Check-in",
|
|
139
|
+
"description": "Reminds you to log a habit each day and reports your current streak. Use this if you're trying to build a habit and want a daily nudge plus a running streak count without a separate app.",
|
|
140
|
+
"category": "personal",
|
|
141
|
+
"tags": [
|
|
142
|
+
"habit",
|
|
143
|
+
"streak",
|
|
144
|
+
"reminder"
|
|
145
|
+
],
|
|
146
|
+
"schedule": "0 20 * * *",
|
|
147
|
+
"timezone": "America/Los_Angeles",
|
|
148
|
+
"runner": "shell",
|
|
149
|
+
"modes": [
|
|
150
|
+
"script"
|
|
151
|
+
],
|
|
152
|
+
"compatible_agents": [
|
|
153
|
+
"generic",
|
|
154
|
+
"claude",
|
|
155
|
+
"codex"
|
|
156
|
+
],
|
|
157
|
+
"path": "jobs/personal/habit-checkin.yaml"
|
|
158
|
+
},
|
|
111
159
|
{
|
|
112
160
|
"id": "inbox-triage",
|
|
113
161
|
"version": 1,
|
|
@@ -157,6 +205,33 @@
|
|
|
157
205
|
],
|
|
158
206
|
"path": "jobs/devops/log-cleanup.yaml"
|
|
159
207
|
},
|
|
208
|
+
{
|
|
209
|
+
"id": "meal-plan-reminder",
|
|
210
|
+
"version": 1,
|
|
211
|
+
"name": "Weekly Meal Plan Reminder",
|
|
212
|
+
"description": "Nudges you to plan the week's meals, and can draft a simple 7-day plan plus grocery list for you. Use this if you dread the \"what's for dinner\" question every night and want to decide once a week instead.",
|
|
213
|
+
"category": "personal",
|
|
214
|
+
"tags": [
|
|
215
|
+
"meals",
|
|
216
|
+
"planning",
|
|
217
|
+
"household"
|
|
218
|
+
],
|
|
219
|
+
"schedule": "0 9 * * 0",
|
|
220
|
+
"timezone": "America/Los_Angeles",
|
|
221
|
+
"runner": "hybrid",
|
|
222
|
+
"modes": [
|
|
223
|
+
"script",
|
|
224
|
+
"agent-prompt"
|
|
225
|
+
],
|
|
226
|
+
"compatible_agents": [
|
|
227
|
+
"claude",
|
|
228
|
+
"codex",
|
|
229
|
+
"hermes",
|
|
230
|
+
"openclaw",
|
|
231
|
+
"generic"
|
|
232
|
+
],
|
|
233
|
+
"path": "jobs/personal/meal-plan-reminder.yaml"
|
|
234
|
+
},
|
|
160
235
|
{
|
|
161
236
|
"id": "repo-health-check",
|
|
162
237
|
"version": 1,
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
id: bill-due-reminder
|
|
2
|
+
version: 1
|
|
3
|
+
name: Bill Due Reminder
|
|
4
|
+
description: >
|
|
5
|
+
Warns you a few days before a recurring monthly bill is due. Use this if
|
|
6
|
+
you've ever paid a late fee just because you forgot the date.
|
|
7
|
+
category: personal
|
|
8
|
+
tags: [bills, finance, reminder]
|
|
9
|
+
schedule: "0 9 * * *"
|
|
10
|
+
timezone: "America/Los_Angeles"
|
|
11
|
+
runner: shell
|
|
12
|
+
command: >
|
|
13
|
+
due={{due_day_of_month}}; warn={{warn_days}}; name="{{bill_name}}";
|
|
14
|
+
today=$(date +%-d);
|
|
15
|
+
days_left=$(( due - today ));
|
|
16
|
+
if [ "$days_left" -lt 0 ]; then days_left=$(( days_left + 30 )); fi
|
|
17
|
+
if [ "$days_left" -le "$warn" ]; then echo "REMINDER: $name due in $days_left day(s) (on day $due of the month)";
|
|
18
|
+
else echo "OK: $name due in $days_left day(s)"; fi
|
|
19
|
+
variables:
|
|
20
|
+
bill_name:
|
|
21
|
+
default: "Rent"
|
|
22
|
+
description: What the bill is, for the reminder text.
|
|
23
|
+
due_day_of_month:
|
|
24
|
+
default: 1
|
|
25
|
+
description: Day of the month (1-31) the bill is due.
|
|
26
|
+
warn_days:
|
|
27
|
+
default: 3
|
|
28
|
+
description: Start warning this many days before the due day.
|
|
29
|
+
compatible_agents: [generic, claude, codex]
|
|
30
|
+
notes: >
|
|
31
|
+
Zero-token, deterministic. Approximates month length as 30 days when
|
|
32
|
+
wrapping into next month — fine for a reminder, not for precise billing math.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
id: habit-checkin
|
|
2
|
+
version: 1
|
|
3
|
+
name: Daily Habit Check-in
|
|
4
|
+
description: >
|
|
5
|
+
Reminds you to log a habit each day and reports your current streak.
|
|
6
|
+
Use this if you're trying to build a habit and want a daily nudge plus
|
|
7
|
+
a running streak count without a separate app.
|
|
8
|
+
category: personal
|
|
9
|
+
tags: [habit, streak, reminder]
|
|
10
|
+
schedule: "0 20 * * *"
|
|
11
|
+
timezone: "America/Los_Angeles"
|
|
12
|
+
runner: shell
|
|
13
|
+
command: >
|
|
14
|
+
log={{log_path}}; name="{{habit_name}}";
|
|
15
|
+
touch "$log";
|
|
16
|
+
today=$(date +%F);
|
|
17
|
+
streak=0; d="$today";
|
|
18
|
+
while grep -qx "$d" "$log" 2>/dev/null; do
|
|
19
|
+
streak=$((streak+1));
|
|
20
|
+
d=$(date -j -v-1d -f %F "$d" +%F 2>/dev/null || date -d "$d -1 day" +%F);
|
|
21
|
+
done;
|
|
22
|
+
if grep -qx "$today" "$log"; then echo "$name: already logged today. Streak: $streak day(s).";
|
|
23
|
+
else echo "REMINDER: log $name today to keep your streak (currently $streak day(s))."; fi
|
|
24
|
+
variables:
|
|
25
|
+
habit_name:
|
|
26
|
+
default: "exercise"
|
|
27
|
+
description: What habit you're tracking, for the reminder text.
|
|
28
|
+
log_path:
|
|
29
|
+
default: "./habit-log.txt"
|
|
30
|
+
description: Plain text file with one YYYY-MM-DD line per day you completed the habit.
|
|
31
|
+
compatible_agents: [generic, claude, codex]
|
|
32
|
+
notes: >
|
|
33
|
+
Zero-token, deterministic. This job only reminds and reports the streak —
|
|
34
|
+
append today's date to log_path yourself (`date +%F >> log_path`) when
|
|
35
|
+
you actually complete the habit.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
id: meal-plan-reminder
|
|
2
|
+
version: 1
|
|
3
|
+
name: Weekly Meal Plan Reminder
|
|
4
|
+
description: >
|
|
5
|
+
Nudges you to plan the week's meals, and can draft a simple 7-day plan
|
|
6
|
+
plus grocery list for you. Use this if you dread the "what's for dinner"
|
|
7
|
+
question every night and want to decide once a week instead.
|
|
8
|
+
category: personal
|
|
9
|
+
tags: [meals, planning, household]
|
|
10
|
+
schedule: "0 9 * * 0"
|
|
11
|
+
timezone: "America/Los_Angeles"
|
|
12
|
+
runner: hybrid
|
|
13
|
+
command: >
|
|
14
|
+
echo "Reminder: plan meals for the week ({{household_size}} people, dietary preference: {{dietary_pref}})."
|
|
15
|
+
prompt: |
|
|
16
|
+
Draft a simple 7-day dinner plan for {{household_size}} people with
|
|
17
|
+
dietary preference: {{dietary_pref}}.
|
|
18
|
+
1. One line per day, easy/quick recipes, minimal specialty ingredients.
|
|
19
|
+
2. End with a consolidated grocery list grouped by store section.
|
|
20
|
+
script_note: >
|
|
21
|
+
`command` only prints a reminder to plan meals yourself, zero tokens.
|
|
22
|
+
`prompt` actually drafts the 7-day plan and grocery list for you.
|
|
23
|
+
variables:
|
|
24
|
+
household_size:
|
|
25
|
+
default: 1
|
|
26
|
+
description: Number of people to plan meals for.
|
|
27
|
+
dietary_pref:
|
|
28
|
+
default: "no restrictions"
|
|
29
|
+
description: Dietary preference or restriction to plan around.
|
|
30
|
+
compatible_agents: [claude, codex, hermes, openclaw, generic]
|
|
31
|
+
notes: Schedule defaults to Sunday morning; adjust to whenever you actually grocery shop.
|