Back to plugins
pomodoro
Pomodoro Technique timer that reminds you to take breaks after 25 minutes of coding
Pomodoro
A lightweight Pomodoro Technique integration for ECA that reminds you to take breaks while coding.
What it provides
- pomodoro-start (
chatStarthook) — Silently records the session start timestamp when a chat begins. - pomodoro-check (
postRequesthook) — Checks elapsed time after each request and nudges you to take a break once 25 minutes have passed.
How it works
When a chat session starts, the current timestamp is saved to /tmp/eca-pomodoro-start. After every request, the plugin calculates how many minutes have elapsed since the timer started. If 25 or more minutes have passed, it displays a friendly reminder to take a 5-minute break and resets the timer automatically.
Customization
Fork this plugin and adjust the 25-minute interval in pomodoro-check.sh to match your preferred work/break cadence.
By the ECA team.
{
"pomodoro.start": {
"type": "chatStart",
"visible": false,
"actions": [
{
"type": "shell",
"shell": "date +%s > /tmp/eca-pomodoro-start"
}
]
},
"pomodoro.check": {
"type": "postRequest",
"visible": true,
"actions": [
{
"type": "shell",
"file": "pomodoro-check.sh"
}
]
}
}
#!/usr/bin/env bash
set -euo pipefail
TIMER_FILE="/tmp/eca-pomodoro-start"
if [ ! -f "$TIMER_FILE" ]; then
date +%s > "$TIMER_FILE"
exit 0
fi
start=$(cat "$TIMER_FILE")
now=$(date +%s)
elapsed=$(( (now - start) / 60 ))
if [ "$elapsed" -ge 25 ]; then
echo "🍅 You've been coding for ${elapsed} minutes! Consider a 5-minute break to recharge."
date +%s > "$TIMER_FILE"
fi
exit 0