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.
Files changed (2) hide show
  1. package/README.md +63 -62
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,90 +1,91 @@
1
1
  # space-statusline
2
2
 
3
- Un status line **space-synthwave** ("Outrun Horizon") para
4
- [Claude Code](https://claude.com/claude-code), **configurable mediante un wizard CLI**.
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
- El render corre en **bash** (rápido, sin cold-start) · la configuración se hace en
7
- **Node + TypeScript** · **truecolor 24-bit** · glifos **Nerd Font** con fallback Unicode.
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
- ## Cómo se ve
10
+ ## What it looks like
10
11
 
11
- Tres líneas (en modo `multi`, el default):
12
+ Three lines (in `multi` mode, the default):
12
13
 
13
- 1. Directorio + estado de git (rama, archivos nuevos/modificados, ahead/behind).
14
- 2. Regla-horizonte con gradiente synthwave.
15
- 3. Modelo · barra de contexto · costo · tokens · hora.
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
- También hay un modo de **una sola línea** (`single`).
18
+ There is also a **single-line** mode (`single`).
18
19
 
19
- ## Requisitos
20
+ ## Requirements
20
21
 
21
22
  - [Claude Code](https://claude.com/claude-code).
22
- - `bash` 4+, `jq` y `git` para el render (el wizard necesita Node ≥ 20).
23
- - Una **Nerd Font** (p. ej. Cascadia Code NF) y una terminal con **truecolor** para la
24
- estética completa. Hay fallbacks: sin `jq` cae a una línea mínima; con glifos
25
- Unicode no hace falta Nerd Font; sin truecolor degrada a 256 colores.
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
- ## Instalación
28
+ ## Installation
28
29
 
29
- Una vez publicado en npm:
30
+ From npm:
30
31
 
31
32
  ```bash
32
- pnpm dlx space-statusline init # wizard + opción de instalar en Claude Code
33
- # o instalación global:
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
- Desde el código (mientras tanto):
38
+ From source:
38
39
 
39
40
  ```bash
40
- git clone <repo> && cd space-statusline
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
- El wizard escribe la config y ofrece **instalarse en Claude Code** (gestiona solo la
46
- clave `statusLine` de `~/.claude/settings.json`, con backup; nunca toca permisos).
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
- ## Uso
50
+ ## Usage
49
51
 
50
- | Comando | Qué hace |
52
+ | Command | What it does |
51
53
  |---|---|
52
- | `init` | Wizard completo (tema, secciones, glifos, layout, preview) + opción de instalar. |
53
- | `config` | Re-ejecuta el wizard para editar la config existente. |
54
- | `theme <name>` | Cambio rápido de preset: `outrun-horizon`, `sunset`, `vaporwave`, `mono`. |
55
- | `install` | Conecta el status line a Claude Code (merge seguro de `settings.json`). |
56
- | `uninstall` | Quita la entrada `statusLine` (deja un backup). |
57
- | `preview` | Renderiza con un input de ejemplo para ver el resultado. |
58
- | `doctor` | Verifica `jq`, `git`, soporte truecolor y Nerd Font. |
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
- ## Configuración
62
+ ## Configuration
61
63
 
62
- La config vive en `~/.config/space-statusline/config.json` (ruta XDG; se puede
63
- sobrescribir con `$SPACE_STATUSLINE_CONFIG`). El schema se valida con `zod` y permite
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
- - **Tema** — preset o gradiente custom (start/end en hex) + paleta de colores.
67
- - **Secciones** — cuáles mostrar (`dir`, `git`, `model`, `context`, `cost`, `tokens`,
68
- `clock`) y en qué orden.
69
- - **Glifos** — `nerdfont` o `unicode`, personalizables.
70
- - **Layout** — `multi`/`single`, separador, ancho del horizonte y de la barra de
71
- contexto, uppercase, formato de hora (strftime).
72
- - **Umbrales** — porcentajes de contexto para los colores de aviso/peligro.
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
- El bash lee ese JSON en cada render; si falta o es inválido, usa defaults embebidos.
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
- ## Temas
78
+ ## Themes
77
79
 
78
- `outrun-horizon` (default, violeta→magenta) · `sunset` (cálido, naranjarosa) ·
79
- `vaporwave` (frío, cianvioleta) · `mono` (minimal, grises). Más `custom` desde el
80
- wizard.
80
+ `outrun-horizon` (default, violet→magenta) · `sunset` (warm, orangepink) ·
81
+ `vaporwave` (cool, cyanviolet) · `mono` (minimal, greys). Plus `custom` from the wizard.
81
82
 
82
- ## Terminal recomendada (Windows Terminal)
83
+ ## Recommended terminal (Windows Terminal)
83
84
 
84
- Para que el gradiente y los glifos se vean como en la captura, usá
85
- **CaskaydiaCove Nerd Font** y el esquema de color **Outrun Horizon**.
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. Agregá este esquema en `settings.json` de Windows Terminal, dentro de `"schemes"`:
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. Aplicalo en `"defaults"` (afecta a todos los perfiles) o en un perfil puntual:
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
- ## Cómo funciona
127
+ ## How it works
127
128
 
128
- El render se mantiene en **bash + jq** porque Claude Code lo invoca muy seguido y
129
- arrancar Node en cada render añadiría cold-start. El wizard (Node/TS) **no
130
- reimplementa el render**: solo edita la config JSON que el bash consume. El puente
131
- entre ambos es ese archivo. El render apunta a < 50 ms.
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
- ## Desarrollo
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
- Probar el runtime directamente:
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
- ## Licencia
149
+ ## License
149
150
 
150
- MIT — ver [`LICENSE`](./LICENSE).
151
+ MIT — see [`LICENSE`](./LICENSE).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "space-statusline",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Configurable space-synthwave (Outrun Horizon) status line for Claude Code, set up via an interactive CLI wizard.",
5
5
  "type": "module",
6
6
  "bin": {