Skip to main content
chrome-time-clock icon

chrome-time-clock

YOUR BROWSER ALREADY KEPT THE TIMESHEET
Infer workday start and end from Chrome, Chromium or Brave history, then plot or merge the hours.

PyPI version Python 3.9+ Chrome, Chromium, Brave macOS, Windows, Linux MIT license


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 machines

Everything runs locally against a copy of the browser's History SQLite file; nothing leaves the machine.

Extract

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

Plot

Dark-theme 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

Merge

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.csv

Each subcommand also has a standalone shortcut: chrome-workhours, plot-workhours, merge-blocks.

Python API

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")

Release files for chrome-time-clock 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chrome-time-clock 0.1.0
File Size Uploaded
chrome_time_clock-0.1.0.tar.gz 15.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chrome-time-clock 0.1.0
File Interpreter ABI Platform
chrome_time_clock-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.0 kB

Release files / chrome_time_clock-0.1.0.tar.gz

Download URL chrome_time_clock-0.1.0.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
792f7a157f864956f92c9a5aea590f6477164769a18e880cb63ee3fc2f91e0de
BLAKE2b-256 checksum
How to use checksums
70fc26a1d8264f2235d9251198edbfb7212b05bcdf74cbc25f42676739507ee9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / chrome_time_clock-0.1.0-py3-none-any.whl

Download URL chrome_time_clock-0.1.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
05baea4fe7c906f4a608e43ac508a2ea98f6aca2246979605d01dbb370e4f0e0
BLAKE2b-256 checksum
How to use checksums
7c18e6010a3f9f7c0bfc57d5b160cb941f9c07869752b7e1f2766a6ecf6eb709
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.2 {"installer":{"name":"uv","version":"0.12.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page