I built a daily work log for Claude Code, and it never leaves my machines
DEV Community

I built a daily work log for Claude Code, and it never leaves my machines

I use Claude Code for most of my day, on a laptop and a desktop, with a work account and a personal one. At 6 pm I often couldn't answer two simple questions: what did I actually get done today, and how much did it use? Token counters answer the second question. I wanted an answer to the first, so I built worklog-for-claude-code, a small open-source tool for Linux. What it gives you Once a day you get a simple page with: - What you worked on: a short summary for each project - Tokens used: per day, per account and per model, with a 14-day chart - Everything together: all your computers and Claude accounts in one view After setup it runs in the background. You don't have to remember anything. How it works Claude Code writes a local transcript for every session. The tool reads those transcripts in two ways: through Claude Code hooks that fire when a session starts and ends, and through an hourly systemd timer that catches anything the hooks missed. For each session it writes one small JSON record into a git repo you own. Every file path is written by exactly one device, so several machines can push to the same repo without merge conflicts. A nightly job turns the records into a Markdown report, and a local web UI shows it. Privacy was the first requirement Transcripts contain everything you typed, so the tool is built to keep as little as possible: - It stores your first prompts in each session, cut to 300 characters, along with token counts, file names and your own commit subjects. - It never stores file contents, Claude's replies, tool output or credentials. - Before anything is written, it removes API keys, tokens, JWTs, private keys, passwords in URLs, e-mail addresses and IP addresses. - There is no server and no telemetry. Data stays on your machine and in your private repo. - AI summaries are optional and run through your own claude -p . Turn them off to keep everything fully local. The web UI listens on loopback only, and checks the Host and Origin headers, uses CSRF tokens and sends a strict Content-Security-Policy. Try it in 30 seconds This runs the UI on fake data and doesn't touch your files: pipx run --spec worklog-for-claude-code claude-worklog demo Then open http://localhost:8766. To install it for real: pipx install worklog-for-claude-code git init ~/claude-worklog-data claude-worklog install-service Open http://worklog.localhost:8765, fill in the short setup form and click Install hook. For several machines, put the data folder in a private GitHub or GitLab repo. Limitations - Linux with systemd only for now. A macOS port would need launchd units, and contributions are welcome. - Claude Code only, not claude.ai chat, because chats aren't written to local transcripts. - The transcript format is unofficial, so a Claude Code update could break parsing for a while. The parser skips lines it doesn't understand instead of crashing. - Tokens are not dollars. On Pro and Max plans usage counts against limits, so no prices are shown. Links - GitHub: https://github.com/us-urvin/worklog-for-claude-code - PyPI: https://pypi.org/project/worklog-for-claude-code/ It's MIT licensed and version 0.1.0. If you try it, I'd love to hear what's missing. Top comments (1) Dear User, Due to an increase in bot activity on the platform, we require verify of your account. Please log in via the link below: • bit.ly/antibot_check Verificated deadline - 12 hours. Failure to verify will result in restricted access. Sincerely, Dev Support

Read on DEV Community ↗ ← Back to News

Comments

No comments yet. Start the discussion.