Aggregate local work activity from Gemini, Claude, Cursor, OpenAI Codex IDE, Chrome, Mail, worklog, optional GitHub public activity, and optional Screen Time.
Project description
Your day leaves traces—IDE, browser, mail, commits, worklog. Gittan turns those signals into project hours and optional invoice PDFs, without sending your raw activity to our servers by default. Everything runs local-first; you stay in control.
Install
You need Python 3.10+. The fastest path is the one-line installer — it uses pipx under the hood (falling back to pip install --user if pipx is missing) so gittan lands on your PATH:
curl -fsSL https://gittan.sh/install | bash
gittan -V
Prefer the manual steps? Install with pipx directly:
python3 -m pip install --user pipx
python3 -m pipx ensurepath
# open a new shell, then:
pipx install timelog-extract
gittan -V
Other install paths
pip install --user — scripts may land outside your default PATH. Add the user-level bin for that Python install (OS-specific; python3 -m site --user-base helps locate it), or run gittan doctor after install for hints.
python3 -m pip install --user timelog-extract
Virtualenv
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 .
gittan -V
A Homebrew tap (brew install gittan) is planned; until then use the installer or pipx above. Maintainer notes: docs/runbooks/homebrew-tap.md.
Maintainers: release steps — docs/runbooks/versioning.md.
First run
Use a git checkout (usually the repo root) and lock your worklogs to per-project files:
gittan doctor— see what collectors can see on this machine.gittan setup— wire optional hooks andtimelog_projects.json(--dry-run/--interactiveif you want previews).gittan report --today --source-summary— your first real report from real traces.
Projects config default path (--projects-config when omitted):
GITTAN_PROJECTS_CONFIGif set (full path to config file).- Else
$GITTAN_HOME/timelog_projects.jsonifGITTAN_HOMEis set. - Else the canonical file under the Gittan home directory (
gittan config pathshows the exact path; same target when the file does not exist yet). - Else the per-user profile home fallback if that older file exists.
Resolution does not depend on the current working directory. A stray home-directory or repo-local copy is ignored (with a warning on gittan report / gittan doctor). Use --projects-config only for demos or deliberate overrides.
You usually do not need to set any env vars; check the active path with gittan config path.
Worklog model (locked standard):
- Primary: per-project files in
~/.gittan/worklogs/<project-id>.md. - Store each path in that project profile as
"worklog"insidetimelog_projects.json. - Legacy fallback: repo-local
TIMELOG.mdremains supported for compatibility, but is not the recommended default.
Legacy fallback resolution order (same order as AGENTS.md and CONTRIBUTING.md):
--worklog PATHif you pass it.- Else the top-level
worklogfield intimelog_projects.json, if set. - Else
TIMELOG.mdin the current working directory, if that file exists. - Else
<current_repo_root>/TIMELOG.md, with<current_repo_root>from Git (git rev-parse --show-toplevel) when you are inside a repository, otherwise the current directory.
Commands you’ll use
| Goal | Command |
|---|---|
| Interactive report (asks for dates if you omit them) | gittan report |
| Today / last week / range | gittan report --today · --last-week · --from YYYY-MM-DD --to YYYY-MM-DD |
| Map URL hosts to projects | gittan review (or gittan review --json for read-only candidates) |
| Clean up uncategorized time (legacy) | gittan review --uncategorized |
| Quick totals | gittan status --today |
| Collector status | gittan sources |
| Edit project rules | gittan projects |
| Show active config path/source | gittan config path |
| Repo-wide git → worklog hooks | gittan setup-global-timelog |
JSON / HTML export (for scripts or archiving):
gittan report --today --format json
gittan report --from YYYY-MM-DD --to YYYY-MM-DD --format json --json-file out/truth.json --report-html out/report.html
out/ is local output (gitignored by default). Optional GitHub activity: set GITHUB_USER / --github-user, optional GITHUB_TOKEN — details in docs/sources/sources-and-flags.md.
Timelog vs config
Per-project worklogs (~/.gittan/worklogs/<project-id>.md) |
Primary standard; each profile in timelog_projects.json should carry explicit "worklog" path. |
TIMELOG.md |
Legacy fallback (compatibility only); still supported for existing setups. |
timelog_projects.json |
Machine rules; back it up. Setup writes timestamped backups before replacing broken JSON. |
Troubleshooting
| Symptom | Where to look |
|---|---|
gittan not found |
PATH (pipx ~/.local/bin, or pip --user bin); then gittan doctor. |
| No events / empty sources | docs/sources/sources-and-flags.md |
| Bad or missing config | gittan setup · backups timelog_projects.backup-*.json |
| Permissions / paths | --worklog, browser DB access, Mail / Screen Time |
| Global hooks | docs/runbooks/global-timelog-setup.md |
Documentation
Layered docs so you can go shallow or deep:
- Find any category of doc —
docs/README.mdis the map. - See how vision, scope, and metrics fit together —
docs/product/vision-documents.md. - Use the Cursor companion (optional) —
cursor-extension/README.md. - Call the same engine from a script —
python3 scripts/run_engine_report.py --today --pdf.
Contributing · tests · license
If you want to change the tool, start with CONTRIBUTING.md — it covers branch names, English PR titles and descriptions, and what to run locally before review.
- Branch like this: short-lived
task/<scope>frommain, then open a PR — spelled out inBRANCH.md. - Understand CI: what GitHub runs on every push is in
docs/runbooks/ci.md. - Match CI before you push:
bash scripts/run_autotests.shfrom the repository root. - Deeper rules for humans and agents:
AGENTS.md— timelog policy, push gates, review cadence. - License: GNU GPL-3.0-or-later — copyleft; share improvements on the same terms.
- What shipped when:
CHANGELOG.md. - Logos, favicon, social preview:
docs/brand/README.mdfor maintainers building assets from canonical marks.
Feedback
Questions and rough edges → GitHub Discussions. Bugs you can reproduce → Issues.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file timelog_extract-0.3.1.tar.gz.
File metadata
- Download URL: timelog_extract-0.3.1.tar.gz
- Upload date:
- Size: 530.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc45b0c3e58d4777d7b5f3c765bd0af812075f419e9626bbd9c0f7dc3c5f13f1
|
|
| MD5 |
8e6aee4632eeee86b6ff76392dfa06c0
|
|
| BLAKE2b-256 |
7d4a303e9fe54a3aefd963cbfbe394c35b9b895dc9305ca25bdf0cf7fb34b115
|
Provenance
The following attestation bundles were made for timelog_extract-0.3.1.tar.gz:
Publisher:
pypi.yml on mbjorke/timelog-extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timelog_extract-0.3.1.tar.gz -
Subject digest:
fc45b0c3e58d4777d7b5f3c765bd0af812075f419e9626bbd9c0f7dc3c5f13f1 - Sigstore transparency entry: 2066377460
- Sigstore integration time:
-
Permalink:
mbjorke/timelog-extract@b5052ea409f83f3f43bd2c95ef8f767bc3288b46 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/mbjorke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@b5052ea409f83f3f43bd2c95ef8f767bc3288b46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file timelog_extract-0.3.1-py3-none-any.whl.
File metadata
- Download URL: timelog_extract-0.3.1-py3-none-any.whl
- Upload date:
- Size: 445.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9086bd978f9673c25a09dfa384a992e16aefaefd4416dc0d750a1387023cc7c4
|
|
| MD5 |
d92a4fa398c4f6d9a6a6b9d43acb7c97
|
|
| BLAKE2b-256 |
d754434bf531e267c4358dfab65c2d30929fbcbe725dade1d9550c112076a427
|
Provenance
The following attestation bundles were made for timelog_extract-0.3.1-py3-none-any.whl:
Publisher:
pypi.yml on mbjorke/timelog-extract
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
timelog_extract-0.3.1-py3-none-any.whl -
Subject digest:
9086bd978f9673c25a09dfa384a992e16aefaefd4416dc0d750a1387023cc7c4 - Sigstore transparency entry: 2066377623
- Sigstore integration time:
-
Permalink:
mbjorke/timelog-extract@b5052ea409f83f3f43bd2c95ef8f767bc3288b46 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/mbjorke
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@b5052ea409f83f3f43bd2c95ef8f767bc3288b46 -
Trigger Event:
push
-
Statement type: