claude-ledger 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,17 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *$py.class
4
+ *.egg-info/
5
+ dist/
6
+ build/
7
+ .eggs/
8
+ *.egg
9
+ .ruff_cache/
10
+ .pytest_cache/
11
+ .coverage
12
+ htmlcov/
13
+ .env
14
+ .venv
15
+ venv/
16
+ *.so
17
+ .DS_Store
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rob Leach
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,264 @@
1
+ Metadata-Version: 2.4
2
+ Name: claude-ledger
3
+ Version: 0.1.0
4
+ Summary: Portfolio-level project tracking for Claude Code
5
+ Project-URL: Homepage, https://github.com/claude-ledger/claude-ledger
6
+ Project-URL: Repository, https://github.com/claude-ledger/claude-ledger
7
+ Project-URL: Issues, https://github.com/claude-ledger/claude-ledger/issues
8
+ Author: Rob Leach
9
+ License-Expression: MIT
10
+ License-File: LICENSE
11
+ Keywords: claude-code,ledger,portfolio,project-tracking
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Software Development :: Build Tools
22
+ Classifier: Topic :: Software Development :: Libraries
23
+ Requires-Python: >=3.10
24
+ Requires-Dist: click>=8.0
25
+ Requires-Dist: python-frontmatter>=1.0
26
+ Requires-Dist: pyyaml>=6.0
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest-cov; extra == 'dev'
29
+ Requires-Dist: pytest>=7.0; extra == 'dev'
30
+ Requires-Dist: ruff; extra == 'dev'
31
+ Description-Content-Type: text/markdown
32
+
33
+ # claude-ledger
34
+
35
+ Portfolio-level project tracking for [Claude Code](https://docs.anthropic.com/en/docs/claude-code).
36
+
37
+ ## Why This Exists
38
+
39
+ Claude Code is excellent at per-project memory. Each project gets its own `CLAUDE.md`, auto-memory files, and todos. Within a single project, context persists well.
40
+
41
+ But if you work across many projects — 10, 20, 50+ — there's a fundamental gap: **Claude starts every session ignorant of what happened in your other projects, even on the same machine.** There's no portfolio layer.
42
+
43
+ This is the problem I hit running 30+ projects with Claude Code as my primary development tool. The symptoms:
44
+
45
+ - **Constant re-explaining.** "Where were we?" became the opening line of every session. Not just for the current project — for the *portfolio*. Which projects are active? What did I ship yesterday? What's been neglected?
46
+ - **Invisible progress.** I built a session tracking system but never wired the hooks. Six days of work on a client project went completely untracked. I only discovered this during an audit.
47
+ - **Lost cross-project awareness.** Pausing one project without realising it blocks three others. Changing shared infrastructure without knowing what depends on it. No cascade warnings.
48
+ - **Session amnesia after compaction.** Mid-session context compression would wipe portfolio awareness entirely. The project I was *currently* working on survived, but everything else vanished.
49
+
50
+ Per-project memory is solved. **Portfolio-level intelligence is not.** That's what claude-ledger addresses.
51
+
52
+ ## How It Fits Into Claude Code's Memory System
53
+
54
+ Claude Code already has a layered memory system. claude-ledger adds the missing layer:
55
+
56
+ ```
57
+ Layer 1: CLAUDE.md Per-project instructions, vocabulary, protocols
58
+ Layer 2: Auto-memory Per-project facts, preferences, feedback
59
+ Layer 3: Todos/Tasks Per-project work tracking
60
+ ─────────────────────────────────────────────────────────
61
+ Layer 4: claude-ledger Cross-project portfolio awareness ← NEW
62
+ ```
63
+
64
+ Layers 1-3 answer: "What do I need to know about *this* project?"
65
+
66
+ Layer 4 answers: "What's happening across *all* my projects? What's active, what's stale, what depends on what, and what did I do yesterday?"
67
+
68
+ claude-ledger sits *on top of* the existing system — it doesn't replace anything. Your CLAUDE.md files, memory, and todos keep working exactly as they do now. The ledger adds the portfolio view that was missing.
69
+
70
+ ## How It Works
71
+
72
+ claude-ledger is a set of Claude Code hooks + a CLI that automatically:
73
+
74
+ 1. **Tracks activity** — every file edit and git commit is recorded to a per-project ledger file, without you doing anything
75
+ 2. **Generates briefings** — on session start, Claude gets a portfolio summary with priority tiers and staleness detection
76
+ 3. **Maps workstreams** — groups related projects together and warns when changes might cascade
77
+
78
+ The key design principle: **capture must be fully automatic.** Manual triggers have already proven unreliable — if it requires a human to remember to run something, it won't happen. Hooks solve this.
79
+
80
+ ### What Claude Sees at Session Start
81
+
82
+ When you start a Claude Code session, the SessionStart hook generates a briefing like:
83
+
84
+ ```
85
+ Portfolio briefing ready — 32 projects tracked, 7 P1 active, 3 stale.
86
+ Read ~/.claude/ledger/_portfolio.md and ~/.claude/ledger/_workstreams.md for full context.
87
+ ```
88
+
89
+ Claude can then read the full briefing — grouped by priority, with staleness warnings and workstream cascade alerts — before you even type your first message.
90
+
91
+ ### What Happens During a Session
92
+
93
+ As you work, hooks fire silently in the background:
94
+
95
+ - **Edit a file** → the ledger records which project was touched
96
+ - **Make a git commit** → the commit message and SHA are captured to the project's activity log
97
+ - **Claude responds** → the session summary is stored
98
+ - **Session ends** → everything is finalised and the ledger repo is committed (giving you time-travel via `git log`)
99
+
100
+ You never interact with the ledger directly. It just accumulates.
101
+
102
+ ## Quick Start
103
+
104
+ ```bash
105
+ pip install claude-ledger
106
+ claude-ledger init --scan-dirs ~/Code --github-user your-username
107
+ claude-ledger scan
108
+ claude-ledger bootstrap
109
+ ```
110
+
111
+ That's it. Every Claude Code session now starts with a portfolio briefing, and activity is tracked automatically.
112
+
113
+ ## What Gets Created
114
+
115
+ ```
116
+ ~/.claude/ledger/
117
+ ├── ledger.yaml # Your configuration
118
+ ├── _portfolio.md # Auto-generated briefing (Claude reads this at session start)
119
+ ├── _workstreams.md # Cross-project dependency map with cascade warnings
120
+ ├── .git/ # Time-travel — git log shows portfolio state over time
121
+ ├── my-project.md # One ledger file per project
122
+ └── another-project.md # (YAML frontmatter + activity log)
123
+ ```
124
+
125
+ The whole thing is plain markdown files in `~/.claude/`. No database, no daemon, no external service. Git-backed for time-travel. Human-readable. Works offline.
126
+
127
+ ## Commands
128
+
129
+ | Command | What it does |
130
+ |---------|-------------|
131
+ | `claude-ledger init` | Set up ledger directory and install Claude Code hooks |
132
+ | `claude-ledger scan` | Discover projects in your configured directories |
133
+ | `claude-ledger bootstrap` | Create ledger files from scan results |
134
+ | `claude-ledger briefing` | Generate portfolio + workstream briefings |
135
+ | `claude-ledger status` | Quick portfolio summary |
136
+ | `claude-ledger uninstall` | Remove hooks (optionally delete ledger data) |
137
+
138
+ ## Configuration
139
+
140
+ After running `init`, edit `~/.claude/ledger/ledger.yaml`:
141
+
142
+ ```yaml
143
+ version: 1
144
+
145
+ # Where to scan for projects
146
+ scan_dirs:
147
+ - ~/Code
148
+ - ~/Projects
149
+
150
+ # GitHub username for remote repo discovery (optional)
151
+ github_user: your-username
152
+
153
+ # Directories to scan for stray project files
154
+ stray_scan_dirs:
155
+ - ~/Downloads
156
+
157
+ # Days of inactivity before a project is "stale"
158
+ stale_days: 7
159
+
160
+ # Projects to skip during scan/bootstrap
161
+ skip_slugs: []
162
+ no_track: []
163
+
164
+ # Group related projects into workstreams (optional)
165
+ workstreams:
166
+ backend:
167
+ display_name: "Backend Services"
168
+ members:
169
+ - api-server
170
+ - auth-service
171
+ - worker-queue
172
+ frontend:
173
+ display_name: "Frontend Apps"
174
+ members:
175
+ - web-app
176
+ - mobile-app
177
+ ```
178
+
179
+ ## Ledger File Format
180
+
181
+ Each project gets a markdown file with YAML frontmatter:
182
+
183
+ ```yaml
184
+ ---
185
+ name: My Project
186
+ slug: my-project
187
+ directory: /Users/you/Code/my-project
188
+ repo_url: https://github.com/you/my-project.git
189
+ status: active # active, paused, dormant, archived, completed
190
+ priority: P1 # P1, P2, P3 (inferred from activity)
191
+ vision: A short description of what this project does
192
+ current_phase: building
193
+ last_session: '2026-03-20T15:03:39Z'
194
+ last_activity: Add user authentication
195
+ systems: []
196
+ tags: [next.js, typescript, tailwind]
197
+ workstreams: [frontend]
198
+ ---
199
+
200
+ ## Activity Log
201
+
202
+ ### 20 March 2026
203
+ - Add user authentication (a1b2c3d)
204
+ - Fix login redirect loop (e4f5g6h)
205
+
206
+ ### 18 March 2026
207
+ - Initial project scaffold (1234567)
208
+ ```
209
+
210
+ These are just markdown files. Edit them freely — change priorities, update the vision, add notes. The hooks only ever *append* to the activity log and update timestamps.
211
+
212
+ ## How Hooks Work
213
+
214
+ claude-ledger installs five hooks into your Claude Code settings:
215
+
216
+ | Hook | Event | What it does |
217
+ |------|-------|-------------|
218
+ | **PostToolUse** (Edit/Write) | File edited | Records which project was touched |
219
+ | **PostToolUse** (Bash) | Command run | Captures git commit metadata |
220
+ | **Stop** | Response complete | Stores session summary |
221
+ | **SessionEnd** | Session closes | Finalises activity, commits ledger repo |
222
+ | **SessionStart** | Session opens | Generates portfolio briefing |
223
+
224
+ All hooks have tight timeouts (2-5 seconds) and fail silently — they never block your work.
225
+
226
+ ### Concurrent Sessions
227
+
228
+ If you run multiple Claude Code sessions at once (different terminals, different projects), the ledger handles it safely. Each project's ledger file has its own lock file, and session state is isolated per session ID. Two sessions touching the same project won't corrupt each other's data.
229
+
230
+ ## Heuristic Inference
231
+
232
+ When you run `bootstrap`, claude-ledger infers project metadata from what it finds:
233
+
234
+ | Signal | Inference |
235
+ |--------|-----------|
236
+ | >=10 commits/30d + CLAUDE.md | P1 (high priority) |
237
+ | >=3 commits/30d or has .mcp.json | P2 (medium) |
238
+ | Everything else | P3 (low) |
239
+ | >=1 commit in 30 days | Active |
240
+ | No commits but <90 days old | Paused |
241
+ | <365 days old | Dormant |
242
+ | Older | Archived |
243
+
244
+ You can override any of these in the ledger files — they're just markdown.
245
+
246
+ ## Design Decisions
247
+
248
+ **Why plain files, not a database?** Markdown files are human-readable, git-compatible, and always available. No MCP dependency, no daemon, no external service. Each file is independently lockable for thread-safe concurrent writes.
249
+
250
+ **Why YAML frontmatter?** Structured enough for machines to parse (priority sorting, staleness detection), readable enough for humans to edit. The format is forward-compatible — a future daemon or dashboard could ingest these files directly.
251
+
252
+ **Why hooks, not manual tracking?** Because manual triggers don't work. I built a session tracking script and forgot to wire the hooks for 6 days. If it requires a human to remember, it won't happen.
253
+
254
+ **Why the workstreams layer?** Because pausing one project can silently block three others. Cascade warnings surface cross-project risks *before* they cause problems.
255
+
256
+ ## Requirements
257
+
258
+ - Python >= 3.9
259
+ - Claude Code (for the hooks integration)
260
+ - `gh` CLI (optional, for GitHub repo discovery)
261
+
262
+ ## License
263
+
264
+ MIT
@@ -0,0 +1,232 @@
1
+ # claude-ledger
2
+
3
+ Portfolio-level project tracking for [Claude Code](https://docs.anthropic.com/en/docs/claude-code).
4
+
5
+ ## Why This Exists
6
+
7
+ Claude Code is excellent at per-project memory. Each project gets its own `CLAUDE.md`, auto-memory files, and todos. Within a single project, context persists well.
8
+
9
+ But if you work across many projects — 10, 20, 50+ — there's a fundamental gap: **Claude starts every session ignorant of what happened in your other projects, even on the same machine.** There's no portfolio layer.
10
+
11
+ This is the problem I hit running 30+ projects with Claude Code as my primary development tool. The symptoms:
12
+
13
+ - **Constant re-explaining.** "Where were we?" became the opening line of every session. Not just for the current project — for the *portfolio*. Which projects are active? What did I ship yesterday? What's been neglected?
14
+ - **Invisible progress.** I built a session tracking system but never wired the hooks. Six days of work on a client project went completely untracked. I only discovered this during an audit.
15
+ - **Lost cross-project awareness.** Pausing one project without realising it blocks three others. Changing shared infrastructure without knowing what depends on it. No cascade warnings.
16
+ - **Session amnesia after compaction.** Mid-session context compression would wipe portfolio awareness entirely. The project I was *currently* working on survived, but everything else vanished.
17
+
18
+ Per-project memory is solved. **Portfolio-level intelligence is not.** That's what claude-ledger addresses.
19
+
20
+ ## How It Fits Into Claude Code's Memory System
21
+
22
+ Claude Code already has a layered memory system. claude-ledger adds the missing layer:
23
+
24
+ ```
25
+ Layer 1: CLAUDE.md Per-project instructions, vocabulary, protocols
26
+ Layer 2: Auto-memory Per-project facts, preferences, feedback
27
+ Layer 3: Todos/Tasks Per-project work tracking
28
+ ─────────────────────────────────────────────────────────
29
+ Layer 4: claude-ledger Cross-project portfolio awareness ← NEW
30
+ ```
31
+
32
+ Layers 1-3 answer: "What do I need to know about *this* project?"
33
+
34
+ Layer 4 answers: "What's happening across *all* my projects? What's active, what's stale, what depends on what, and what did I do yesterday?"
35
+
36
+ claude-ledger sits *on top of* the existing system — it doesn't replace anything. Your CLAUDE.md files, memory, and todos keep working exactly as they do now. The ledger adds the portfolio view that was missing.
37
+
38
+ ## How It Works
39
+
40
+ claude-ledger is a set of Claude Code hooks + a CLI that automatically:
41
+
42
+ 1. **Tracks activity** — every file edit and git commit is recorded to a per-project ledger file, without you doing anything
43
+ 2. **Generates briefings** — on session start, Claude gets a portfolio summary with priority tiers and staleness detection
44
+ 3. **Maps workstreams** — groups related projects together and warns when changes might cascade
45
+
46
+ The key design principle: **capture must be fully automatic.** Manual triggers have already proven unreliable — if it requires a human to remember to run something, it won't happen. Hooks solve this.
47
+
48
+ ### What Claude Sees at Session Start
49
+
50
+ When you start a Claude Code session, the SessionStart hook generates a briefing like:
51
+
52
+ ```
53
+ Portfolio briefing ready — 32 projects tracked, 7 P1 active, 3 stale.
54
+ Read ~/.claude/ledger/_portfolio.md and ~/.claude/ledger/_workstreams.md for full context.
55
+ ```
56
+
57
+ Claude can then read the full briefing — grouped by priority, with staleness warnings and workstream cascade alerts — before you even type your first message.
58
+
59
+ ### What Happens During a Session
60
+
61
+ As you work, hooks fire silently in the background:
62
+
63
+ - **Edit a file** → the ledger records which project was touched
64
+ - **Make a git commit** → the commit message and SHA are captured to the project's activity log
65
+ - **Claude responds** → the session summary is stored
66
+ - **Session ends** → everything is finalised and the ledger repo is committed (giving you time-travel via `git log`)
67
+
68
+ You never interact with the ledger directly. It just accumulates.
69
+
70
+ ## Quick Start
71
+
72
+ ```bash
73
+ pip install claude-ledger
74
+ claude-ledger init --scan-dirs ~/Code --github-user your-username
75
+ claude-ledger scan
76
+ claude-ledger bootstrap
77
+ ```
78
+
79
+ That's it. Every Claude Code session now starts with a portfolio briefing, and activity is tracked automatically.
80
+
81
+ ## What Gets Created
82
+
83
+ ```
84
+ ~/.claude/ledger/
85
+ ├── ledger.yaml # Your configuration
86
+ ├── _portfolio.md # Auto-generated briefing (Claude reads this at session start)
87
+ ├── _workstreams.md # Cross-project dependency map with cascade warnings
88
+ ├── .git/ # Time-travel — git log shows portfolio state over time
89
+ ├── my-project.md # One ledger file per project
90
+ └── another-project.md # (YAML frontmatter + activity log)
91
+ ```
92
+
93
+ The whole thing is plain markdown files in `~/.claude/`. No database, no daemon, no external service. Git-backed for time-travel. Human-readable. Works offline.
94
+
95
+ ## Commands
96
+
97
+ | Command | What it does |
98
+ |---------|-------------|
99
+ | `claude-ledger init` | Set up ledger directory and install Claude Code hooks |
100
+ | `claude-ledger scan` | Discover projects in your configured directories |
101
+ | `claude-ledger bootstrap` | Create ledger files from scan results |
102
+ | `claude-ledger briefing` | Generate portfolio + workstream briefings |
103
+ | `claude-ledger status` | Quick portfolio summary |
104
+ | `claude-ledger uninstall` | Remove hooks (optionally delete ledger data) |
105
+
106
+ ## Configuration
107
+
108
+ After running `init`, edit `~/.claude/ledger/ledger.yaml`:
109
+
110
+ ```yaml
111
+ version: 1
112
+
113
+ # Where to scan for projects
114
+ scan_dirs:
115
+ - ~/Code
116
+ - ~/Projects
117
+
118
+ # GitHub username for remote repo discovery (optional)
119
+ github_user: your-username
120
+
121
+ # Directories to scan for stray project files
122
+ stray_scan_dirs:
123
+ - ~/Downloads
124
+
125
+ # Days of inactivity before a project is "stale"
126
+ stale_days: 7
127
+
128
+ # Projects to skip during scan/bootstrap
129
+ skip_slugs: []
130
+ no_track: []
131
+
132
+ # Group related projects into workstreams (optional)
133
+ workstreams:
134
+ backend:
135
+ display_name: "Backend Services"
136
+ members:
137
+ - api-server
138
+ - auth-service
139
+ - worker-queue
140
+ frontend:
141
+ display_name: "Frontend Apps"
142
+ members:
143
+ - web-app
144
+ - mobile-app
145
+ ```
146
+
147
+ ## Ledger File Format
148
+
149
+ Each project gets a markdown file with YAML frontmatter:
150
+
151
+ ```yaml
152
+ ---
153
+ name: My Project
154
+ slug: my-project
155
+ directory: /Users/you/Code/my-project
156
+ repo_url: https://github.com/you/my-project.git
157
+ status: active # active, paused, dormant, archived, completed
158
+ priority: P1 # P1, P2, P3 (inferred from activity)
159
+ vision: A short description of what this project does
160
+ current_phase: building
161
+ last_session: '2026-03-20T15:03:39Z'
162
+ last_activity: Add user authentication
163
+ systems: []
164
+ tags: [next.js, typescript, tailwind]
165
+ workstreams: [frontend]
166
+ ---
167
+
168
+ ## Activity Log
169
+
170
+ ### 20 March 2026
171
+ - Add user authentication (a1b2c3d)
172
+ - Fix login redirect loop (e4f5g6h)
173
+
174
+ ### 18 March 2026
175
+ - Initial project scaffold (1234567)
176
+ ```
177
+
178
+ These are just markdown files. Edit them freely — change priorities, update the vision, add notes. The hooks only ever *append* to the activity log and update timestamps.
179
+
180
+ ## How Hooks Work
181
+
182
+ claude-ledger installs five hooks into your Claude Code settings:
183
+
184
+ | Hook | Event | What it does |
185
+ |------|-------|-------------|
186
+ | **PostToolUse** (Edit/Write) | File edited | Records which project was touched |
187
+ | **PostToolUse** (Bash) | Command run | Captures git commit metadata |
188
+ | **Stop** | Response complete | Stores session summary |
189
+ | **SessionEnd** | Session closes | Finalises activity, commits ledger repo |
190
+ | **SessionStart** | Session opens | Generates portfolio briefing |
191
+
192
+ All hooks have tight timeouts (2-5 seconds) and fail silently — they never block your work.
193
+
194
+ ### Concurrent Sessions
195
+
196
+ If you run multiple Claude Code sessions at once (different terminals, different projects), the ledger handles it safely. Each project's ledger file has its own lock file, and session state is isolated per session ID. Two sessions touching the same project won't corrupt each other's data.
197
+
198
+ ## Heuristic Inference
199
+
200
+ When you run `bootstrap`, claude-ledger infers project metadata from what it finds:
201
+
202
+ | Signal | Inference |
203
+ |--------|-----------|
204
+ | >=10 commits/30d + CLAUDE.md | P1 (high priority) |
205
+ | >=3 commits/30d or has .mcp.json | P2 (medium) |
206
+ | Everything else | P3 (low) |
207
+ | >=1 commit in 30 days | Active |
208
+ | No commits but <90 days old | Paused |
209
+ | <365 days old | Dormant |
210
+ | Older | Archived |
211
+
212
+ You can override any of these in the ledger files — they're just markdown.
213
+
214
+ ## Design Decisions
215
+
216
+ **Why plain files, not a database?** Markdown files are human-readable, git-compatible, and always available. No MCP dependency, no daemon, no external service. Each file is independently lockable for thread-safe concurrent writes.
217
+
218
+ **Why YAML frontmatter?** Structured enough for machines to parse (priority sorting, staleness detection), readable enough for humans to edit. The format is forward-compatible — a future daemon or dashboard could ingest these files directly.
219
+
220
+ **Why hooks, not manual tracking?** Because manual triggers don't work. I built a session tracking script and forgot to wire the hooks for 6 days. If it requires a human to remember, it won't happen.
221
+
222
+ **Why the workstreams layer?** Because pausing one project can silently block three others. Cascade warnings surface cross-project risks *before* they cause problems.
223
+
224
+ ## Requirements
225
+
226
+ - Python >= 3.9
227
+ - Claude Code (for the hooks integration)
228
+ - `gh` CLI (optional, for GitHub repo discovery)
229
+
230
+ ## License
231
+
232
+ MIT
@@ -0,0 +1,61 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "claude-ledger"
7
+ dynamic = ["version"]
8
+ description = "Portfolio-level project tracking for Claude Code"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ requires-python = ">=3.10"
12
+ authors = [
13
+ { name = "Rob Leach" },
14
+ ]
15
+ keywords = ["claude-code", "portfolio", "project-tracking", "ledger"]
16
+ classifiers = [
17
+ "Development Status :: 3 - Alpha",
18
+ "Environment :: Console",
19
+ "Intended Audience :: Developers",
20
+ "License :: OSI Approved :: MIT License",
21
+ "Programming Language :: Python :: 3",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Programming Language :: Python :: 3.13",
26
+ "Topic :: Software Development :: Build Tools",
27
+ "Topic :: Software Development :: Libraries",
28
+ ]
29
+ dependencies = [
30
+ "click>=8.0",
31
+ "python-frontmatter>=1.0",
32
+ "PyYAML>=6.0",
33
+ ]
34
+
35
+ [project.optional-dependencies]
36
+ dev = [
37
+ "pytest>=7.0",
38
+ "pytest-cov",
39
+ "ruff",
40
+ ]
41
+
42
+ [project.scripts]
43
+ claude-ledger = "claude_ledger.cli:cli"
44
+
45
+ [project.urls]
46
+ Homepage = "https://github.com/claude-ledger/claude-ledger"
47
+ Repository = "https://github.com/claude-ledger/claude-ledger"
48
+ Issues = "https://github.com/claude-ledger/claude-ledger/issues"
49
+
50
+ [tool.hatch.version]
51
+ path = "src/claude_ledger/__init__.py"
52
+
53
+ [tool.hatch.build.targets.wheel]
54
+ packages = ["src/claude_ledger"]
55
+
56
+ [tool.ruff]
57
+ target-version = "py310"
58
+ line-length = 100
59
+
60
+ [tool.pytest.ini_options]
61
+ testpaths = ["tests"]
@@ -0,0 +1,4 @@
1
+ """claude-ledger: Portfolio-level project tracking for Claude Code."""
2
+
3
+ __version__ = "0.1.0"
4
+ __all__ = ["__version__"]
@@ -0,0 +1,5 @@
1
+ """Support `python -m claude_ledger`."""
2
+
3
+ from claude_ledger.cli import cli
4
+
5
+ cli()