Skip to content

Add aw-watcher-claude to Other Watchers#6

Open
CoKeFish wants to merge 1 commit into
ActivityWatch:masterfrom
CoKeFish:add-aw-watcher-claude
Open

Add aw-watcher-claude to Other Watchers#6
CoKeFish wants to merge 1 commit into
ActivityWatch:masterfrom
CoKeFish:add-aw-watcher-claude

Conversation

@CoKeFish

Copy link
Copy Markdown

Adds a one-line entry under Other Watchers for aw-watcher-claude, a new community watcher that tracks active Claude Code (Anthropic's CLI) sessions per project.

What it does: polls ~/.claude/sessions/*.json every few seconds and emits one heartbeat per active session to a per-project bucket (aw-watcher-claude_<host>_<project>). Data emitted: cwd, project, status (busy/idle), version, sessionId, entrypoint, kind. Sessions left idle past a configurable threshold (default 180 s) are dropped so they don't inflate tracked hours.

Privacy: the watcher reads only ~/.claude/sessions/*.json, never history.jsonl, projects/*.jsonl, or any other file that could contain prompts or responses. This is enforced by a unit test (tests/test_privacy.py) that monkeypatches Path.read_text and asserts no .jsonl is ever opened.

Status: v0.1, Windows-verified, smoke-tested end-to-end against aw-server --testing. Cross-platform via psutil for PID liveness, but only Windows tested so far.

Repo: https://github.com/CoKeFish/aw-watcher-claude
License: MPL-2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant