A Cloudflare Worker + iOS Shortcut that checks if you shipped on GitHub today before bed. If you didn't, it sets an alarm to nudge you.
- Deploy the Worker using the button above.
- Download the Shortcut to your iPhone.
- Open the Shortcut and paste your Worker URL.
- Create a Sleep automation that runs the shortcut (see below).
- A Sleep automation triggers the shortcut each night when you wind down for bed.
- The shortcut calls your Cloudflare Worker.
- The Worker checks your GitHub contribution calendar.
- If you haven't shipped (
shipped: "no"), the shortcut creates aShip Checkalarm to nudge you.
GET /check?username=YOUR_GITHUB_USERNAME&tz=YOUR_TIMEZONE
Example:
https://your-worker.workers.dev/check?username=octocat&tz=Asia/Kolkata
Optional parameters:
date=YYYY-MM-DD: checks a specific date instead of calculating today.tz=Area/City: timezone used whendateis omitted.
Response fields:
shipped:"yes"or"no"; this is the field the iOS Shortcut should use.contributedToday: boolean version of the same result.contributionCount: contribution count when available.method:"graphql"whenGITHUB_TOKENis configured, otherwise"scrape".
Set optional defaults in wrangler.toml:
[vars]
DEFAULT_TIMEZONE = "Asia/Kolkata"
DEFAULT_GITHUB_USERNAME = "your-github-username"Without a token, the Worker only sees public contributions. To include private ones, add a GitHub personal access token as a Cloudflare Worker secret:
npx wrangler secret put GITHUB_TOKENDownload the pre-built Shortcut from iCloud — no need to build it manually.
After downloading, open the shortcut and replace the URL in the first action with your own Worker endpoint:
https://your-worker.workers.dev/check?username=YOUR_GITHUB_USERNAME&tz=YOUR_TIMEZONE
The shortcut already contains all the logic: it calls your Worker, checks the shipped field, and if it's no, creates a Ship Check alarm.
- Calls your Worker URL.
- Extracts
shippedfrom the JSON response. - If
shippedisno:- Adds 1 minute to current time.
- Creates an alarm named
Ship Checkat that time. - Plays a sound and shows a notification.
- If
shippedisyes:- Shows a "Streak safe" notification.
Create a Personal Automation in the Shortcuts app:
- Trigger: Sleep → Wind Down Begins (or Bedtime Begins).
- Action: Run Immediately → select
ShipIt Checker.
That's it. The shortcut runs each night when you start winding down for bed. If you haven't shipped, it sets a nudge alarm.
Why Sleep instead of Time of Day? Sleep trigger ties to your actual bedtime routine. If you stay up late, the check still runs before you sleep rather than at a fixed clock time.
- GitHub contributions can take a few minutes to appear after pushing.
- The alarm label must be exactly
Ship Check. - If your day boundary matters, pass
tz=Your/Timezoneor have the Shortcut passdate=yyyy-MM-dd. - iOS does not allow distributing Personal Automations as downloadable Shortcuts — users must create the Sleep automation themselves.
- This is a fun accountability tool, not a security system. Sleep well.