Pom
command line pomodoro timer with vim keybindings, scriptable hooks, a web API, tmux support, json logging and moreπβ
Install / Use
/learn @bmedicke/PomREADME
pom
pom is a command line pomodoro timer with vim keybindings, scriptable hooks, a web API, tmux support and json logging.

installation
go install github.com/bmedicke/pom@latest
usage
pom
- keyboard shortcuts are loosely based on Vim
hjklgGmove arounda/A/Enterappend to cellccchange celldd/dcdelete cell contentEscclear a key chord;next break/pomodoroqquit the programQquit the program (don't save incomplete pomodoros)
- while editing a cell readline keybindings are available
ctrl-ajump to beginningctrl-ejump to endctrl-kdelete to the right of cursor- etc.
flags
-hshow the help--profile <subdir>select non-default hook profile--create-configcreate config files, see next section--longbreak-in <uint>overwrite number of pomodoros required for the first long break
configuration
Create the config folder, config file and default hooks at ~/.config/pom/:
pom --create-config
hooks
- edit the scripts in
~/.config/pom/hooks/default - the scripts are named after when they are called:
work_startwork_donebreak_startbreak_donelongbreak_startlongbreak_donepomodoro_cancelled
- the interpreter (
sh,zsh,python3, etc.) of the script is set via the shebang
Here are a couple of usage scenarios for hooks:
- start/stop your music (e.g. via
ncmpcpp/mpc) - toggle a light (e.g. via Home Assistant's
hass) - send a notification (via
prowl's REST API, etc.) - set a Home Assistant
input_booleanfor further scripting
hook profiles
- the
defaulthooks profile is used when no other is specified - you can create custom hook profiles
- e.g. a profile that toggles a light when pomodoros/breaks end:
- create a folder
~/.config/pom/hooks/light - add a
work_doneand abreak_donescript to it - add your shell commands to toggle the light
- start pom with your profile:
- create a folder
pom --profile light
show status in tmux
- if
writeTmuxFilein~/.config/pom/config.jsonis set totrue:- pom keeps a file at
~/.config/pom/tmuxthat always shows the current status - when pom exits this file is emptied
- pom keeps a file at
You can cat this file into your tmux statusline:
.tmux.conf
set -g status-right "[#(cat ~/.config/pom/tmux)]"
JSON logging
- if
logJSONin~/.config/pom/config.jsonis set totrue:- pom logs all complete and incomplete pomodoros to:
~/.config/pom/log.json
- pom logs all complete and incomplete pomodoros to:
~/.config/pom/log.json
[
{
"Project": "master thesis",
"Task": "research",
"Note": "mode locking",
"State": "work_done",
"Duration": 60000000000,
"StartTime": "2022-05-03T13:07:40.091129279+02:00",
"StopTime": "2022-05-03T13:08:40.285970461+02:00"
},
...
Web API
- disabled by default, edit
~/.config/pom/config.json'senableAPIto activate this feature - the API is still quite rudimentary
- there are two endpoints that respond with JSON
- POST/GET
/continue: starts the next state (same as pressing;) - GET
/state: returns json object that shows if a break or pom is in progress - GET
/ws: upgrades connection to a websocket and streams infos about the current pomodoro twice a second - GET
/live: open in browser to have a tab with the current timestamp in the title- you can edit this script at:
~/.config/pom/static
- you can edit this script at:
- POST/GET

websocat ws://localhost:8421/ws | jq
{
"Project": "pom",
"Task": "hide server from table if disabled",
"Note": "go lang",
"Duration": 1500000000000,
"StartTime": "2022-05-07T14:23:36.755337148+02:00",
"State": "work",
"StopTime": "0001-01-01T00:00:00Z"
}
...
curl localhost:8421/continue # or call it from a bookmark, your phone, etc.
home-assistant example
- here's an example for a minimalist home-assistant REST switch
configuration.yml
switch:
- platform: rest
name: pom
resource: http://localhost:8421/continue
state_resource: http://localhost:8421/state
is_on_template: '{{ value_json.active }}'

Related Skills
canvas
345.9kCanvas Skill Display HTML content on connected OpenClaw nodes (Mac app, iOS, Android). Overview The canvas tool lets you present web content on any connected node's canvas view. Great for: -
xurl
345.9kA CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.
openhue
345.9kControl Philips Hue lights and scenes via the OpenHue CLI.
sag
345.9kElevenLabs text-to-speech with mac-style say UX.
