Skip to content

Pomodoro / focus-mode from the terminal

Solo development with AI is often an 8-hour marathon of solitude. Pomodoro fits into three lines. We use the same Notifly channel — sounds and vibration are already configured.

/usr/local/bin/pomo
#!/usr/bin/env bash
set -a; source ~/.notifly.env; set +a
WORK=${1:-25}
BREAK=${2:-5}
while true; do
curl -fsS "$NOTIFLY_URL/message?token=$NOTIFLY_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"title\":\"🍅 Работа $WORK мин\",\"message\":\"Поехали\",\"priority\":3}" >/dev/null
sleep $((WORK*60))
curl -fsS "$NOTIFLY_URL/message?token=$NOTIFLY_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"title\":\"☕ Перерыв $BREAK мин\",\"message\":\"Встань и попей воды\",\"priority\":7}" >/dev/null
sleep $((BREAK*60))
done

Run: pomo 25 5 — the classic Pomodoro.

Want more? Connect it with agent-done: if the agent finished a task during this pomodoro — the “break” push will include a diff/summary of its work.