lumira 0.6.1 → 0.7.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 +21 -0
- package/README.md +158 -71
- package/dist/commands/themes.d.ts +31 -0
- package/dist/commands/themes.js +152 -0
- package/dist/commands/themes.js.map +1 -0
- package/dist/config.js +8 -4
- package/dist/config.js.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/dist/render/powerline.d.ts +3 -1
- package/dist/render/powerline.js.map +1 -1
- package/dist/themes/catppuccin.d.ts +3 -0
- package/dist/themes/catppuccin.js +26 -0
- package/dist/themes/catppuccin.js.map +1 -0
- package/dist/themes/dracula.d.ts +3 -0
- package/dist/themes/dracula.js +26 -0
- package/dist/themes/dracula.js.map +1 -0
- package/dist/themes/gruvbox.d.ts +3 -0
- package/dist/themes/gruvbox.js +26 -0
- package/dist/themes/gruvbox.js.map +1 -0
- package/dist/themes/index.d.ts +17 -0
- package/dist/themes/index.js +64 -0
- package/dist/themes/index.js.map +1 -0
- package/dist/themes/monokai.d.ts +3 -0
- package/dist/themes/monokai.js +26 -0
- package/dist/themes/monokai.js.map +1 -0
- package/dist/themes/nord.d.ts +3 -0
- package/dist/themes/nord.js +26 -0
- package/dist/themes/nord.js.map +1 -0
- package/dist/themes/solarized.d.ts +3 -0
- package/dist/themes/solarized.js +26 -0
- package/dist/themes/solarized.js.map +1 -0
- package/dist/themes/tokyo-night.d.ts +3 -0
- package/dist/themes/tokyo-night.js +26 -0
- package/dist/themes/tokyo-night.js.map +1 -0
- package/dist/themes/types.d.ts +46 -0
- package/dist/themes/types.js +2 -0
- package/dist/themes/types.js.map +1 -0
- package/dist/themes/util.d.ts +19 -0
- package/dist/themes/util.js +93 -0
- package/dist/themes/util.js.map +1 -0
- package/dist/themes.d.ts +1 -52
- package/dist/themes.js +5 -258
- package/dist/themes.js.map +1 -1
- package/dist/tui/preview.d.ts +6 -0
- package/dist/tui/preview.js +6 -1
- package/dist/tui/preview.js.map +1 -1
- package/dist/types.d.ts +10 -1
- package/dist/types.js +10 -0
- package/dist/types.js.map +1 -1
- package/package.json +6 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-2026 Carlos Cativo
|
|
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
CHANGED
|
@@ -2,41 +2,99 @@
|
|
|
2
2
|
|
|
3
3
|
Real-time statusline plugin for [Claude Code](https://code.claude.com) and Qwen Code.
|
|
4
4
|
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
[](https://asciinema.org/a/apvjkloigO9hrdVA)
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx lumira install
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
Interactive wizard — preset, theme, icons — previewed live before write.
|
|
16
|
+
|
|
17
|
+
[](https://www.npmjs.com/package/lumira)
|
|
18
|
+
[](https://www.npmjs.com/package/lumira)
|
|
19
|
+
[](LICENSE)
|
|
20
|
+

|
|
5
21
|

|
|
22
|
+

|
|
23
|
+
[](https://github.com/cativo23/lumira/actions/workflows/ci.yml)
|
|
6
24
|

|
|
7
25
|

|
|
8
|
-
|
|
9
|
-
|
|
26
|
+
|
|
27
|
+
> 🚀 Powering hundreds of Claude Code sessions per week — [share yours](https://github.com/cativo23/lumira/discussions) in Discussions.
|
|
28
|
+
|
|
29
|
+
## Table of contents
|
|
30
|
+
|
|
31
|
+
- [Why lumira?](#why-lumira)
|
|
32
|
+
- [Requirements](#requirements)
|
|
33
|
+
- [Features](#features)
|
|
34
|
+
- [Install](#install)
|
|
35
|
+
- [Display modes](#display)
|
|
36
|
+
- [Themes](#themes)
|
|
37
|
+
- [Powerline](#powerline)
|
|
38
|
+
- [Configuration](#configuration)
|
|
39
|
+
- [Architecture](#architecture)
|
|
40
|
+
- [Development](#development)
|
|
41
|
+
- [Contributing](#contributing)
|
|
42
|
+
- [License](#license)
|
|
43
|
+
|
|
44
|
+
## Why lumira?
|
|
45
|
+
|
|
46
|
+
Claude Code's default statusline shows the model name and current directory. That's it. Lumira surfaces what actually changes during a session and what you'd want to react to:
|
|
47
|
+
|
|
48
|
+
- **Context-window pressure** — color-coded bar from green to blinking red, with a `/compact?` hint at high fill so you act before hitting the wall.
|
|
49
|
+
- **Burn rate** — `$/h` next to total cost, so a runaway agent shows up immediately.
|
|
50
|
+
- **Rate-limit countdown** — 5h/7d usage with reset countdown, so you stop guessing how much budget you have left.
|
|
51
|
+
- **Active tools, agents, and todo progress** — parsed from the live transcript, updated every render.
|
|
52
|
+
- **Cross-platform** — same config drives Claude Code and Qwen Code; Qwen sessions auto-collapse to single-line.
|
|
53
|
+
|
|
54
|
+
Inspired by [claude-hud](https://github.com/jarrodwatts/claude-hud); takes a different stance on opt-in powerline rendering, theme contrast guarantees, and hyperlinked metadata.
|
|
55
|
+
|
|
56
|
+
## Requirements
|
|
57
|
+
|
|
58
|
+
- **Node ≥18**
|
|
59
|
+
- **Nerd Font** (recommended) — for the `` `` `` `` ``◐`` icons throughout the statusline. Falls back to plain glyphs via `icons: emoji` or `icons: none`.
|
|
60
|
+
- **Truecolor terminal** (for themes / powerline) — auto-detected via `COLORTERM=truecolor`. 256-color terminals get a nearest-index projection; named-ANSI terminals fall back to default colors silently.
|
|
10
61
|
|
|
11
62
|
## Features
|
|
12
63
|
|
|
13
|
-
- **
|
|
14
|
-
- **Powerline mode**
|
|
15
|
-
- **OSC 8 hyperlinks** — clickable directory
|
|
16
|
-
- **7
|
|
17
|
-
- **
|
|
18
|
-
- **
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
- **
|
|
28
|
-
- **
|
|
29
|
-
- **
|
|
64
|
+
- **Context bar with thresholds** — green → yellow → orange → blinking red, plus an actionable `/compact?` hint when fill is high.
|
|
65
|
+
- **Powerline mode** + 7 separator presets (`arrow`, `flame`, `slant`, `round`, `diamond`, `compatible`, `plain`) across 3 lines.
|
|
66
|
+
- **OSC 8 hyperlinks** — clickable directory and version tag on iTerm2, WezTerm, Kitty, VS Code, Alacritty.
|
|
67
|
+
- **7 hand-curated themes** — `dracula`, `nord`, `tokyo-night`, `catppuccin`, `monokai`, `gruvbox`, `solarized`. WCAG AA contrast guaranteed in CI.
|
|
68
|
+
- **Token + cost metrics** — input/output counts, speed (tok/s), $ total + burn rate ($/h).
|
|
69
|
+
- **Auto-fits at <70 cols** — switches from 3-line custom mode to single-line minimal automatically.
|
|
70
|
+
- **Zero runtime dependencies** — Node 18+ only.
|
|
71
|
+
- **Dual-platform** — Claude Code and Qwen Code share the same config.
|
|
72
|
+
|
|
73
|
+
<details>
|
|
74
|
+
<summary>Everything else lumira shows</summary>
|
|
75
|
+
|
|
76
|
+
- **Git status** — branch + staged/modified/untracked counts, 5s TTL cache. Branch turns red on dirty repos in powerline mode.
|
|
77
|
+
- **Rate limits** — 5h/7d usage with color warnings and reset countdown.
|
|
78
|
+
- **Active agents** — running subagent count and types from the transcript.
|
|
79
|
+
- **GSD integration** — current task and update notifications (opt-in).
|
|
80
|
+
- **Config health widget** — surfaces silent fallbacks (theme/powerline degrading in named-ANSI, missing GSD STATE.md). Opt-in.
|
|
81
|
+
- **Memory usage** — process RSS percentage.
|
|
82
|
+
- **MCP server detection** — count of attached MCP servers per session.
|
|
83
|
+
- **Vim-mode hint, thinking effort, worktree, output style, session name** — all togglable per-field via `display.*`.
|
|
84
|
+
- **3-tier color system** — named ANSI / 256-color / truecolor, auto-detected.
|
|
85
|
+
- **Config-driven** — every feature toggleable via JSON config + CLI flags.
|
|
86
|
+
|
|
87
|
+
</details>
|
|
30
88
|
|
|
31
89
|
## Install
|
|
32
90
|
|
|
33
|
-
|
|
91
|
+
The wizard at the top is the fastest path. For the long form:
|
|
34
92
|
|
|
35
93
|
```bash
|
|
36
94
|
npx lumira install
|
|
37
95
|
```
|
|
38
96
|
|
|
39
|
-
The installer walks you through three choices — **preset** (`full` / `balanced` / `minimal`), **theme**, and **icons** — showing a live preview
|
|
97
|
+
The installer walks you through three choices — **preset** (`full` / `balanced` / `minimal`), **theme**, and **icons** — showing a live preview at each step. Press `Esc` to abort without writing anything. In non-interactive shells (piped stdin, CI), the installer skips the wizard and writes sensible defaults (`preset: balanced`, `icons: nerd`). If Qwen Code is detected (`~/.qwen/` exists), the `/lumira` skill is installed for both CLIs.
|
|
40
98
|
|
|
41
99
|
Or install globally:
|
|
42
100
|
|
|
@@ -73,7 +131,7 @@ If installed from source:
|
|
|
73
131
|
{
|
|
74
132
|
"statusLine": {
|
|
75
133
|
"type": "command",
|
|
76
|
-
"command": "node /path/to/
|
|
134
|
+
"command": "node /path/to/lumira/dist/index.js",
|
|
77
135
|
"padding": 0
|
|
78
136
|
}
|
|
79
137
|
}
|
|
@@ -83,27 +141,78 @@ If installed from source:
|
|
|
83
141
|
|
|
84
142
|
### Custom Mode (default, >=70 columns)
|
|
85
143
|
|
|
86
|
-
|
|
87
|
-
Opus 4.6 (1M context) │ main ⇡1 !2 │ my-project +150 -30 │ default │ v2.1.92
|
|
88
|
-
[████████░░░░░░░░░░░░] 21% │ 131k↑ 25k↓ │ $1.31 $2.24/h │ 35m06s │ 142 tok/s │ 72%(5h)
|
|
89
|
-
✓ Read ×3 | ✓ Edit ×2 | ✓ Bash ×5 │ ████████░░ 8/10 | ◐ 1 | ○ 1
|
|
90
|
-
```
|
|
144
|
+

|
|
91
145
|
|
|
92
146
|
### Minimal Mode (<70 columns or `--minimal`)
|
|
93
147
|
|
|
94
|
-
|
|
95
|
-
my-project | main | Opus 4.6 | ████░░░░░░░░░░░░░░░░ 21% | 131k↑ 25k↓ | $1.31
|
|
96
|
-
```
|
|
148
|
+

|
|
97
149
|
|
|
98
150
|
### Powerline Mode (opt-in via `style: "powerline"`)
|
|
99
151
|
|
|
152
|
+

|
|
153
|
+
|
|
154
|
+
Each segment renders with a distinct background color drawn from the active theme; segments are separated by a Nerd Font glyph (default ``). On dirty git repos the branch segment turns red. Falls back to classic mode silently in named-ANSI terminals (powerline needs RGB backgrounds). See [Powerline](#powerline) below for the 7 separator styles.
|
|
155
|
+
|
|
156
|
+
## Themes
|
|
157
|
+
|
|
158
|
+
Seven hand-curated themes, every one tested for WCAG AA contrast against white foreground in CI. Themes apply to both classic and powerline modes:
|
|
159
|
+
|
|
160
|
+
`dracula` · `nord` · `tokyo-night` · `catppuccin` · `monokai` · `gruvbox` · `solarized`
|
|
161
|
+
|
|
162
|
+
**Classic mode** — pipe-separated layout, theme colors applied to text:
|
|
163
|
+
|
|
164
|
+

|
|
165
|
+
|
|
166
|
+
**Powerline mode** — colored segment backgrounds with arrow separators:
|
|
167
|
+
|
|
168
|
+

|
|
169
|
+
|
|
170
|
+
Themes apply in truecolor and 256-color terminals; named-ANSI terminals fall back to default colors (8 base hues can't represent arbitrary palettes).
|
|
171
|
+
|
|
172
|
+
### Browse from the CLI
|
|
173
|
+
|
|
174
|
+
Try a theme without touching your config:
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
lumira themes # list all themes
|
|
178
|
+
lumira themes preview tokyo-night # render a sample
|
|
179
|
+
lumira themes preview nord --powerline # same in powerline (default arrow separator)
|
|
180
|
+
lumira themes preview gruvbox --style=flame # powerline with flame separator
|
|
181
|
+
lumira themes preview --all # render every theme in sequence
|
|
182
|
+
lumira themes preview --all --powerline # the powerline grid (great for screenshots)
|
|
100
183
|
```
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
184
|
+
|
|
185
|
+
### Want your favorite theme?
|
|
186
|
+
|
|
187
|
+
Adding a theme is a single new file plus a one-line registration. Every PR runs the **WCAG AA contrast guard** — if any powerline cell drops below 4.5:1 against the foreground, CI rejects it. See [CONTRIBUTING.md → Adding a theme](CONTRIBUTING.md#adding-a-theme) for the walkthrough.
|
|
188
|
+
|
|
189
|
+
## Powerline
|
|
190
|
+
|
|
191
|
+
`style: "powerline"` (or `--powerline`) renders the statusline with colored segment backgrounds and glyph separators inspired by powerline-go / oh-my-posh. Available separator presets via `powerline.style` (or `--powerline-style=<name>`):
|
|
192
|
+
|
|
193
|
+
| Style | Look |
|
|
194
|
+
|---|---|
|
|
195
|
+
| `arrow` | classic right-pointing triangle separator (default) |
|
|
196
|
+
| `flame` | wavy flame-shaped separator |
|
|
197
|
+
| `slant` | forward-slanting separator |
|
|
198
|
+
| `round` | rounded caps at line ends + thin internal separators |
|
|
199
|
+
| `diamond` | each segment isolated as its own pill with rounded caps |
|
|
200
|
+
| `compatible` | unicode `▶` separator (no Nerd Font required) |
|
|
201
|
+
| `plain` | no separator glyphs — just colored blocks |
|
|
202
|
+
| `auto` | picks `arrow` if Nerd Font icons are configured, else `compatible` |
|
|
203
|
+
|
|
204
|
+
### Hyperlinks (OSC 8)
|
|
205
|
+
|
|
206
|
+
The directory on line 1 becomes a clickable `file://` link, and the version tag links to its npm release page on terminals that support [OSC 8](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) (iTerm2, WezTerm, Kitty, Alacritty, VS Code terminal, tmux ≥3.4 with passthrough). Other terminals show plain text. Auto-disabled in `Apple_Terminal` (which leaks markers) and `TERM=dumb`.
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
NO_HYPERLINKS=1 claude # disable
|
|
210
|
+
FORCE_HYPERLINK=1 claude # force-enable (overrides denylist)
|
|
104
211
|
```
|
|
105
212
|
|
|
106
|
-
|
|
213
|
+
### Qwen Code
|
|
214
|
+
|
|
215
|
+
Lumira auto-detects the platform. In Qwen Code sessions, the renderer automatically switches to single-line output regardless of your configured layout — Qwen only displays the first statusline row, so lumira fits everything (model, branch, context bar, cost, cached tokens, thoughts) into one line. **No configuration needed:** the same `config.json` serves both Claude Code and Qwen Code.
|
|
107
216
|
|
|
108
217
|
## Configuration
|
|
109
218
|
|
|
@@ -165,42 +274,6 @@ lumira --icons=nerd|emoji|none # Override icon set
|
|
|
165
274
|
lumira --preset=full|balanced|minimal
|
|
166
275
|
```
|
|
167
276
|
|
|
168
|
-
## Powerline
|
|
169
|
-
|
|
170
|
-
`style: "powerline"` (or `--powerline`) renders the statusline with colored segment backgrounds and glyph separators inspired by powerline-go / oh-my-posh. Available separator presets via `powerline.style` (or `--powerline-style=<name>`):
|
|
171
|
-
|
|
172
|
-
| Style | Look |
|
|
173
|
-
|---|---|
|
|
174
|
-
| `arrow` | classic right-pointing triangle separator (default) |
|
|
175
|
-
| `flame` | wavy flame-shaped separator |
|
|
176
|
-
| `slant` | forward-slanting separator |
|
|
177
|
-
| `round` | rounded caps at line ends + thin internal separators |
|
|
178
|
-
| `diamond` | each segment isolated as its own pill with rounded caps |
|
|
179
|
-
| `compatible` | unicode `▶` separator (no Nerd Font required) |
|
|
180
|
-
| `plain` | no separator glyphs — just colored blocks |
|
|
181
|
-
| `auto` | picks `arrow` if Nerd Font icons are configured, else `compatible` |
|
|
182
|
-
|
|
183
|
-
### Themes
|
|
184
|
-
|
|
185
|
-
Pick one of the 7 built-in themes via `theme: "<name>"` in config or during `lumira install`:
|
|
186
|
-
|
|
187
|
-
`dracula` · `nord` · `tokyo-night` · `catppuccin` · `monokai` · `gruvbox` · `solarized`
|
|
188
|
-
|
|
189
|
-
Each theme ships with a hand-curated **powerline palette** (per-segment background colors) that meets WCAG AA contrast for white foreground. Themes apply in truecolor and 256-color terminals; named-ANSI terminals fall back to default colors (8 base hues can't represent arbitrary palettes).
|
|
190
|
-
|
|
191
|
-
### Hyperlinks (OSC 8)
|
|
192
|
-
|
|
193
|
-
The directory on line 1 becomes a clickable `file://` link, and the version tag links to its npm release page on terminals that support [OSC 8](https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda) (iTerm2, WezTerm, Kitty, Alacritty, VS Code terminal, tmux ≥3.4 with passthrough). Other terminals show plain text. Auto-disabled in `Apple_Terminal` (which leaks markers) and `TERM=dumb`.
|
|
194
|
-
|
|
195
|
-
```bash
|
|
196
|
-
NO_HYPERLINKS=1 claude # disable
|
|
197
|
-
FORCE_HYPERLINK=1 claude # force-enable (overrides denylist)
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### Qwen Code
|
|
201
|
-
|
|
202
|
-
Lumira auto-detects the platform. In Qwen Code sessions, the renderer automatically switches to single-line output regardless of your configured layout — Qwen only displays the first statusline row, so lumira fits everything (model, branch, context bar, cost, cached tokens, thoughts) into one line. **No configuration needed:** the same `config.json` serves both Claude Code and Qwen Code.
|
|
203
|
-
|
|
204
277
|
## Architecture
|
|
205
278
|
|
|
206
279
|
```text
|
|
@@ -235,10 +308,24 @@ Set `LUMIRA_DEBUG=1` to trace parser decisions on stderr — cache hits, GSD sta
|
|
|
235
308
|
LUMIRA_DEBUG=1 claude # or export LUMIRA_DEBUG=1
|
|
236
309
|
```
|
|
237
310
|
|
|
311
|
+
## Contributing
|
|
312
|
+
|
|
313
|
+
PRs welcome — particularly for new themes (one of the most common contribution paths). See [CONTRIBUTING.md](CONTRIBUTING.md) for the gitflow, theme submission walkthrough, and the contrast-guard CI step that runs on every theme PR.
|
|
314
|
+
|
|
315
|
+
### What's next
|
|
316
|
+
|
|
317
|
+
- **v0.7.0** — additional themes from the community, expanded `lumira themes` subcommand surface.
|
|
318
|
+
- **v1.0** — locked CLI flags surface, snapshot tests for layout regression, soak window before tagging stable. Tracked in [issue #36](https://github.com/cativo23/lumira/issues/36).
|
|
319
|
+
- **Backlog** — incremental transcript parsing for very large sessions ([PR #46](https://github.com/cativo23/lumira/pull/46), deferred until parser hardening lands).
|
|
320
|
+
|
|
321
|
+
For security issues, see [SECURITY.md](SECURITY.md).
|
|
322
|
+
|
|
238
323
|
## Credits
|
|
239
324
|
|
|
240
325
|
Inspired by [claude-hud](https://github.com/jarrodwatts/claude-hud). Migrated from [claude-setup](https://github.com/cativo23/claude-setup) statusline.
|
|
241
326
|
|
|
327
|
+
Theme palettes drawn from upstream specs: [Dracula](https://draculatheme.com), [Nord](https://www.nordtheme.com), [Tokyo Night](https://github.com/folke/tokyonight.nvim), [Catppuccin](https://catppuccin.com), [Monokai](https://monokai.pro), [Gruvbox](https://github.com/morhetz/gruvbox), [Solarized](https://ethanschoonover.com/solarized).
|
|
328
|
+
|
|
242
329
|
## License
|
|
243
330
|
|
|
244
|
-
MIT
|
|
331
|
+
MIT © [Carlos Cativo](https://github.com/cativo23) — see [LICENSE](LICENSE) for the full text.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type HudConfig, type PowerlineStyleName } from '../types.js';
|
|
2
|
+
interface ThemesArgs {
|
|
3
|
+
sub: 'list' | 'preview' | 'help';
|
|
4
|
+
themeName?: string;
|
|
5
|
+
powerline: boolean;
|
|
6
|
+
powerlineStyle?: PowerlineStyleName;
|
|
7
|
+
all: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Result of invoking the themes subcommand. Caller (typically `index.ts`)
|
|
11
|
+
* is responsible for writing each stream to the right fd and exiting with
|
|
12
|
+
* the indicated code. Splitting this out (vs returning a plain string)
|
|
13
|
+
* lets pipe / redirection workflows (`2>/dev/null`, `| grep`) work as
|
|
14
|
+
* users expect, and lets shell scripts detect failure via `$?`.
|
|
15
|
+
*/
|
|
16
|
+
export interface ThemesCommandResult {
|
|
17
|
+
stdout: string;
|
|
18
|
+
stderr: string;
|
|
19
|
+
exitCode: number;
|
|
20
|
+
}
|
|
21
|
+
export declare function parseThemesArgs(argv: string[]): ThemesArgs;
|
|
22
|
+
/**
|
|
23
|
+
* Returns the rendered output for `lumira themes [...]` along with a
|
|
24
|
+
* separate stderr buffer and an exit code. The caller wires these to the
|
|
25
|
+
* right streams and exits the process accordingly.
|
|
26
|
+
*
|
|
27
|
+
* The optional `cols` argument is the terminal width to render previews at;
|
|
28
|
+
* defaults to 120 when stdout has no detectable column count (e.g. piped).
|
|
29
|
+
*/
|
|
30
|
+
export declare function runThemesCommand(argv: string[], cols?: number): ThemesCommandResult;
|
|
31
|
+
export type { PowerlineStyleName, HudConfig };
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { THEMES } from '../themes.js';
|
|
2
|
+
import { buildPreview } from '../tui/preview.js';
|
|
3
|
+
import { detectColorMode } from '../render/colors.js';
|
|
4
|
+
import { sanitizeTermString } from '../normalize.js';
|
|
5
|
+
import { POWERLINE_STYLE_NAMES } from '../types.js';
|
|
6
|
+
/**
|
|
7
|
+
* One-line descriptions for `lumira themes list`. Lives next to the only
|
|
8
|
+
* consumer rather than in `themes.ts` so the renderer's module graph
|
|
9
|
+
* doesn't pull these strings.
|
|
10
|
+
*/
|
|
11
|
+
const THEME_DESCRIPTIONS = {
|
|
12
|
+
dracula: 'vampire dark — purple/pink accents',
|
|
13
|
+
nord: 'arctic muted polar palette',
|
|
14
|
+
'tokyo-night': 'Tokyo at night — purple/blue, high contrast',
|
|
15
|
+
catppuccin: 'pastel mocha — warm soft colors',
|
|
16
|
+
monokai: 'classic high-saturation dark',
|
|
17
|
+
gruvbox: 'retro warm earth tones',
|
|
18
|
+
solarized: 'accessibility-focused, high readability',
|
|
19
|
+
};
|
|
20
|
+
export function parseThemesArgs(argv) {
|
|
21
|
+
// argv is the full process.argv; the 'themes' command starts at argv[2],
|
|
22
|
+
// its sub-subcommand at argv[3], remaining flags from argv[4].
|
|
23
|
+
const subRaw = argv[3];
|
|
24
|
+
const sub = subRaw === 'preview' ? 'preview' :
|
|
25
|
+
subRaw === 'help' || subRaw === '--help' || subRaw === '-h' ? 'help' :
|
|
26
|
+
'list';
|
|
27
|
+
let themeName;
|
|
28
|
+
let powerline = false;
|
|
29
|
+
let powerlineStyle;
|
|
30
|
+
let all = false;
|
|
31
|
+
for (let i = 4; i < argv.length; i++) {
|
|
32
|
+
const arg = argv[i];
|
|
33
|
+
if (arg === '--powerline') {
|
|
34
|
+
powerline = true;
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
if (arg === '--all') {
|
|
38
|
+
all = true;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
const styleMatch = arg.match(/^--style=(.+)$/);
|
|
42
|
+
if (styleMatch && POWERLINE_STYLE_NAMES.includes(styleMatch[1])) {
|
|
43
|
+
powerline = true;
|
|
44
|
+
powerlineStyle = styleMatch[1];
|
|
45
|
+
continue;
|
|
46
|
+
}
|
|
47
|
+
// Unknown --flag is silently ignored to stay forward-compatible if a
|
|
48
|
+
// future minor adds a new flag and an old binary sees it. Positional
|
|
49
|
+
// tokens become themeName (first non-flag wins).
|
|
50
|
+
if (!arg.startsWith('--') && !themeName) {
|
|
51
|
+
themeName = arg;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return { sub, themeName, powerline, powerlineStyle, all };
|
|
55
|
+
}
|
|
56
|
+
function listText() {
|
|
57
|
+
const names = Object.keys(THEMES);
|
|
58
|
+
const longest = Math.max(...names.map(n => n.length));
|
|
59
|
+
let out = `Available themes (${names.length}):\n\n`;
|
|
60
|
+
for (const name of names) {
|
|
61
|
+
const desc = THEME_DESCRIPTIONS[name] ?? '';
|
|
62
|
+
out += ` ${name.padEnd(longest + 2)}${desc}\n`;
|
|
63
|
+
}
|
|
64
|
+
out += "\nUse 'lumira themes preview <name>' to render a sample.\n";
|
|
65
|
+
out += 'Add --powerline (optionally --style=<name>) for the powerline style,\n';
|
|
66
|
+
out += "or --all to preview every theme in one shot (great for screenshots).\n";
|
|
67
|
+
return out;
|
|
68
|
+
}
|
|
69
|
+
function helpText() {
|
|
70
|
+
return [
|
|
71
|
+
'lumira themes — list, describe, and preview built-in themes',
|
|
72
|
+
'',
|
|
73
|
+
'USAGE',
|
|
74
|
+
' lumira themes [list] List all themes (default)',
|
|
75
|
+
' lumira themes preview <name> Render a sample with <name>',
|
|
76
|
+
' lumira themes preview <name> --powerline Render with powerline style',
|
|
77
|
+
' lumira themes preview <name> --style=<x> Powerline + specific separator',
|
|
78
|
+
' lumira themes preview --all [--powerline] Render every theme in sequence',
|
|
79
|
+
'',
|
|
80
|
+
'THEMES',
|
|
81
|
+
` ${Object.keys(THEMES).join(', ')}`,
|
|
82
|
+
'',
|
|
83
|
+
'POWERLINE STYLES',
|
|
84
|
+
` ${POWERLINE_STYLE_NAMES.join(', ')}`,
|
|
85
|
+
'',
|
|
86
|
+
].join('\n');
|
|
87
|
+
}
|
|
88
|
+
function previewBlock(name, args, cols) {
|
|
89
|
+
const opts = {
|
|
90
|
+
preset: 'full',
|
|
91
|
+
theme: name,
|
|
92
|
+
icons: 'nerd',
|
|
93
|
+
colorMode: detectColorMode(),
|
|
94
|
+
cols,
|
|
95
|
+
};
|
|
96
|
+
if (args.powerline) {
|
|
97
|
+
opts.style = 'powerline';
|
|
98
|
+
opts.powerlineStyle = args.powerlineStyle ?? 'auto';
|
|
99
|
+
}
|
|
100
|
+
const banner = `── ${name}${args.powerline ? ` · powerline${args.powerlineStyle ? ` (${args.powerlineStyle})` : ''}` : ''}`;
|
|
101
|
+
return `${banner}\n${buildPreview(opts)}\n`;
|
|
102
|
+
}
|
|
103
|
+
/** Reject themes lookups that would otherwise bypass the unknown-theme guard
|
|
104
|
+
* via prototype chain (`__proto__`, `constructor`, etc). */
|
|
105
|
+
function isKnownTheme(name) {
|
|
106
|
+
return Object.prototype.hasOwnProperty.call(THEMES, name);
|
|
107
|
+
}
|
|
108
|
+
function ok(stdout) {
|
|
109
|
+
return { stdout, stderr: '', exitCode: 0 };
|
|
110
|
+
}
|
|
111
|
+
function err(stderr) {
|
|
112
|
+
return { stdout: '', stderr, exitCode: 1 };
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns the rendered output for `lumira themes [...]` along with a
|
|
116
|
+
* separate stderr buffer and an exit code. The caller wires these to the
|
|
117
|
+
* right streams and exits the process accordingly.
|
|
118
|
+
*
|
|
119
|
+
* The optional `cols` argument is the terminal width to render previews at;
|
|
120
|
+
* defaults to 120 when stdout has no detectable column count (e.g. piped).
|
|
121
|
+
*/
|
|
122
|
+
export function runThemesCommand(argv, cols) {
|
|
123
|
+
const args = parseThemesArgs(argv);
|
|
124
|
+
// Floor the preview width at 40 cols so a pathological `tput cols` of 1
|
|
125
|
+
// (or a piped output that erroneously passes 0) doesn't produce empty
|
|
126
|
+
// line truncations. 40 is the narrowest width any built-in renderer
|
|
127
|
+
// claims to support cleanly.
|
|
128
|
+
const previewCols = Math.max(40, cols ?? 120);
|
|
129
|
+
if (args.sub === 'help')
|
|
130
|
+
return ok(helpText());
|
|
131
|
+
if (args.sub === 'list')
|
|
132
|
+
return ok(listText());
|
|
133
|
+
// sub === 'preview'
|
|
134
|
+
if (args.all) {
|
|
135
|
+
return ok(Object.keys(THEMES).map(n => previewBlock(n, args, previewCols)).join('\n'));
|
|
136
|
+
}
|
|
137
|
+
if (!args.themeName) {
|
|
138
|
+
return err('lumira themes preview: missing theme name.\n\n'
|
|
139
|
+
+ "Use 'lumira themes list' to see available themes,\n"
|
|
140
|
+
+ "or 'lumira themes preview --all' to render all of them.\n");
|
|
141
|
+
}
|
|
142
|
+
// Sanitize for the error banner: a malicious shell alias could pass an
|
|
143
|
+
// argv containing terminal control sequences which would render directly
|
|
144
|
+
// into the user's terminal otherwise.
|
|
145
|
+
const safeName = sanitizeTermString(args.themeName);
|
|
146
|
+
if (!isKnownTheme(args.themeName)) {
|
|
147
|
+
return err(`lumira themes preview: unknown theme "${safeName}".\n\n`
|
|
148
|
+
+ `Available: ${Object.keys(THEMES).join(', ')}\n`);
|
|
149
|
+
}
|
|
150
|
+
return ok(previewBlock(args.themeName, args, previewCols));
|
|
151
|
+
}
|
|
152
|
+
//# sourceMappingURL=themes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themes.js","sourceRoot":"","sources":["../../src/commands/themes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,YAAY,EAAoB,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAA2C,MAAM,aAAa,CAAC;AAE7F;;;;GAIG;AACH,MAAM,kBAAkB,GAA2B;IACjD,OAAO,EAAE,oCAAoC;IAC7C,IAAI,EAAE,4BAA4B;IAClC,aAAa,EAAE,6CAA6C;IAC5D,UAAU,EAAE,iCAAiC;IAC7C,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,wBAAwB;IACjC,SAAS,EAAE,yCAAyC;CACrD,CAAC;AAuBF,MAAM,UAAU,eAAe,CAAC,IAAc;IAC5C,yEAAyE;IACzE,+DAA+D;IAC/D,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,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AC/C,IAAI,IAAI,CAAC,GAAG,KAAK,MAAM;QAAE,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC;IAE/C,oBAAoB;IACpB,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,OAAO,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACzF,CAAC;IAED,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;QACpB,OAAO,GAAG,CACR,gDAAgD;cAC9C,qDAAqD;cACrD,2DAA2D,CAC9D,CAAC;IACJ,CAAC;IAED,uEAAuE;IACvE,yEAAyE;IACzE,sCAAsC;IACtC,MAAM,QAAQ,GAAG,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAEpD,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,CAAC;QAClC,OAAO,GAAG,CACR,yCAAyC,QAAQ,QAAQ;cACvD,cAAc,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CACnD,CAAC;IACJ,CAAC;IAED,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,SAAS,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC;AAC7D,CAAC"}
|
package/dist/config.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readFileSync, existsSync, writeFileSync, renameSync, mkdirSync } from 'node:fs';
|
|
2
2
|
import { join, dirname } from 'node:path';
|
|
3
3
|
import { homedir } from 'node:os';
|
|
4
|
-
import { DEFAULT_CONFIG, DEFAULT_DISPLAY } from './types.js';
|
|
4
|
+
import { DEFAULT_CONFIG, DEFAULT_DISPLAY, POWERLINE_STYLE_NAMES } from './types.js';
|
|
5
5
|
// Module-level flag: fires the qwen→minimal deprecation warning once per
|
|
6
6
|
// Node process. Process-scoped by design — tests must run in forked workers
|
|
7
7
|
// (see vitest.config.ts `pool: 'forks'`). Issue #20.
|
|
@@ -57,8 +57,7 @@ function mergeConfig(rawIn) {
|
|
|
57
57
|
result.style = raw.style;
|
|
58
58
|
if (raw.powerline && typeof raw.powerline === 'object') {
|
|
59
59
|
const plRaw = raw.powerline;
|
|
60
|
-
|
|
61
|
-
if (validPlStyles.includes(plRaw.style)) {
|
|
60
|
+
if (POWERLINE_STYLE_NAMES.includes(plRaw.style)) {
|
|
62
61
|
result.powerline = { style: plRaw.style };
|
|
63
62
|
}
|
|
64
63
|
}
|
|
@@ -143,7 +142,12 @@ export function mergeCliFlags(config, argv) {
|
|
|
143
142
|
r.icons = iconsMatch[1];
|
|
144
143
|
continue;
|
|
145
144
|
}
|
|
146
|
-
|
|
145
|
+
// Build the alternation from POWERLINE_STYLE_NAMES so this regex stays
|
|
146
|
+
// in sync when a new style is added — single source of truth in types.ts.
|
|
147
|
+
// Escape regex metacharacters defensively in case a future style name
|
|
148
|
+
// ever contains one (today they're all `[a-z]+`, but the safety is free).
|
|
149
|
+
const escaped = POWERLINE_STYLE_NAMES.map(n => n.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'));
|
|
150
|
+
const plStyleMatch = arg.match(new RegExp(`^--powerline-style[= ](${escaped.join('|')})$`));
|
|
147
151
|
if (plStyleMatch) {
|
|
148
152
|
r.style = 'powerline';
|
|
149
153
|
r.powerline = { ...(r.powerline ?? {}), style: plStyleMatch[1] };
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzF,OAAO,EAAE,IAAI,EAAE,OAAO,EAA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EAAE,CAAC;gBACnE,QAAQ,GAAG,MAAiC,CAAC;YAC/C,CAAC;QACH,CAAC;QAAC,MAAM,CAAC;YACP,QAAQ,GAAG,EAAE,CAAC;QAChB,CAAC;IACH,CAAC;IAED,MAAM,MAAM,GAA4B,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC;IACpG,IAAI,MAAM,CAAC,KAAK,KAAK,SAAS;QAAE,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;;QACvD,OAAO,MAAM,CAAC,KAAK,CAAC;IAEzB,MAAM,GAAG,GAAG,UAAU,GAAG,MAAM,CAAC;IAChC,aAAa,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC5E,UAAU,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { loadConfig, mergeCliFlags } from './config.js';
|
|
|
15
15
|
import { render } from './render/index.js';
|
|
16
16
|
import { resolveIcons } from './render/icons.js';
|
|
17
17
|
import { install, uninstall } from './installer.js';
|
|
18
|
+
import { runThemesCommand } from './commands/themes.js';
|
|
18
19
|
import { EMPTY_TRANSCRIPT } from './types.js';
|
|
19
20
|
import { normalize } from './normalize.js';
|
|
20
21
|
const defaultDeps = {
|
|
@@ -72,6 +73,15 @@ if (isDirectRun()) {
|
|
|
72
73
|
const o = uninstall();
|
|
73
74
|
process.stdout.write(o);
|
|
74
75
|
}
|
|
76
|
+
else if (cmd === 'themes') {
|
|
77
|
+
const r = runThemesCommand(process.argv, process.stdout.columns);
|
|
78
|
+
if (r.stdout)
|
|
79
|
+
process.stdout.write(r.stdout);
|
|
80
|
+
if (r.stderr)
|
|
81
|
+
process.stderr.write(r.stderr);
|
|
82
|
+
if (r.exitCode !== 0)
|
|
83
|
+
process.exit(r.exitCode);
|
|
84
|
+
}
|
|
75
85
|
else {
|
|
76
86
|
main().then(o => process.stdout.write(o)).catch(e => { if (!(e instanceof SyntaxError))
|
|
77
87
|
process.stderr.write(`Statusline error: ${e.message}\n`); });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],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AC,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC,YAAY,WAAW,CAAC;YAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACvJ,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ColorMode } from './colors.js';
|
|
2
2
|
import { type RGB } from '../themes.js';
|
|
3
|
+
import type { PowerlineStyleName as CanonicalName } from '../types.js';
|
|
3
4
|
export interface PowerlineSegment {
|
|
4
5
|
text: string;
|
|
5
6
|
icon?: string;
|
|
@@ -8,7 +9,8 @@ export interface PowerlineSegment {
|
|
|
8
9
|
/** Lower = dropped first when terminal width is exceeded. */
|
|
9
10
|
priority: number;
|
|
10
11
|
}
|
|
11
|
-
|
|
12
|
+
/** Aliased from types.ts so types.ts is the single source of truth. */
|
|
13
|
+
export type PowerlineStyleName = CanonicalName;
|
|
12
14
|
interface Style {
|
|
13
15
|
leftCap?: string;
|
|
14
16
|
sep?: string;
|