Skip to main content

Aggregate local work activity from Gemini, Claude, Cursor, OpenAI Codex IDE, Chrome, Mail, worklog, optional GitHub public activity, and optional Screen Time.

Project description

Gittan logo

Gittan

Timelog Extract

Local time reports from how you actually work.

Aggregate IDE, browser, mail, and worklog signals—plus optional GitHub activity—into project hours and optional invoice PDFs.
Core reporting is local-first; there is no built-in cloud upload path.

Python 3.9+ License: GPL-3.0 PyPI package


Install

Requirements: Python 3.9+. You do not need a PyPI account to install—only maintainers need PyPI access to publish.
If the shell says command not found: pip, use python3 -m pip instead of a bare pip command (common on macOS).

Recommended: pipx (macOS / Linux — keeps gittan on your PATH)

pip install --user puts scripts under ~/Library/Python/…/bin (macOS), which is often not on PATH, so gittan can look “missing” until you edit shell config. pipx installs CLI tools into ~/.local/bin and is easier to get right:

brew install pipx
pipx ensurepath

Important: open a new terminal tab, or run source ~/.zshrc, so PATH picks up pipx ensurepath. Then:

pipx install timelog-extract
gittan -V

Alternative: pip install --user (PyPI)

python3 -m pip install --user timelog-extract

Add the user script directory to PATH (macOS example — version may differ):

export PATH="$HOME/Library/Python/3.9/bin:$PATH"

Put that line in ~/.zshrc (or run gittan doctor — it will hint if it detects this issue).

Until PyPI has the package for your environment, use from source below.


More install options

Virtual environment

python3 -m venv .venv && source .venv/bin/activate   # Windows: .venv\Scripts\activate
pip install timelog-extract

From source

git clone https://github.com/mbjorke/timelog-extract.git
cd timelog-extract
python3 -m pip install -e .

Verify:

gittan --help
gittan -V

Publishing checklist: docs/VERSIONING.md.


Get started

  1. Health check — from a git repo that should have (or will have) a worklog:
    gittan doctor
    
    gittan doctor ends with the most useful next command to run for your current setup.
  2. First-time setup — wizard for environment, optional global TIMELOG.md hooks, and timelog_projects.json:
    gittan setup --dry-run    # preview
    gittan setup              # interactive
    
    gittan setup now closes with copyable next steps so the first real report is obvious.
  3. First report — today’s activity:
    gittan report --today --source-summary
    

TIMELOG.md in the repository root (where you run the command) is the default worklog unless you pass --worklog or set a path in config. See Timelog vs config below.


Everyday commands

Goal Command
Full report (prompts for range if you omit dates) gittan report
Today / last week / custom range gittan report --today · --last-week · --from 2026-04-01 --to 2026-04-30
Guided cleanup of uncategorized activity gittan review --today --uncategorized
Quick hours overview gittan status --today
Source mix / empty collectors gittan sources (and docs/SOURCES_AND_FLAGS.md)
Edit projects JSON gittan projects
Machine-wide commit → TIMELOG.md hooks gittan setup-global-timelog

JSON or HTML export (quiet, script-friendly):

gittan report --today --format json
gittan report --from 2026-04-01 --to 2026-04-30 --format json --json-file out/truth.json --report-html out/report.html

Optional GitHub activity: set GITHUB_USER or --github-user; optional GITHUB_TOKEN for rate limits. Details: docs/SOURCES_AND_FLAGS.md.


What else is in the repo

  • Cursor extension (companion, beta) — cursor-extension/README.md.
  • Engine script (same API as the extension): python3 scripts/run_engine_report.py --today --pdf.

Timelog vs config

  • TIMELOG.md — human-readable work journal; safe to treat as a diary.
  • timelog_projects.json — machine config; back it up (e.g. under ~/.gittan/). Setup creates timestamped backups before replacing invalid JSON.

Troubleshooting

Issue Where to look
command not found: gittan after install Install via pipx (above), or add ~/Library/Python/…/bin and ~/.local/bin to PATH; run gittan doctor for copy-paste hints.
“0 events” / sources empty docs/SOURCES_AND_FLAGS.md
Missing deps / editable install python3 -m pip install -e . from clone
Invalid project config gittan setup; backups named timelog_projects.backup-*.json
Paths / permissions --worklog, browser DBs, Mail / Screen Time access
Global timelog automation gittan setup-global-timelog, docs/archive/global-timelog-automation-legacy.md

Feedback

Questions, install friction, or “does this match your workflow?” — use GitHub Discussions (e.g. General or Q&A). For bugs or small reproducible issues, open an issue instead.


Documentation map

Vision, privacy, CLI flags, style, and release checklists live under docs/. Start with docs/VISION_DOCUMENTS.md for an index (e.g. SOURCES_AND_FLAGS.md, PRIVACY_SECURITY.md, TERMINAL_STYLE_GUIDE.md, CLI_FIRST_V1_RELEASE_CHECKLIST.md).


Contributing · tests · license

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timelog_extract-0.2.8.tar.gz (140.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timelog_extract-0.2.8-py3-none-any.whl (125.3 kB view details)

Uploaded Python 3

File details

Details for the file timelog_extract-0.2.8.tar.gz.

File metadata

  • Download URL: timelog_extract-0.2.8.tar.gz
  • Upload date:
  • Size: 140.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for timelog_extract-0.2.8.tar.gz
Algorithm Hash digest
SHA256 648a36fbcff5d3be79cb26beabfe2f6000a9e284b6aec0fd61889ce858e79074
MD5 802bb09a510f97ad657f6b381f842f51
BLAKE2b-256 8d0f4bd288e464bd5acb99892f5a6149852eea4242dc3515d5020823900d7350

See more details on using hashes here.

Provenance

The following attestation bundles were made for timelog_extract-0.2.8.tar.gz:

Publisher: pypi.yml on mbjorke/timelog-extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file timelog_extract-0.2.8-py3-none-any.whl.

File metadata

  • Download URL: timelog_extract-0.2.8-py3-none-any.whl
  • Upload date:
  • Size: 125.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for timelog_extract-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 d23bd91ec21ef745faf19b37ddabf305df78d80ae7dbd3278b9451d8e01ead99
MD5 6effa4f17a3bc2f0f31f92eb9e9c20eb
BLAKE2b-256 86945b3259f8d138d3b6f5f7ad6e0dc0d99ab398521e61a7f6d6a037f3ae0e7c

See more details on using hashes here.

Provenance

The following attestation bundles were made for timelog_extract-0.2.8-py3-none-any.whl:

Publisher: pypi.yml on mbjorke/timelog-extract

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page