📓 Claude Code Working Diary
Your Claude Code sessions, automatically documented.
한국어 | English
⚠️ This is a community project, not officially affiliated with Anthropic.
Every Claude Code session you run is full of valuable work — tasks completed, files changed, bugs fixed. But when the session ends, that context disappears. claude-diary captures it all automatically.
pip install claude-diary && claude-diary init # That's it. You're done.
How It Works
Claude Code session ends
│
▼
Stop Hook fires automatically
│
▼
Parses transcript → extracts tasks, files, commands, git info
│
▼
~/working-diary/2026-03-24.md ← auto-generated diary entry
Zero config needed. Every session end triggers the hook, analyzes what you did, and appends a structured Markdown entry to today's diary.
Supported Platforms
| Platform | Python | Auto Diary | Weekly Summary | Cron |
|---|---|---|---|---|
| macOS | python3 | ✅ | ✅ | ✅ |
| Linux | python3 | ✅ | ✅ | ✅ |
| Windows (Git Bash) | python | ✅ | ✅ | ❌ (Use Task Scheduler) |
What Gets Logged
| Item | Description |
|---|---|
| 📋 Task Requests | What the user asked Claude to do |
| 📄 Files Created | List of newly created files |
| ✏️ Files Modified | List of edited files |
| ⚡ Key Commands | Important shell commands executed |
| 📝 Work Summary | Summary of AI-performed tasks |
| ⚠️ Issues | Errors or problems encountered |
Installation
Option 1: pip (Recommended)
pip install claude-diary
claude-diary init
Option 2: Claude Code Plugin
# Inside Claude Code
/plugin marketplace add https://github.com/solzip/claude-code-hooks-diary
/plugin install working-diary
Option 3: Manual Install
git clone https://github.com/solzip/claude-code-hooks-diary.git
cd claude-code-hooks-diary/working-diary-system
./install.sh
After installation:
- Stop Hook registered (auto-runs on session end)
~/working-diary/directory created- Config file generated
Directory Structure
~/working-diary/
├── 2026-03-15.md ← Daily diary
├── 2026-03-16.md
├── 2026-03-17.md
├── .session_counts.json ← Internal counter (auto)
├── .gitignore
└── weekly/
├── W11_2026-03-09.md ← Weekly summary report
└── W12_2026-03-16.md
Manual Diary — /diary Slash Command
For when you want to record an entry mid-session without waiting for the Stop Hook. Coexists with the auto diary and lives at a separate, project-organized path.
~/working-diary/manual/
└── 2026-04-29/
└── claude-code-hooks-diary/
└── 2026-04-29.md ← appended on subsequent calls within the same day/project
Usage:
- Inside a Claude Code session: type
/diary— reads the current cwd's transcript and writes the entry - Or from the terminal:
claude-diary write
claude-diary install installs ~/.claude/commands/diary.md so /diary works in every project. Re-run it once if you installed before this feature shipped (it's idempotent). claude-diary uninstall removes it (preserves user-modified files).
Diary Example
# 📓 Work Diary — 2026-03-17 (Tue)
> This file is auto-generated by Claude Code Stop Hook.
> Work content is automatically recorded at the end of each session.
---
### ⏰ 09:32:15 | 📁 `ai-chatbot`
**📋 Task Requests:**
1. Implement circuit breaker pattern in WebSocket handler
2. Update error code definitions
**📄 Files Created:**
- `.../handler/CircuitBreakerHandler.java`
**✏️ Files Modified:**
- `.../config/WebSocketConfig.java`
- `.../constant/ErrorCode.java`
**⚡ Key Commands:**
- `./gradlew test`
- `./gradlew bootRun`
**📝 Work Summary:**
- Circuit breaker pattern implemented in WebSocket handler
- Added 3-state transition logic (CLOSED→OPEN→HALF_OPEN)
Configuration
| Environment Variable | Description | Default |
|---|---|---|
CLAUDE_DIARY_LANG |
Diary language (ko or en) |
ko |
CLAUDE_DIARY_DIR |
Auto diary storage path | ~/working-diary |
CLAUDE_DIARY_MANUAL_DIR |
Manual diary (/diary) storage path |
~/working-diary/manual |
CLAUDE_DIARY_TZ_OFFSET |
UTC offset | 9 (KST) |
# Add to ~/.bashrc or ~/.zshrc
export CLAUDE_DIARY_LANG="en"
export CLAUDE_DIARY_DIR="$HOME/working-diary"
export CLAUDE_DIARY_TZ_OFFSET="-5" # EST (UTC-5)
Windows environment variables:
# PowerShell (persistent)
[Environment]::SetEnvironmentVariable("CLAUDE_DIARY_LANG", "en", "User")
[Environment]::SetEnvironmentVariable("CLAUDE_DIARY_DIR", "$env:USERPROFILE\working-diary", "User")
CLI Commands
claude-diary write # Write current session diary on demand (also via `/diary` slash command)
claude-diary search "keyword" # Keyword search
claude-diary filter --project my-app # Filter by project
claude-diary trace src/main.py # File change history
claude-diary stats # Terminal dashboard
claude-diary weekly # Weekly summary
claude-diary dashboard # HTML dashboard
claude-diary audit # Security audit log
claude-diary audit --verify # Source code integrity check
claude-diary config # View settings
claude-diary team stats # Team statistics
claude-diary team weekly # Team weekly report
Features
| Feature | Description |
|---|---|
| Auto Categories | feature/bugfix/refactor/docs/test/config/style auto-tagging |
| Git Integration | Branch, commits, diff stats (+/- lines) auto-recorded |
| Secret Scanning | Passwords, API keys, tokens auto-masked (11+ patterns) |
| Search Index | Fast search across months of diary files |
| 5 Exporters | Notion, Slack, Discord, Obsidian, GitHub plugins |
| HTML Dashboard | GitHub-style heatmap, offline charts (zero CDN) |
| Security Audit | Audit log, SHA-256 checksum tamper detection |
| Team Mode | Access control, central Git repo, team reports |
Requirements
- Python 3.8+ (
python3orpython) - Claude Code (with hooks support)
- Zero external dependencies (core), no API tokens required
Tips
Add to your CLAUDE.md for better diary entries:
## Work Diary
- Work content is automatically recorded when the session ends
- Please output clear summaries when completing/implementing/fixing tasks
FAQ
"Isn't git log enough?"
git log records what you committed. claude-diary records what you tried, asked for, and debugged — including sessions where you didn't commit anything. It captures the original prompts ("implement JWT auth"), commands run, errors encountered, and time spent. Think of it as the gap between your commit history and your actual workday.
"Does it work with Cursor / Windsurf / Copilot?"
Not yet — currently Claude Code only (via Stop Hook). But the core pipeline just needs session_id + transcript + cwd, so adding other AI IDEs is architecturally straightforward. See roadmap below.
"Why JSON index instead of SQLite?"
The current JSON index is simple and has zero dependencies. SQLite (which is in Python's stdlib) is planned for v5.0 to enable full-text search and faster queries across months of data.
Roadmap
| Phase | Goal | Version | Status |
|---|---|---|---|
| A | Personal productivity (categories, Git, CLI, plugins, dashboard) | v2.0.0 | ✅ Done |
| B | Open source community (security, 420+ tests, CI/CD) | v3.0.0 | ✅ Done |
| C | Team/company tool (access control, central repo, team reports) | v4.0.0 | ✅ Done |
| D | Distribution (plugin, PyPI, marketplace) | v4.1.0 | ✅ Done |
| E | Multi-IDE support (Cursor, Windsurf, VS Code extension) | v5.0.0 | 📋 Planned |
| F | SQLite index + full-text search + analytics API | v5.1.0 | 📋 Planned |
See docs/plans/ for detailed roadmaps.
License
MIT License — LICENSE
Metadata
Release files for claude-diary 4.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| claude_diary-4.2.0.tar.gz | 88.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| claude_diary-4.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 149.6 kB
Release files / claude_diary-4.2.0.tar.gz
| Download URL | claude_diary-4.2.0.tar.gz |
|---|---|
| Size | 88.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0bf6f4a1378fa259c3f226418cd83604781b77883da7dfcca5e0f6d3895f35bc
|
|
BLAKE2b-256 checksum How to use checksums |
113d19eb088e167577af3e79bba460a311253e968620afe850cc531538fc77c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency logRelease files / claude_diary-4.2.0-py3-none-any.whl
| Download URL | claude_diary-4.2.0-py3-none-any.whl |
|---|---|
| Size | 61.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
beb37864de115d1cfb7f47fa269076b79b43835c229807e419856c744af2f965
|
|
BLAKE2b-256 checksum How to use checksums |
37cf11297fdb5a07b6d0b7ccdba8811c56f1aa41a2766c2f7bcaf37fb24d8759
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 29, 2026.
Transparency log