@promptctl/cc-candybar 1.212.6 → 1.213.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 CHANGED
@@ -45,7 +45,7 @@ Drop a `.cc-candybar.json5` (or `.cc-candybar.json` — both extensions are acce
45
45
  1. `$CC_CANDYBAR_CONFIG` in the statusline command's environment (`~` is expanded, and a relative path is relative to the directory Claude Code runs the statusline in). It is read by the client on every render and carried to the daemon, so it can differ per session. A path that names no file renders the bundled default under a `Config file not found` warning, and one the daemon cannot stat (behind an unsearchable directory, say) under `Config file could not be read` with the error — either way the bar stays live and loads the file once it can.
46
46
  2. `<project>/.cc-candybar.json5` (then `.json` at the same location)
47
47
  3. `<cwd>/.cc-candybar.json5` (then `.json`)
48
- 4. `$XDG_CONFIG_HOME/cc-candybar/config.json5` (then `.json`; defaults to `~/.config/cc-candybar/config.json5`). A session started with `CC_CANDYBAR_HOME` and `CC_CANDYBAR_NAME` runs on a renderer of its own, whose user file is `$CC_CANDYBAR_HOME/config/config.json5`.
48
+ 4. `$XDG_CONFIG_HOME/cc-candybar/config.json5` (then `.json`; defaults to `~/.config/cc-candybar/config.json5`)
49
49
 
50
50
  Without `$CC_CANDYBAR_CONFIG`, every file found is a layer: your user file merges over the bundled default, the cwd's over that, and the project's on top. So a project file declares only what that project adds or changes — a segment placed in a row, a plugin listed — and keeps the rest of your own config. `$CC_CANDYBAR_CONFIG` names the one file the session loads, and the others are not read. A change made from the bar (a theme picked and saved, a segment added in edit mode) is written to your user file, never to a project's; when a project file sets the same value, the click is refused and names that file.
51
51
 
@@ -53,7 +53,7 @@ A project or cwd file, and a repository's own plugins (`.cc-candybar/plugins/`),
53
53
 
54
54
  JSON is a strict subset of JSON5, so the same parser handles both — `.json5` is the documented format (supports inline comments, trailing commas, unquoted keys), `.json` is the legacy/compat extension. When both exist at the same location, `.json5` wins and the bar shows a persistent warning so you can remove the shadowed duplicate.
55
55
 
56
- The file **merges onto the bundled default**, so it declares only what differs. `globals` merge per field; the named sections (`variables`, `segments`, `actions`, `helpers`, …) merge by name, your entry winning; `root` merges per named row (`identity` and `status` in the bundled default; a whole tree at `root` replaces every row). The bundled default is `src/config/default-dsl-config.ts`, and fuller starting points live under `examples/`. Run `cc-candybar check <path>` to load a file exactly as the daemon will: exit 0 means it renders, exit 1 prints the error with the path and line to fix. Add `--render` and it prints the bar it rendered, so you can read a config's result without installing it. For a bug report, `cc-candybar record <session-id> <file> [--seconds N]` writes ten seconds (or N) of a live session out of the running daemon, the facts its bar drew from and the requests it was drawn by, and `pnpm demo --recording <file> <config>` in a checkout replays the file frame by frame through the config named, so send yours with the recording. The session's facts come from the file alone, a config's own shell and file sources among them: no git, tmux or transcript is read and no command runs. So the file holds what every shell and file source of your config read (a command's output, a file's text): read it before you send it.
56
+ The file **merges onto the bundled default**, so it declares only what differs. `globals` merge per field; the named sections (`variables`, `segments`, `actions`, `helpers`, …) merge by name, your entry winning; `root` merges per named row (`identity` and `status` in the bundled default; a whole tree at `root` replaces every row). The bundled default is `src/config/default-dsl-config.ts`, and fuller starting points live under `examples/`. Run `cc-candybar check <path>` to load a file exactly as the daemon will: exit 0 means it renders, exit 1 prints the error with the path and line to fix. Add `--render` and it prints the bar it rendered, so you can read a config's result without installing it.
57
57
 
58
58
  <!-- The check:pass fence below is loaded by test/doc-snippets.test.ts through
59
59
  `cc-candybar check` — edit it and run that test, so the README example
@@ -152,7 +152,7 @@ Run the install once to stage the runtime, then point `~/.claude/settings.json`
152
152
 
153
153
  ### Developing against a checkout
154
154
 
155
- `just deploy` builds `dist/index.mjs` and stages the native binary at `bin/cc-candybar-native` — point your statusline command at that path. On macOS it also stages the URL handler binary at `bin/cc-candybar-url-handler-native`, which `cc-candybar install` from a checkout needs. On a machine without cargo, `pnpm install && pnpm build` builds only the bundle — point your statusline at the committed `bin/cc-candybar` node entry instead, and on macOS run `just install-url-handler` before `cc-candybar install`. Either way the bar renders HEAD; the daemon watches the built bundle and respawns itself on rebuild.
155
+ `just deploy` builds `dist/index.mjs` and stages the native binary at `bin/cc-candybar-native` — point your statusline command at that path. On a machine without cargo, `pnpm install && pnpm build` builds only the bundle — point your statusline at the committed `bin/cc-candybar` node entry instead. Either way the bar renders HEAD; the daemon watches the built bundle and respawns itself on rebuild.
156
156
 
157
157
  `pnpm bar:web` serves the bar at http://127.0.0.1:7317/ in a browser terminal you can click: an isolated daemon (`--config my.json5` starts it from a copy of your config, `--ssh` shows the host segment). `pnpm site:build` builds the GitHub Pages version into `site/dist`, the same page with the daemon running inside it against a simulated machine (`site/`). `pnpm site:dev` serves that page at http://127.0.0.1:8931/ (`--port` picks another) and reloads it whenever the sources or the page change.
158
158