Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"name": "devpilot-studio",
"source": "./",
"description": "Real-time terminal status bar for Claude Code — context window, rate limits, 5-hour/7-day quotas, burn-rate alerts, sparkline history, and preset themes.",
"version": "1.3.0",
"version": "1.4.0",
"author": {
"name": "Kumuditha Tharinda Liyanage"
},
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "devpilot-studio",
"displayName": "DevPilot Studio",
"version": "1.3.0",
"version": "1.4.0",
"description": "Real-time terminal status bar for Claude Code — context window, rate limits, 5-hour/7-day quotas, burn-rate alerts, sparkline history, and preset themes. Zero dependencies. 100% offline.",
"author": {
"name": "Kumuditha Tharinda Liyanage",
Expand Down
45 changes: 45 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,51 @@

All notable changes to DevPilot Studio are documented here. This project adheres to [Semantic Versioning](https://semver.org/).

## [1.4.0] - 2026-09-01

Theme customization and developer attribution. Every new option is off by
default — an existing config with none of these keys renders exactly as before.

### Added
- **Custom color theme** (`DPS_THEME=custom`): reads per-role colors from
`DPS_COLOR_MODEL`, `DPS_COLOR_ARROW`, `DPS_COLOR_DIR`, `DPS_COLOR_ORG`,
`DPS_COLOR_BRACKET`, `DPS_COLOR_LABEL`, `DPS_COLOR_RESETTXT`,
`DPS_COLOR_BAR_LOW/MID/HIGH`, and
`DPS_COLOR_EFFORT_LOW/MED/HIGH/XHIGH/MAX/DEFAULT`. Any unset value falls back
to the `default` theme, so an incomplete custom config still renders.
- **True-color** (`DPS_TRUECOLOR=1`): on the custom theme, `DPS_COLOR_*` may be
6-digit hex (e.g. `ff8800`), converted to 24-bit ANSI. Built-in themes are
unchanged.
- **Configurable bar thresholds** (`DPS_THRESHOLD_MID` = 50, `DPS_THRESHOLD_HIGH`
= 80): the low/mid/high color switch points for every bar. Non-integer,
out-of-range, or `MID >= HIGH` values fall back to 50 / 80.
- **Configurable segment order** (`DPS_LAYOUT` = `ctx,5h,7d,over`): line 2 is
assembled by walking this list. Unknown names are skipped silently. The
default order is byte-for-byte identical to previous output.
- **Terminal-width awareness**: for real status-line rendering, when width is
known (`$COLUMNS` or `tput cols` with a tty) and the terminal is narrow, the
effort segment is dropped first, then the org badge, then `DPS_BAR_WIDTH`
shrinks. When width can't be determined, behavior is unchanged.
- **Named presets**: `dps theme save <name>`, `dps theme use <name>`,
`dps theme list`. Presets live in `$CONFIG_DIR/presets/`; `<name>` is
restricted to `[A-Za-z0-9_-]` to prevent path traversal. `use` loads through
the same safe parser — never sourced.
- **Icon mode** (`DPS_ICONS=1`): swaps the `ctx` / `5h` / `7d` / `over` labels
for Nerd Font glyphs. Plain text is the default.
- **Developer credit**: `DevPilot Studio — built by tharinda.dev` is printed
once by `dps version`, `dps help`, `scripts/setup.sh`, `install.sh`, and the
`npx` installer. It is never printed on the render path.
- **Opt-in status-bar credit** (`DPS_SHOW_CREDIT=1`, default `0`): appends a dim
`· tharinda.dev` to the end of line 1, after the cost segment. The installers
mention it; nothing enables it automatically.

### Changed
- `apply_theme`'s `default` palette is factored into `_palette_default` (no
behavior change) so the custom theme can reuse it as its fallback.
- The config parser and writer are now driven by a single `DPS_CONFIG_KEYS`
allowlist covering all new keys; assignment still never interprets values as
code.

## [1.3.0] - 2026-09-01

Bug-fix, cleanup, and security-hardening pass on the Claude Code integration.
Expand Down
16 changes: 14 additions & 2 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ burn-rate velocity alerts, session cost, and 7-day usage sparkline history.

## Architecture

- **`bin/devpilot`** — Core engine (POSIX Bash, ~1100 lines). Handles all rendering,
stats, history, config wizard, gallery, install/uninstall.
- **`bin/devpilot`** — Core engine (POSIX Bash). Handles all rendering, stats,
history, config wizard, gallery, themes (`default`/`mono`/`vivid`/`custom`,
optional true-color), named presets (`dps theme save/use/list`),
install/uninstall. The config file is parsed via an allowlist, never sourced.
- **`cli.js`** — Node.js entrypoint wrapper for `npx devpilot-studio` installation.
- **`scripts/setup.sh`** — Idempotent plugin setup script (platform detection, jq
check, binary install, statusLine config).
Expand Down Expand Up @@ -49,8 +51,18 @@ bin/devpilot demo history
# Test all commands
bin/devpilot version
bin/devpilot help

# Theme switching and named presets
bin/devpilot theme vivid
bin/devpilot theme save mypreset
bin/devpilot theme list
bin/devpilot theme use mypreset
```

When adding a `DPS_*` config key: add it to `DPS_CONFIG_KEYS`, give it a safe
default in `load_config`, and document it in `README.md` and
`docs/CONFIGURATION.md`. Never read config via `source`/`.`.

## Code Style

- Bash scripts: 2-space indent, `set -euo pipefail` in scripts, functions prefixed
Expand Down
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,19 +115,27 @@ Configuration is stored in `${XDG_CONFIG_HOME:-$HOME/.config}/devpilot/config`.
| Environment Variable | Description | Default |
| :--- | :--- | :--- |
| `DPS_ORG` | Custom badge text displayed at front of status bar | `""` |
| `DPS_THEME` | Color theme (`default`, `mono`, `vivid`) | `default` |
| `DPS_THEME` | Color theme (`default`, `mono`, `vivid`, `custom`) | `default` |
| `DPS_BAR_WIDTH` | Progress bar width in character cells | `10` |
| `DPS_BAR_FILLED` | Character used for filled portion of progress bar | `█` |
| `DPS_BAR_EMPTY` | Character used for empty portion of progress bar | `░` |
| `DPS_LAYOUT` | Comma-separated order of line-2 segments; unknown names skipped | `ctx,5h,7d,over` |
| `DPS_ICONS` | Use Nerd Font glyphs instead of plain-text segment labels (`1`/`0`) | `0` |
| `DPS_TRUECOLOR` | Allow `DPS_COLOR_*` hex values on the `custom` theme (`1`/`0`) | `0` |
| `DPS_THRESHOLD_MID` | Percent at which bars switch to the "mid" color (int 0–100, `< HIGH`) | `50` |
| `DPS_THRESHOLD_HIGH` | Percent at which bars switch to the "high" color (int 0–100) | `80` |
| `DPS_COLOR_*` | Per-role colors for `DPS_THEME=custom` (raw ANSI, or hex with `DPS_TRUECOLOR=1`). Full list in [docs/CONFIGURATION.md](docs/CONFIGURATION.md). | default theme |
| `DPS_SHOW_EFFORT` | Toggle display of model effort level (`1`/`0`) | `1` |
| `DPS_SHOW_CTX` | Toggle display of context window capacity bar (`1`/`0`) | `1` |
| `DPS_SHOW_5H` | Toggle display of 5-hour rate limit bar (`1`/`0`) | `1` |
| `DPS_SHOW_7D` | Toggle display of 7-day rate limit bar (`1`/`0`) | `1` |
| `DPS_SHOW_OVERAGE` | Toggle display of the overage bar (`1`/`0`) | `0` |
| `DPS_SHOW_COST` | Toggle display of session cost (`1`/`0`) | `0` |
| `DPS_SHOW_BURN` | Toggle velocity burn-rate warning (`1`/`0`) | `1` |
| `DPS_SHOW_CREDIT` | Append a dim `· tharinda.dev` credit to line 1 (`1`/`0`) | `0` |
| `DPS_HISTORY` | Toggle local history logging (`1`/`0`) | `1` |

For advanced customization and color codes, see [docs/CONFIGURATION.md](docs/CONFIGURATION.md).
For advanced customization, the full `DPS_COLOR_*` list, and named presets (`dps theme save/use/list`), see [docs/CONFIGURATION.md](docs/CONFIGURATION.md).

---

Expand Down
Loading
Loading