Files
claude-statusline-kit/README.md
T
Andre 79342c73da feat: add portable Claude Code statusline kit
Replicating the cship-based statusline across machines meant manually
copying three files and hand-editing settings.json with per-user absolute
paths — error-prone and slow. Bundling the assets with an idempotent
installer that resolves the pwsh path at runtime and merges into an
existing settings.json makes rollout a single command per PC.
2026-07-18 15:48:14 +02:00

111 lines
3.9 KiB
Markdown

[English](#english) | [Deutsch](#deutsch)
---
## English
# Claude Code Statusline Kit
A portable, self-contained kit that installs a custom Claude Code statusline
(built on the [`cship`](https://cship.dev) Starship fork) onto any Windows PC
with a single command.
### What it installs
| Asset | Target location | Purpose |
| ----------------------------- | -------------------------- | ----------------------------------------- |
| `assets/cship.exe` | `~/.local/bin/` | Renders the statusline |
| `assets/cship.toml` | `~/.config/` | Module config (colors, icons, bars) |
| `assets/cship-statusline.ps1` | `~/.claude/` | Wrapper (progress bars, token formatting) |
| `statusLine` block | `~/.claude/settings.json` | Wires everything into Claude Code |
### Requirements
- **PowerShell 7** (`pwsh`). Install: `winget install --id Microsoft.PowerShell -e`
- A terminal font with **emoji / Nerd-Font glyphs** (e.g. Cascadia Code,
JetBrainsMono Nerd Font) so `🤖 ⚡ 🧠 █░` render correctly.
### Install on a new PC
```powershell
git clone <your-repo-url> Claude_Statusline
cd Claude_Statusline
.\install.ps1
```
Then restart Claude Code (or start a new session).
The installer is **idempotent** — run it again anytime. It auto-detects the
`pwsh` path on the target machine and merges the `statusLine` block into an
existing `settings.json` **without** overwriting your other settings (a
`.bak` backup is written first).
### Options
- `.\install.ps1 -Force` — also overwrite an existing `~/.config/cship.toml`
(by default an existing config is kept, so local tweaks survive).
### Updating the kit
Edit the files under `assets/`, commit, `git push`. On another PC:
```powershell
git pull
.\install.ps1 -Force
```
---
## Deutsch
# Claude Code Statusline Kit
Ein portables, in sich geschlossenes Kit, das eine individuelle Claude-Code-
Statusline (basierend auf dem Starship-Fork [`cship`](https://cship.dev)) mit
einem einzigen Befehl auf jeden Windows-PC installiert.
### Was installiert wird
| Asset | Zielort | Zweck |
| ----------------------------- | -------------------------- | ---------------------------------------- |
| `assets/cship.exe` | `~/.local/bin/` | Rendert die Statusline |
| `assets/cship.toml` | `~/.config/` | Modul-Konfiguration (Farben, Icons, Bars)|
| `assets/cship-statusline.ps1` | `~/.claude/` | Wrapper (Progress-Bars, Token-Format) |
| `statusLine`-Block | `~/.claude/settings.json` | Verdrahtet alles in Claude Code |
### Voraussetzungen
- **PowerShell 7** (`pwsh`). Installation: `winget install --id Microsoft.PowerShell -e`
- Ein Terminal-Font mit **Emoji-/Nerd-Font-Glyphen** (z. B. Cascadia Code,
JetBrainsMono Nerd Font), damit `🤖 ⚡ 🧠 █░` korrekt dargestellt werden.
### Installation auf einem neuen PC
```powershell
git clone <deine-repo-url> Claude_Statusline
cd Claude_Statusline
.\install.ps1
```
Danach Claude Code neu starten (oder eine neue Session öffnen).
Der Installer ist **idempotent** — jederzeit erneut ausführbar. Er erkennt den
`pwsh`-Pfad auf dem Zielrechner automatisch und fügt den `statusLine`-Block in
eine vorhandene `settings.json` ein, **ohne** deine anderen Einstellungen zu
überschreiben (vorher wird ein `.bak`-Backup geschrieben).
### Optionen
- `.\install.ps1 -Force` — überschreibt zusätzlich eine vorhandene
`~/.config/cship.toml` (standardmäßig wird eine bestehende Config behalten,
damit lokale Anpassungen erhalten bleiben).
### Kit aktualisieren
Dateien unter `assets/` bearbeiten, committen, `git push`. Auf einem anderen PC:
```powershell
git pull
.\install.ps1 -Force
```