I built a sleep tool. I never measured my own sleep.


Also available in German: Ich habe ein Schlaf-Tool gebaut. Meinen eigenen Schlaf habe ich nie gemessen.

Earlier this year I built Kompass, a small sleep-hygiene tool. Six questions, no sensors. I believe in it. And until this week, I had no data about my own sleep. None. I was the cobbler with the worst shoes.

This week I fixed that. The setup is deliberately boring:

My Garmin watch tracks sleep. Garmin Connect writes it into Apple Health. A small iOS app called Health Auto Export posts each night as JSON to a tiny Cloudflare Worker I wrote — maybe 150 lines. The worker is a mailbox, not a database: it holds nights for at most 14 days, then they self-destruct. A script on my Mac pulls them down, appends them to a plain JSONL file, and tells the mailbox to forget.

That last part was the point. My sleep data lives in a text file on my machine, not in someone’s dashboard. The cloud only ever sees a rolling two-week window, encrypted in transit, token-gated. I can read the whole pipeline in one sitting. When something breaks, I can see exactly where.

Could I have just opened the Garmin app every morning? Sure. But data you have to go look at is data you stop looking at. Data that lands in your own system can be questioned, scripted, summarized — it becomes infrastructure instead of a feature I rent.

Then the first report rendered, and the fun stopped being theoretical:

Three nights. An average of 5.5 hours. Bedtime wandering across a three-and-a-half-hour range.

I knew my sleep was inconsistent. Knowing and seeing a number are different things — that’s the entire reason to measure. A guess is negotiable. A number isn’t.

So that’s the experiment now: wear the watch every night, let the pipeline do its thing, and watch two numbers — average duration and bedtime consistency. Not chasing a perfect score. Just trying to make the graph boring.

I’ll report back when there’s a real curve to look at.