YOUR BROWSER ALREADY KEPT THE TIMESHEET
Infer workday start and end from Chrome, Chromium or Brave history, then plot or merge the hours.
uv tool install chrome-time-clock # or: pipx install chrome-time-clock
chrome-time-clock extract --out ./export --markdown # history → daily_summary.csv (+ .md)
chrome-time-clock plot ./export/daily_summary.csv # timeline + histograms, .png and .pdf
chrome-time-clock merge laptop.csv desktop.csv # union of blocks across machinesEverything runs locally against a copy of the browser's History SQLite file; nothing leaves the machine.
Groups history visits into active blocks, split wherever the gap exceeds --gap-minutes, and reports each day's first and last block.
| Option | Default | |
|---|---|---|
--browser |
chrome |
chrome, chromium or brave |
--profile |
Default |
e.g. Profile 1 |
--history-db |
— | a History file directly; overrides browser/profile |
--from / --to |
— | YYYY-MM-DD, inclusive |
--timezone |
Europe/Amsterdam |
IANA name |
--gap-minutes |
60 |
inactivity that ends a block |
--out |
./chrome_workhours_export |
CSV output directory |
--markdown |
off | also write daily_summary.md |
Timeline and start/end histograms from daily_summary.csv.
| Option | Default | |
|---|---|---|
--from / --to |
2026-02-22 / — |
YYYY-MM-DD, inclusive |
--bins |
15 |
histogram bins |
--out |
workhours_plot |
file stem; .png and .pdf appended |
--show |
off | open an interactive window |
Combines several blocks.csv files — one per machine or profile — collapsing overlapping intervals:
chrome-time-clock merge a.csv b.csv --out-blocks merged_blocks.csv --out-daily merged_daily.csvEach subcommand also has a standalone shortcut: chrome-workhours, plot-workhours, merge-blocks.
from datetime import date
from chrome_time_clock import extract_workhours, plot_workhours, merge_blocks
daily, blocks, warnings = extract_workhours(browser="chrome", profile="Default",
date_from=date(2026, 6, 1), timezone_str="Europe/Amsterdam")
plot_workhours(csv_path="./export/daily_summary.csv", date_from=date(2026, 6, 1), out_stem="plot")
merge_blocks(files=["a.csv", "b.csv"], out_blocks="merged_blocks.csv", out_daily="merged_daily.csv")