How bahaaio/pomo works
Project type and purpose
• This is a command-line Pomodoro timer written in Go. It’s a single-binary Terminal UI tool that tracks work/break sessions, renders a live progress bar, responds to keyboard shortcuts, reads a YAML config, emits desktop notifications, and optionally runs user commands when a session ends.
File structure
• Top-level:
• cmd/ — three entry points (root.go, break.go, runner.go) implementing CLI commands via Cobra or a similar parser
• config/ — config loader and utilities for finding/parsing pomo.yaml
• ui/ — Bubble Tea-based view layer (keys.go, ui.go)
• pomo.go + pomo.yml — default values and full-example config
• CI/CD (.github/…, .goreleaser.yaml, build workflows)
• Patterns:
• CLI command dispatcher → core timer/runner → UI event loop → side-effects (notifications, hooks)
• Config lookup chain → loader → in-memory struct
README
• Confirms architecture: CLI commands map to work/break sessions, uses Bubble Tea for TUI, reads YAML in a defined search order, cross-platform notifications, supports custom shell commands.
Details
• Config lookup chain (current dir → system dir → defaults)
• That UI Renderer subscribes to Timer Engine events