@wonsukchoi/crondex 0.7.0 → 0.9.0

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 (54) hide show
  1. package/README.md +58 -128
  2. package/bin/crondex.js +44 -0
  3. package/catalog.json +1298 -14
  4. package/jobs/agriculture/equipment-maintenance-due-reminder.yaml +36 -0
  5. package/jobs/agriculture/irrigation-schedule-check.yaml +41 -0
  6. package/jobs/agriculture/weather-frost-alert.yaml +41 -0
  7. package/jobs/construction/change-order-approval-reminder.yaml +31 -0
  8. package/jobs/creator/crosspost-lag-check.yaml +35 -0
  9. package/jobs/crypto/gas-price-alert.yaml +34 -0
  10. package/jobs/crypto/smart-contract-upgrade-watch.yaml +49 -0
  11. package/jobs/crypto/wallet-balance-watch.yaml +37 -0
  12. package/jobs/devops/github-issue-triage.yaml +38 -0
  13. package/jobs/ecommerce/abandoned-cart-recovery-check.yaml +38 -0
  14. package/jobs/ecommerce/low-stock-reorder-alert.yaml +33 -0
  15. package/jobs/ecommerce/return-refund-backlog-check.yaml +29 -0
  16. package/jobs/education/report-card-deadline-reminder.yaml +27 -0
  17. package/jobs/events/event-budget-overrun-check.yaml +31 -0
  18. package/jobs/finance/subscription-price-hike-watch.yaml +44 -0
  19. package/jobs/fleet/vehicle-registration-expiry-check.yaml +31 -0
  20. package/jobs/gaming/game-patch-notes-watch.yaml +39 -0
  21. package/jobs/gaming/stream-schedule-reminder.yaml +30 -0
  22. package/jobs/gaming/subscriber-churn-watch.yaml +39 -0
  23. package/jobs/healthcare/appointment-no-show-follow-up.yaml +32 -0
  24. package/jobs/healthcare/license-credential-expiry-check.yaml +35 -0
  25. package/jobs/healthcare/patient-recall-reminder.yaml +34 -0
  26. package/jobs/hiring/offer-expiry-reminder.yaml +31 -0
  27. package/jobs/hospitality/health-inspection-due-reminder.yaml +32 -0
  28. package/jobs/hr/benefits-enrollment-deadline-reminder.yaml +34 -0
  29. package/jobs/hr/new-hire-paperwork-check.yaml +35 -0
  30. package/jobs/hr/payroll-run-reminder.yaml +30 -0
  31. package/jobs/insurance/claim-status-check.yaml +30 -0
  32. package/jobs/insurance/coverage-gap-audit.yaml +37 -0
  33. package/jobs/insurance/policy-renewal-reminder.yaml +35 -0
  34. package/jobs/inventory/expiring-perishable-stock-check.yaml +24 -0
  35. package/jobs/investing/dividend-payment-tracker.yaml +34 -0
  36. package/jobs/legal/nda-expiry-check.yaml +31 -0
  37. package/jobs/logistics/freight-rate-spike-watch.yaml +38 -0
  38. package/jobs/manufacturing/preventive-maintenance-due-check.yaml +31 -0
  39. package/jobs/marketing/competitor-page-diff-watch.yaml +48 -0
  40. package/jobs/marketing/seo-rank-drop-watch.yaml +38 -0
  41. package/jobs/nonprofit/volunteer-hours-shortfall-check.yaml +30 -0
  42. package/jobs/personal/end-of-day-wrap-message.yaml +32 -0
  43. package/jobs/personal/new-restaurant-roundup.yaml +35 -0
  44. package/jobs/podcast/guest-followup-reminder.yaml +31 -0
  45. package/jobs/productivity/morning-briefing-digest.yaml +42 -0
  46. package/jobs/productivity/recurring-task-queue-reset.yaml +37 -0
  47. package/jobs/realestate/rent-payment-late-check.yaml +23 -0
  48. package/jobs/restaurant/health-inspection-prep-reminder.yaml +29 -0
  49. package/jobs/restaurant/inventory-waste-log-review.yaml +32 -0
  50. package/jobs/restaurant/reservation-noshow-deposit-check.yaml +32 -0
  51. package/jobs/sales/newly-funded-leads-scout.yaml +44 -0
  52. package/jobs/sales/quota-attainment-check.yaml +33 -0
  53. package/jobs/support/sla-breach-warning.yaml +31 -0
  54. package/package.json +1 -1
package/README.md CHANGED
@@ -25,9 +25,11 @@ blocked by npm's anti-typosquat check). The command itself is still
25
25
  ```bash
26
26
  npx @wonsukchoi/crondex list # browse everything
27
27
  npx @wonsukchoi/crondex list --category devops # filter by category or --tag
28
+ npx @wonsukchoi/crondex categories # list categories with job counts
28
29
  npx @wonsukchoi/crondex show backup-reminder # print one job's YAML
29
30
  npx @wonsukchoi/crondex add backup-reminder --dest ./cron/backup-reminder.yaml
30
31
  npx @wonsukchoi/crondex recommend "warn me before my SSL cert expires"
32
+ npx @wonsukchoi/crondex init ssl-cert-expiry-check --category security
31
33
  ```
32
34
 
33
35
  `recommend` takes a free-text description of what you want and ranks the
@@ -37,6 +39,10 @@ got asked "can you set up something for X" and needs to check whether a
37
39
  ready-made job already covers it before writing one from scratch. Add
38
40
  `--limit <n>` to control how many results come back (default 5).
39
41
 
42
+ `init` scaffolds a new job file from `templates/job.template.yaml` into your
43
+ own project (default `./<id>.yaml`) — for writing a job that isn't in the
44
+ catalog yet, whether or not you plan to contribute it back.
45
+
40
46
  Or install once and drop the scope prefix on every call:
41
47
 
42
48
  ```bash
@@ -60,142 +66,66 @@ node bin/crondex.js list
60
66
 
61
67
  ```
62
68
  crondex/
63
- ├── bin/crondex.js CLI: list / show / add / recommend
69
+ ├── bin/crondex.js CLI: list / categories / show / add / recommend / init
64
70
  ├── catalog.json generated index of every job — read this first
65
71
  ├── schema/job.schema.json spec every job file follows
66
- ├── jobs/
67
- │ ├── devops/
68
- │ ├── productivity/
69
- │ ├── personal/
70
- │ ├── content/
71
- │ ├── finance/
72
- │ ├── security/
73
- │ ├── learning/
74
- │ ├── team/
75
- │ ├── home/
76
- │ ├── travel/
77
- │ └── growth/
72
+ ├── jobs/ one YAML per job, grouped by category subdirectory
78
73
  └── scripts/
79
- ├── build-catalog.js regenerates catalog.json from jobs/**/*.yaml
74
+ ├── build-catalog.js regenerates catalog.json + the summary below from jobs/**/*.yaml
80
75
  └── validate-jobs.js validates every job against the schema
81
76
  ```
82
77
 
83
78
  ## Available jobs
84
79
 
85
- 56 jobs across 11 categories. Full details (description, tags, variables)
86
- live in `catalog.json` and each job's YAML file — run `crondex list` or
87
- browse `jobs/<category>/` for the plain-language rundown of each.
88
-
89
- **devops**
90
-
91
- | id | schedule | modes |
92
- |---|---|---|
93
- | `dependency-audit` | `0 8 * * 1` | script + agent-prompt |
94
- | `log-cleanup` | `30 3 * * *` | script |
95
- | `repo-health-check` | `0 9 * * 1-5` | script + agent-prompt |
96
- | `backup-reminder` | `0 9 * * *` | script |
97
- | `ssl-cert-expiry-check` | `0 6 * * *` | script |
98
- | `uptime-ping-check` | `*/15 * * * *` | script |
99
- | `cost-alert` | `0 7 * * *` | script + agent-prompt |
100
- | `disk-space-check` | `0 */6 * * *` | script |
101
- | `docker-image-prune` | `0 4 * * *` | script |
102
- | `env-drift-check` | `0 8 * * *` | script |
103
- | `stale-dependency-pr-nudge` | `0 9 * * 1-5` | script |
104
- | `db-backup-verify` | `0 5 * * *` | script |
105
- | `license-compliance-check` | `0 8 * * 1` | script |
106
- | `orphaned-branch-cleanup` | `0 9 * * 1` | script |
107
- | `dns-record-check` | `0 */6 * * *` | script |
108
- | `queue-depth-check` | `*/10 * * * *` | script |
109
- | `api-rate-limit-check` | `*/15 * * * *` | script |
110
-
111
- **productivity**
112
-
113
- | id | schedule | modes |
114
- |---|---|---|
115
- | `daily-standup-summary` | `0 8 * * 1-5` | script + agent-prompt |
116
- | `inbox-triage` | `0 7,13 * * 1-5` | agent-prompt only |
117
- | `weekly-report` | `0 16 * * 5` | script + agent-prompt |
118
- | `focus-block-reminder` | `0 9,14 * * 1-5` | script |
119
-
120
- **personal**
121
-
122
- | id | schedule | modes |
123
- |---|---|---|
124
- | `bill-due-reminder` | `0 9 * * *` | script |
125
- | `habit-checkin` | `0 20 * * *` | script |
126
- | `meal-plan-reminder` | `0 9 * * 0` | script + agent-prompt |
127
- | `water-intake-reminder` | `0 9,12,15,18 * * *` | script |
128
- | `screen-time-check` | `0 20 * * *` | agent-prompt only |
129
-
130
- **content**
131
-
132
- | id | schedule | modes |
133
- |---|---|---|
134
- | `changelog-digest` | `0 10 * * 5` | script + agent-prompt |
135
- | `broken-link-check` | `0 7 * * 1` | script |
136
- | `social-mentions-watch` | `0 9 * * *` | agent-prompt only |
137
- | `seo-meta-check` | `0 7 * * 1` | script |
138
- | `rss-feed-validate` | `0 8 * * *` | script |
139
- | `robots-txt-check` | `0 8 * * *` | script |
140
-
141
- **finance**
142
-
143
- | id | schedule | modes |
144
- |---|---|---|
145
- | `subscription-audit` | `0 9 1 * *` | script |
146
- | `net-worth-snapshot` | `0 9 1 * *` | script |
147
- | `saas-seat-audit` | `0 9 1 * *` | script |
148
- | `invoice-overdue-check` | `0 9 * * *` | script |
149
- | `tax-deadline-reminder` | `0 9 * * *` | script |
150
-
151
- **security**
152
-
153
- | id | schedule | modes |
154
- |---|---|---|
155
- | `secrets-scan` | `0 3 * * *` | script |
156
- | `open-port-check` | `0 */4 * * *` | script |
157
- | `failed-login-watch` | `*/15 * * * *` | script |
158
- | `sudo-usage-audit` | `0 * * * *` | script |
159
- | `firewall-rule-diff` | `0 6 * * *` | script |
160
- | `certificate-transparency-watch` | `0 */12 * * *` | script |
161
-
162
- **learning**
163
-
164
- | id | schedule | modes |
165
- |---|---|---|
166
- | `daily-flashcard-review` | `0 8 * * *` | script |
167
- | `reading-list-nudge` | `0 9 * * 6` | script |
168
- | `course-progress-checkin` | `0 9 * * 1` | script |
169
-
170
- **team**
171
-
172
- | id | schedule | modes |
173
- |---|---|---|
174
- | `1on1-prep-reminder` | `0 9 * * 3` | script |
175
- | `pto-balance-check` | `0 9 1 * *` | script |
176
-
177
- **home**
178
-
179
- | id | schedule | modes |
180
- |---|---|---|
181
- | `hvac-filter-reminder` | `0 9 1 * *` | script |
182
- | `smoke-detector-battery-check` | `0 9 1 * *` | script |
183
- | `plant-watering-reminder` | `0 9 * * *` | script |
184
-
185
- **travel**
186
-
187
- | id | schedule | modes |
188
- |---|---|---|
189
- | `passport-expiry-check` | `0 9 1 * *` | script |
190
- | `visa-expiry-check` | `0 9 1 * *` | script |
191
- | `flight-checkin-reminder` | `0 * * * *` | script |
192
-
193
- **growth**
194
-
195
- | id | schedule | modes |
196
- |---|---|---|
197
- | `review-request-nudge` | `0 9 * * *` | script |
198
- | `cart-abandonment-followup` | `0 10 * * *` | script + agent-prompt |
80
+ Full details (description, tags, variables) live in `catalog.json` and each
81
+ job's YAML file — run `crondex list`, `crondex recommend "<what you want>"`,
82
+ or browse `jobs/<category>/` for the plain-language rundown of each. The
83
+ counts below are regenerated by `npm run build-catalog`, so they never drift
84
+ from what's actually in `jobs/`.
85
+
86
+ <!-- BEGIN JOB SUMMARY -->
87
+ 182 jobs across 37 categories:
88
+
89
+ | category | jobs |
90
+ |---|---|
91
+ | `agriculture` | 3 |
92
+ | `construction` | 3 |
93
+ | `content` | 12 |
94
+ | `creator` | 3 |
95
+ | `crypto` | 3 |
96
+ | `devops` | 26 |
97
+ | `ecommerce` | 3 |
98
+ | `education` | 3 |
99
+ | `events` | 3 |
100
+ | `finance` | 10 |
101
+ | `fleet` | 3 |
102
+ | `gaming` | 3 |
103
+ | `growth` | 4 |
104
+ | `healthcare` | 3 |
105
+ | `hiring` | 3 |
106
+ | `home` | 5 |
107
+ | `hospitality` | 3 |
108
+ | `hr` | 3 |
109
+ | `insurance` | 3 |
110
+ | `inventory` | 3 |
111
+ | `investing` | 3 |
112
+ | `learning` | 5 |
113
+ | `legal` | 3 |
114
+ | `logistics` | 3 |
115
+ | `manufacturing` | 3 |
116
+ | `marketing` | 4 |
117
+ | `nonprofit` | 3 |
118
+ | `personal` | 8 |
119
+ | `podcast` | 3 |
120
+ | `productivity` | 9 |
121
+ | `realestate` | 3 |
122
+ | `restaurant` | 3 |
123
+ | `sales` | 4 |
124
+ | `security` | 14 |
125
+ | `support` | 3 |
126
+ | `team` | 4 |
127
+ | `travel` | 5 |
128
+ <!-- END JOB SUMMARY -->
199
129
 
200
130
  ## How a job works
201
131
 
package/bin/crondex.js CHANGED
@@ -28,15 +28,19 @@ function printHelp() {
28
28
 
29
29
  Usage:
30
30
  crondex list [--category <name>] [--tag <name>]
31
+ crondex categories
31
32
  crondex show <id>
32
33
  crondex add <id> [--dest <path>]
33
34
  crondex recommend "<what you want done>" [--limit <n>]
35
+ crondex init <id> [--category <name>] [--dest <path>]
34
36
 
35
37
  Examples:
36
38
  crondex list --category devops
39
+ crondex categories
37
40
  crondex show dependency-audit
38
41
  crondex add backup-reminder --dest ./cron/backup-reminder.yaml
39
42
  crondex recommend "warn me before my SSL cert expires"
43
+ crondex init ssl-cert-expiry-check --category security
40
44
  `);
41
45
  }
42
46
 
@@ -147,6 +151,36 @@ function show(id) {
147
151
  console.log(readFileSync(join(ROOT, findJob(id).path), "utf8"));
148
152
  }
149
153
 
154
+ function categories() {
155
+ const counts = {};
156
+ for (const j of CATALOG.jobs) counts[j.category] = (counts[j.category] ?? 0) + 1;
157
+ console.log(catalogInfoLine());
158
+ console.log();
159
+ for (const [cat, n] of Object.entries(counts).sort(([a], [b]) => a.localeCompare(b))) {
160
+ console.log(`${cat} (${n})`);
161
+ }
162
+ }
163
+
164
+ const ID_RE = /^[a-z0-9]+(-[a-z0-9]+)*$/;
165
+
166
+ function init(id) {
167
+ if (!ID_RE.test(id)) {
168
+ console.error(`"${id}" isn't a valid job id — use lowercase letters, digits, and hyphens (e.g. ssl-cert-expiry-check).`);
169
+ process.exit(1);
170
+ }
171
+ const category = flag("category") ?? "productivity";
172
+ const dest = flag("dest") ?? `./${id}.yaml`;
173
+ if (existsSync(dest)) {
174
+ console.error(`${dest} already exists — refusing to overwrite. Pass --dest to choose another path.`);
175
+ process.exit(1);
176
+ }
177
+ const template = readFileSync(join(ROOT, "templates/job.template.yaml"), "utf8")
178
+ .replace("id: your-job-id", `id: ${id}`)
179
+ .replace("category: devops", `category: ${category}`);
180
+ writeFileSync(dest, template);
181
+ console.log(`wrote ${dest} — fill in the fields, then \`npm run validate\` (see CONTRIBUTING.md to submit it upstream).`);
182
+ }
183
+
150
184
  function add(id) {
151
185
  const meta = findJob(id);
152
186
  const dest = flag("dest") ?? `./${id}.yaml`;
@@ -162,6 +196,16 @@ switch (cmd) {
162
196
  case "list":
163
197
  list();
164
198
  break;
199
+ case "categories":
200
+ categories();
201
+ break;
202
+ case "init":
203
+ if (!args[0]) {
204
+ console.error("usage: crondex init <id> [--category <name>] [--dest <path>]");
205
+ process.exit(1);
206
+ }
207
+ init(args[0]);
208
+ break;
165
209
  case "show":
166
210
  if (!args[0]) {
167
211
  console.error("usage: crondex show <id>");