Skip to content

Commands

The wordcount CLI reads the daily JSON files and controls the counter. On Linux it is installed to ~/.local/bin/wordcount; on Windows/macOS the shared CLI (ports/wordcount.py, shipped as wordcount.exe / wordcount in the binary install) covers the core subset noted below.

Command What it does
wordcount today Today’s words, keys, chars, backspaces, clicks, active time, WPM, goal %
wordcount week Last 7 days
wordcount month Last 30 days + totals and daily average
wordcount year Last 365 days totals
wordcount all All-time totals
wordcount info Days tracked, streak, best day, data size, all-time totals
wordcount export csv All days as CSV (stdout; pipe to a file). export json also works
wordcount report Generate a local HTML report (last 14 days + hourly chart) and print its path
wordcount goal 3000 Set daily word goal (goal 0 clears, goal alone shows config)
wordcount goal --heatmap on|off Enable/disable optional per-key heatmap counts
wordcount goal --mouse on|off Enable/disable mouse click counting
wordcount heatmap Show today’s top keys (only if heatmap is enabled)
wordcount json Today’s data as JSON (for scripts/widgets)
wordcount history-json Last 31 days as JSON array (for widget charts)
wordcount panel Short text: ⌨ 2,104 words (70%)
wordcount genmon XFCE genmon markup (<txt>, <tool>, <txt-click>)
wordcount pause Stop counting (passwords, private typing)
wordcount resume Start counting again
wordcount toggle Pause if running, resume if paused (panel click actions)
wordcount status Service status + today

Windows/macOS subset: the shared CLI covers today/week/month/json/history-json/panel/pause/resume/toggle:

Terminal window
& "$env:LOCALAPPDATA\keyount\wordcount.exe" today
# Python fallback install: python "$env:LOCALAPPDATA\keyount\wordcount.py" today
Terminal window
~/.local/bin/wordcount today
# Python fallback install: python3 ~/.local/bin/wordcount.py today
  • Widget polling modes (json, panel, genmon) are the fast path: a tiny bash read, 6–16 ms, no Python startup on Linux. Widgets poll at most every 30s.
  • history-json feeds the KDE popup’s 3/7/30-day charts; it runs on popup open/Refresh, never on a timer.
  • report writes a static HTML file (no server) and prints its path — open it in any browser.
  • Panel lag: the panel text polls every 30 seconds, so it can lag the true count by up to 30s; totals themselves are saved within 2s of typing.

Data layout and config: Data format.