slopmeter 0.1.0

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.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Jean P.D. Meijer
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.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # slopmeter
2
+
3
+ `slopmeter` is a Node.js CLI that scans local Claude Code, Codex, and Open Code usage data and generates a contribution-style heatmap for the rolling past year.
4
+
5
+ ## Requirements
6
+
7
+ - Node.js `>=22`
8
+
9
+ ## Run with npm
10
+
11
+ Use it without installing:
12
+
13
+ ```bash
14
+ npx slopmeter
15
+ ```
16
+
17
+ Install it globally:
18
+
19
+ ```bash
20
+ npm install -g slopmeter
21
+ slopmeter
22
+ ```
23
+
24
+ ## Usage
25
+
26
+ ```bash
27
+ slopmeter [--claude] [--codex] [--opencode] [--dark] [--format png|svg|json] [--output ./heatmap-last-year.png]
28
+ ```
29
+
30
+ By default, the CLI:
31
+
32
+ - scans all supported providers
33
+ - writes `./heatmap-last-year.png`
34
+ - infers the date window as the rolling last year ending today
35
+
36
+ ## Options
37
+
38
+ - `--claude`: include only Claude Code data
39
+ - `--codex`: include only Codex data
40
+ - `--opencode`: include only Open Code data
41
+ - `--dark`: render the image with the dark theme
42
+ - `-f, --format <png|svg|json>`: choose the output format
43
+ - `-o, --output <path>`: write output to a custom path
44
+ - `-h, --help`: print the help text
45
+
46
+ ## Examples
47
+
48
+ Generate the default PNG:
49
+
50
+ ```bash
51
+ npx slopmeter
52
+ ```
53
+
54
+ Write an SVG:
55
+
56
+ ```bash
57
+ npx slopmeter --format svg --output ./out/heatmap.svg
58
+ ```
59
+
60
+ Write JSON for custom rendering:
61
+
62
+ ```bash
63
+ npx slopmeter --format json --output ./out/heatmap.json
64
+ ```
65
+
66
+ Render only Codex usage:
67
+
68
+ ```bash
69
+ npx slopmeter --codex
70
+ ```
71
+
72
+ Render a dark-theme SVG:
73
+
74
+ ```bash
75
+ npx slopmeter --dark --format svg --output ./out/heatmap-dark.svg
76
+ ```
77
+
78
+ ## Output behavior
79
+
80
+ - If `--format` is omitted, the format is inferred from the `--output` extension when possible.
81
+ - Supported extensions are `.png`, `.svg`, and `.json`.
82
+ - If neither `--format` nor a recognized output extension is provided, PNG is used.
83
+
84
+ ## Data locations
85
+
86
+ - Claude Code: `$CLAUDE_CONFIG_DIR/*/projects` or `~/.config/claude/projects`, `~/.claude/projects`
87
+ - Codex: `$CODEX_HOME/sessions` or `~/.codex/sessions`
88
+ - Open Code: `$OPENCODE_DATA_DIR/storage/message` or `~/.local/share/opencode/storage/message`
89
+
90
+ ## Exit behavior
91
+
92
+ - If no provider flags are passed, `slopmeter` renders every provider with available data.
93
+ - If provider flags are passed and a requested provider has no data, the command exits with an error.
94
+ - If no provider has data, the command exits with an error.
95
+
96
+ ## License
97
+
98
+ MIT
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }