ai-battery 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.
@@ -0,0 +1,37 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1040" height="150" viewBox="0 0 1040 150" role="img" aria-labelledby="title desc">
2
+ <title id="title">Claude statusLine preview</title>
3
+ <desc id="desc">A two-line Claude statusLine preview showing context remaining and colored AI Battery bars.</desc>
4
+ <rect width="1040" height="150" rx="8" fill="#111318"/>
5
+ <rect x="1" y="1" width="1038" height="148" rx="7" fill="none" stroke="#2a2f3a"/>
6
+ <defs>
7
+ <pattern id="greenShade" width="4" height="4" patternUnits="userSpaceOnUse">
8
+ <rect width="4" height="4" fill="#18251d"/>
9
+ <circle cx="1" cy="1" r="0.7" fill="#315c3d"/>
10
+ <circle cx="3" cy="3" r="0.7" fill="#315c3d"/>
11
+ </pattern>
12
+ </defs>
13
+ <g font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="18">
14
+ <text x="24" y="54" fill="#8b949e">Opus high · ~/Projects · main</text>
15
+ <text x="828" y="54" fill="#8b949e">83% context left</text>
16
+ <text x="24" y="105" fill="#8b949e">Codex</text>
17
+ <g shape-rendering="crispEdges">
18
+ <rect x="92" y="88" width="100" height="18" fill="url(#greenShade)"/>
19
+ <rect x="92" y="88" width="70" height="18" fill="#4ade80"/>
20
+ </g>
21
+ <text x="204" y="105" fill="#8b949e">71%</text>
22
+ <text x="250" y="105" fill="#8b949e">│</text>
23
+ <text x="272" y="105" fill="#8b949e">5h 00:47</text>
24
+ <text x="365" y="105" fill="#8b949e">│</text>
25
+ <text x="388" y="105" fill="#8b949e">7d 90%</text>
26
+ <text x="500" y="105" fill="#f2f2f2">Claude</text>
27
+ <g shape-rendering="crispEdges">
28
+ <rect x="585" y="88" width="100" height="18" fill="url(#greenShade)"/>
29
+ <rect x="585" y="88" width="80" height="18" fill="#4ade80"/>
30
+ </g>
31
+ <text x="697" y="105" fill="#f2f2f2">76%</text>
32
+ <text x="743" y="105" fill="#8b949e">│</text>
33
+ <text x="765" y="105" fill="#f2f2f2">5h 00:47</text>
34
+ <text x="858" y="105" fill="#8b949e">│</text>
35
+ <text x="881" y="105" fill="#f2f2f2">7d 59%</text>
36
+ </g>
37
+ </svg>
@@ -0,0 +1,44 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1040" height="118" viewBox="0 0 1040 118" role="img" aria-labelledby="title desc">
2
+ <title id="title">AI Battery terminal preview</title>
3
+ <desc id="desc">A terminal preview showing Codex with a green battery bar and Claude with a red battery bar.</desc>
4
+ <rect width="1040" height="118" rx="8" fill="#111318"/>
5
+ <rect x="1" y="1" width="1038" height="116" rx="7" fill="none" stroke="#2a2f3a"/>
6
+ <defs>
7
+ <pattern id="greenShade" width="4" height="4" patternUnits="userSpaceOnUse">
8
+ <rect width="4" height="4" fill="#18251d"/>
9
+ <circle cx="1" cy="1" r="0.7" fill="#315c3d"/>
10
+ <circle cx="3" cy="3" r="0.7" fill="#315c3d"/>
11
+ </pattern>
12
+ <pattern id="redShade" width="4" height="4" patternUnits="userSpaceOnUse">
13
+ <rect width="4" height="4" fill="#29191d"/>
14
+ <circle cx="1" cy="1" r="0.7" fill="#7f3038"/>
15
+ <circle cx="3" cy="3" r="0.7" fill="#7f3038"/>
16
+ </pattern>
17
+ </defs>
18
+ <circle cx="24" cy="22" r="5" fill="#ff5f57"/>
19
+ <circle cx="42" cy="22" r="5" fill="#ffbd2e"/>
20
+ <circle cx="60" cy="22" r="5" fill="#28c840"/>
21
+ <g font-family="ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace" font-size="18">
22
+ <text x="24" y="70" fill="#f2f2f2">Codex</text>
23
+ <g shape-rendering="crispEdges">
24
+ <rect x="92" y="53" width="100" height="18" fill="url(#greenShade)"/>
25
+ <rect x="92" y="53" width="90" height="18" fill="#4ade80"/>
26
+ </g>
27
+ <text x="204" y="70" fill="#f2f2f2">86%</text>
28
+ <text x="250" y="70" fill="#8b949e">│</text>
29
+ <text x="272" y="70" fill="#f2f2f2">5h 18:09</text>
30
+ <text x="365" y="70" fill="#8b949e">│</text>
31
+ <text x="388" y="70" fill="#f2f2f2">7d 82%</text>
32
+ <text x="480" y="70" fill="#8b949e">┃</text>
33
+ <text x="505" y="70" fill="#8b949e">Claude</text>
34
+ <g shape-rendering="crispEdges">
35
+ <rect x="590" y="53" width="100" height="18" fill="url(#redShade)"/>
36
+ <rect x="590" y="53" width="10" height="18" fill="#ff5c5c"/>
37
+ </g>
38
+ <text x="702" y="70" fill="#8b949e">4%</text>
39
+ <text x="748" y="70" fill="#8b949e">│</text>
40
+ <text x="770" y="70" fill="#8b949e">5h 18:10</text>
41
+ <text x="863" y="70" fill="#8b949e">│</text>
42
+ <text x="886" y="70" fill="#8b949e">7d 71%</text>
43
+ </g>
44
+ </svg>
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "ai-battery",
3
+ "version": "0.1.0",
4
+ "description": "Tiny terminal battery meter for local Codex and Claude Code usage.",
5
+ "type": "module",
6
+ "keywords": [
7
+ "ai",
8
+ "battery",
9
+ "codex",
10
+ "claude",
11
+ "statusline",
12
+ "tui",
13
+ "usage"
14
+ ],
15
+ "bin": {
16
+ "ai-battery": "bin/ai-battery.js",
17
+ "ai-battery-hud": "bin/ai-battery-hud.js",
18
+ "ai-battery-run": "bin/ai-battery-run",
19
+ "claudex-battery": "bin/ai-battery.js",
20
+ "claudex-battery-hud": "bin/ai-battery-hud.js",
21
+ "claudex-battery-run": "bin/ai-battery-run"
22
+ },
23
+ "files": [
24
+ "bin/ai-battery.js",
25
+ "bin/ai-battery-run",
26
+ "bin/ai-battery-hud",
27
+ "bin/ai-battery-hud.js",
28
+ "bin/ai-battery-hud.ps1",
29
+ "docs/*.svg",
30
+ "README.md"
31
+ ],
32
+ "scripts": {
33
+ "start": "node ./bin/ai-battery.js",
34
+ "check": "node --check ./bin/ai-battery.js"
35
+ },
36
+ "engines": {
37
+ "node": ">=18"
38
+ },
39
+ "license": "MIT",
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "git+https://github.com/hojin-v/ai-battery.git"
43
+ },
44
+ "bugs": {
45
+ "url": "https://github.com/hojin-v/ai-battery/issues"
46
+ },
47
+ "homepage": "https://github.com/hojin-v/ai-battery#readme"
48
+ }