space-statusline 0.1.0 → 0.1.1
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/README.md +63 -62
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,90 +1,91 @@
|
|
|
1
1
|
# space-statusline
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[Claude Code](https://claude.com/claude-code), **
|
|
3
|
+
A **space-synthwave** ("Outrun Horizon") status line for
|
|
4
|
+
[Claude Code](https://claude.com/claude-code), **configured through a CLI wizard**.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
**Node + TypeScript** · **
|
|
6
|
+
Rendering runs in **bash** (fast, no cold-start) · configuration is done in
|
|
7
|
+
**Node + TypeScript** · **24-bit truecolor** · **Nerd Font** glyphs with a Unicode
|
|
8
|
+
fallback.
|
|
8
9
|
|
|
9
|
-
##
|
|
10
|
+
## What it looks like
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
Three lines (in `multi` mode, the default):
|
|
12
13
|
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3.
|
|
14
|
+
1. Directory + git status (branch, new/modified files, ahead/behind).
|
|
15
|
+
2. A horizon rule with a synthwave gradient.
|
|
16
|
+
3. Model · context bar · cost · tokens · clock.
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
There is also a **single-line** mode (`single`).
|
|
18
19
|
|
|
19
|
-
##
|
|
20
|
+
## Requirements
|
|
20
21
|
|
|
21
22
|
- [Claude Code](https://claude.com/claude-code).
|
|
22
|
-
- `bash` 4+, `jq
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
- `bash` 4+, `jq`, and `git` for rendering (the wizard needs Node ≥ 20).
|
|
24
|
+
- A **Nerd Font** (e.g. Cascadia Code NF) and a **truecolor** terminal for the full
|
|
25
|
+
look. Fallbacks exist: without `jq` it drops to a minimal line; with Unicode glyphs
|
|
26
|
+
no Nerd Font is needed; without truecolor it degrades to 256 colors.
|
|
26
27
|
|
|
27
|
-
##
|
|
28
|
+
## Installation
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
From npm:
|
|
30
31
|
|
|
31
32
|
```bash
|
|
32
|
-
pnpm dlx space-statusline init # wizard +
|
|
33
|
-
#
|
|
33
|
+
pnpm dlx space-statusline init # wizard + option to install into Claude Code
|
|
34
|
+
# or install globally:
|
|
34
35
|
pnpm add -g space-statusline && space-statusline init
|
|
35
36
|
```
|
|
36
37
|
|
|
37
|
-
|
|
38
|
+
From source:
|
|
38
39
|
|
|
39
40
|
```bash
|
|
40
|
-
git clone
|
|
41
|
+
git clone https://github.com/Oscaraag/Space-Statusline.git && cd Space-Statusline
|
|
41
42
|
pnpm install && pnpm build
|
|
42
43
|
node dist/cli.js init
|
|
43
44
|
```
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
The wizard writes the config and offers to **install itself into Claude Code** (it only
|
|
47
|
+
manages the `statusLine` key of `~/.claude/settings.json`, with a backup; it never
|
|
48
|
+
touches permission keys).
|
|
47
49
|
|
|
48
|
-
##
|
|
50
|
+
## Usage
|
|
49
51
|
|
|
50
|
-
|
|
|
52
|
+
| Command | What it does |
|
|
51
53
|
|---|---|
|
|
52
|
-
| `init` |
|
|
53
|
-
| `config` | Re-
|
|
54
|
-
| `theme <name>` |
|
|
55
|
-
| `install` |
|
|
56
|
-
| `uninstall` |
|
|
57
|
-
| `preview` |
|
|
58
|
-
| `doctor` |
|
|
54
|
+
| `init` | Full wizard (theme, sections, glyphs, layout, preview) + option to install. |
|
|
55
|
+
| `config` | Re-runs the wizard to edit the existing config. |
|
|
56
|
+
| `theme <name>` | Quick preset switch: `outrun-horizon`, `sunset`, `vaporwave`, `mono`. |
|
|
57
|
+
| `install` | Connects the status line to Claude Code (safe merge of `settings.json`). |
|
|
58
|
+
| `uninstall` | Removes the `statusLine` entry (leaves a backup). |
|
|
59
|
+
| `preview` | Renders with sample input so you can see the result. |
|
|
60
|
+
| `doctor` | Checks `jq`, `git`, truecolor support, and Nerd Font. |
|
|
59
61
|
|
|
60
|
-
##
|
|
62
|
+
## Configuration
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
ajustar:
|
|
64
|
+
The config lives at `~/.config/space-statusline/config.json` (XDG path; overridable with
|
|
65
|
+
`$SPACE_STATUSLINE_CONFIG`). The schema is validated with `zod` and lets you tune:
|
|
65
66
|
|
|
66
|
-
- **
|
|
67
|
-
- **
|
|
68
|
-
`clock`)
|
|
69
|
-
- **
|
|
70
|
-
- **Layout** — `multi`/`single`,
|
|
71
|
-
|
|
72
|
-
- **
|
|
67
|
+
- **Theme** — a preset or a custom gradient (start/end hex) plus the color palette.
|
|
68
|
+
- **Sections** — which to show (`dir`, `git`, `model`, `context`, `cost`, `tokens`,
|
|
69
|
+
`clock`) and in what order.
|
|
70
|
+
- **Glyphs** — `nerdfont` or `unicode`, customizable.
|
|
71
|
+
- **Layout** — `multi`/`single`, separator, horizon and context-bar widths, uppercase,
|
|
72
|
+
clock format (strftime).
|
|
73
|
+
- **Thresholds** — context percentages for the warn/danger colors.
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
The bash runtime reads that JSON on every render; if it is missing or invalid, it falls
|
|
76
|
+
back to embedded defaults.
|
|
75
77
|
|
|
76
|
-
##
|
|
78
|
+
## Themes
|
|
77
79
|
|
|
78
|
-
`outrun-horizon` (default,
|
|
79
|
-
`vaporwave` (
|
|
80
|
-
wizard.
|
|
80
|
+
`outrun-horizon` (default, violet→magenta) · `sunset` (warm, orange→pink) ·
|
|
81
|
+
`vaporwave` (cool, cyan→violet) · `mono` (minimal, greys). Plus `custom` from the wizard.
|
|
81
82
|
|
|
82
|
-
##
|
|
83
|
+
## Recommended terminal (Windows Terminal)
|
|
83
84
|
|
|
84
|
-
|
|
85
|
-
**
|
|
85
|
+
To get the gradient and glyphs looking their best, use **CaskaydiaCove Nerd Font** and
|
|
86
|
+
the **Outrun Horizon** color scheme.
|
|
86
87
|
|
|
87
|
-
1.
|
|
88
|
+
1. Add this scheme to Windows Terminal's `settings.json`, inside `"schemes"`:
|
|
88
89
|
|
|
89
90
|
```json
|
|
90
91
|
{
|
|
@@ -112,7 +113,7 @@ Para que el gradiente y los glifos se vean como en la captura, usá
|
|
|
112
113
|
}
|
|
113
114
|
```
|
|
114
115
|
|
|
115
|
-
2.
|
|
116
|
+
2. Apply it in `"defaults"` (affects every profile) or in a single profile:
|
|
116
117
|
|
|
117
118
|
```json
|
|
118
119
|
"defaults": {
|
|
@@ -123,14 +124,14 @@ Para que el gradiente y los glifos se vean como en la captura, usá
|
|
|
123
124
|
}
|
|
124
125
|
```
|
|
125
126
|
|
|
126
|
-
##
|
|
127
|
+
## How it works
|
|
127
128
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
Rendering stays in **bash + jq** because Claude Code invokes it very often and starting
|
|
130
|
+
Node on every render would add cold-start latency. The wizard (Node/TS) **does not
|
|
131
|
+
reimplement rendering**: it only edits the JSON config that bash consumes. That file is
|
|
132
|
+
the bridge between the two. The render targets < 50 ms.
|
|
132
133
|
|
|
133
|
-
##
|
|
134
|
+
## Development
|
|
134
135
|
|
|
135
136
|
```bash
|
|
136
137
|
pnpm install
|
|
@@ -139,12 +140,12 @@ pnpm typecheck # tsc --noEmit
|
|
|
139
140
|
pnpm lint # eslint
|
|
140
141
|
```
|
|
141
142
|
|
|
142
|
-
|
|
143
|
+
Run the runtime directly:
|
|
143
144
|
|
|
144
145
|
```bash
|
|
145
146
|
echo '{"model":{"display_name":"Opus 4.1"},"workspace":{"current_dir":"'"$PWD"'"},"context_window":{"used_percentage":58},"cost":{"total_cost_usd":1.24}}' | bash runtime/statusline.sh
|
|
146
147
|
```
|
|
147
148
|
|
|
148
|
-
##
|
|
149
|
+
## License
|
|
149
150
|
|
|
150
|
-
MIT —
|
|
151
|
+
MIT — see [`LICENSE`](./LICENSE).
|
package/package.json
CHANGED