sidekick-agent-hub 0.27.4 → 0.27.6
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 +50 -33
- package/dist/sidekick-cli.mjs +18 -17
- package/dist/sidekick-main.mjs +534 -510
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,8 @@ Sidekick CLI reads from `~/.config/sidekick/` (`%APPDATA%\sidekick\` on Windows)
|
|
|
8
8
|
|
|
9
9
|
## What's New
|
|
10
10
|
|
|
11
|
+
- **0.27.6: one usable copy of every login** — Sidekick no longer causes Claude Code's "Not logged in · Please run /login": Keychain writes over about 4 KB are no longer truncated, the live login keeps no second copy, `accounts switch` saves the outgoing login first and is journaled so an interrupted switch finishes or rolls back, and keep-alive never refreshes a live copy. Codex switches are refused while Codex sessions run (even with `--force`), and keep-alive refreshes through `codex app-server`. `sidekick accounts doctor` is read-only and reports Claude and Codex credential stores; `--fix` repairs them after asking (`--yes` skips, `--json` lists the repairs).
|
|
12
|
+
- **0.27.5: prompts grouped by session** — `sidekick dump --prompts` prints every prompt you typed in Claude Code and Codex sessions, grouped by session: the most recent session with prompts by default, one session with `--session <id-or-prefix>`, or every session of the project and its git worktrees with `--all` (narrowed by `--since` and `--limit`). `--replies` adds the agent's final reply to each prompt, `--signals` adds interrupts, rejected and failed tool calls, compactions, API errors, and rollbacks, and `--format` writes text, markdown, JSON, or JSONL (one session per line). OpenCode is not supported.
|
|
11
13
|
- **0.27.3: accurate token totals and subagent totals** — Claude Code split lines and repeated Codex `token_count` events are no longer double-counted, which fixes `dump`, `report`, the dashboard, `daily`/`weekly`/`monthly`/`sessions`, and `blocks` (the usage cache rebuilds itself). `sidekick dump` and `sidekick report` show the session's subagents and "Session total (incl. subagents)", and `dump --format json` adds a `tokenSummary` block. The dashboard's Tokens section leads with "Total (incl. cache)", lists all four buckets, then subagent and session totals, and its cache-hit rate counts cache writes. Claude subagent transcripts count toward the usage reports under their parent session, and `state.json` gains `context.totalTokens`.
|
|
12
14
|
- **0.27.0: Opus 5.5 pricing and GPT-6 summaries** — cost estimates for Claude Opus 5.5 (`claude-opus-5-5`) sessions use its own rates ($4 / $20 per 1M tokens, $0.20 cache reads) instead of Opus 5's, GPT-6 Sol and Luna sessions are priced, and OpenAI API dashboard summaries use `gpt-6-luna`.
|
|
13
15
|
- **0.26.6: `sidekick accounts`** — an interactive picker plus `list`, `add`, `switch`, `login`, `remove`, `shell`, `env`, `undo`, `doctor`, and `config` subcommands. Logins you already use are registered automatically, every switch is verified against the live credential store and undoable, expired credentials are refused with a sign-in hint, running apps that keep the previous login are named, and `env` / `shell` run a second account side by side on bash, zsh, fish, PowerShell, and cmd. The dashboard gains an accounts overlay (`A`) and a health-coloured status bar account. `sidekick account --…` flags remain as a deprecated alias.
|
|
@@ -72,10 +74,11 @@ sidekick dump|history|report|peak|today|doctor|statusline|mcp [options]
|
|
|
72
74
|
sidekick tasks add|tasks done|note add|decision add [args]
|
|
73
75
|
```
|
|
74
76
|
|
|
75
|
-
|
|
77
|
+
Most commands run one-shot queries and print to stdout; `dashboard` opens the full-screen TUI, `accounts` and `extract -i` open interactive pickers, and `mcp` serves stdio until closed. Every command except `statusline` accepts the global flags below.
|
|
76
78
|
|
|
77
79
|
| Flag | Description |
|
|
78
80
|
| ---------------------- | ---------------------------------------------------------------------------------- |
|
|
81
|
+
| `--json` | Machine-readable JSON output (commands that support it) |
|
|
79
82
|
| `--project <path>` | Override project path (default: current working directory) |
|
|
80
83
|
| `--provider <id>` | Session provider: `claude-code`, `opencode`, `codex`, or `auto` (default) |
|
|
81
84
|
| `--no-color` | Disable colored output (also honors `NO_COLOR`) |
|
|
@@ -168,17 +171,30 @@ sidekick dump [options]
|
|
|
168
171
|
|
|
169
172
|
Export session data as text, markdown, or JSON. Token lines use "Total (incl. cache)" with all four buckets (input, cache read, cache write, output). When the session spawned subagents, text and markdown add "Subagents (n)" and "Session total (incl. subagents)", and markdown adds a Subagent Tokens table. `--format json` adds a `tokenSummary` block with `mainThread`, `subagents` (one entry per subagent), `subagentTotal`, and `combined` (main thread plus subagents).
|
|
170
173
|
|
|
171
|
-
| Flag | Description
|
|
172
|
-
| ---------------- |
|
|
173
|
-
| `--format <fmt>` | Output format: `text` (default), `json`, or `markdown` |
|
|
174
|
-
| `--width <cols>` | Terminal width for text output (default: auto-detect)
|
|
175
|
-
| `--expand` | Show all events including noise
|
|
176
|
-
| `--session <id>` | Target a specific session (default: most recent)
|
|
177
|
-
| `--list` | List available sessions and exit
|
|
178
|
-
| `--limit <n>` | Maximum sessions listed with `--list` (default: 50)
|
|
179
|
-
| `--csv` | With `--list`, print the session table as CSV
|
|
174
|
+
| Flag | Description |
|
|
175
|
+
| ---------------- | -------------------------------------------------------------------------------------------------------- |
|
|
176
|
+
| `--format <fmt>` | Output format: `text` (default), `json`, or `markdown`; also `jsonl` with `--prompts` |
|
|
177
|
+
| `--width <cols>` | Terminal width for text output (default: auto-detect) |
|
|
178
|
+
| `--expand` | Show all events including noise |
|
|
179
|
+
| `--session <id>` | Target a specific session (default: most recent) |
|
|
180
|
+
| `--list` | List available sessions and exit |
|
|
181
|
+
| `--limit <n>` | Maximum sessions listed with `--list` (default: 50), or dumped with `--prompts` |
|
|
182
|
+
| `--csv` | With `--list`, print the session table as CSV |
|
|
183
|
+
| `--prompts` | Dump human prompts grouped by session (see below) |
|
|
184
|
+
| `--all` | With `--prompts`, every session of the project and its git worktrees |
|
|
185
|
+
| `--since <time>` | With `--prompts`, sessions active since an ISO date, `YYYY-MM-DD`, or `7d`/`24h` (returned whole) |
|
|
186
|
+
| `--signals` | With `--prompts`, add interrupts, rejected and failed tool calls, compactions, API errors, and rollbacks |
|
|
187
|
+
| `--replies` | With `--prompts`, add the agent's final reply to each prompt |
|
|
180
188
|
|
|
181
|
-
Global flags `--project
|
|
189
|
+
Global flags `--project`, `--provider`, and `--json` (the same as `--format json`) also apply.
|
|
190
|
+
|
|
191
|
+
### Prompts by session
|
|
192
|
+
|
|
193
|
+
`sidekick dump --prompts` prints every prompt typed in Claude Code and Codex sessions, grouped by session, for reading or classifying a whole session. The default is the most recent session with prompts, and `--limit <n>` takes the n most recent instead. `--session <id-or-prefix>` picks one session, and `--all` takes every session of the project and its git worktrees (it cannot be combined with `--session`), optionally narrowed by `--since 7d` (sessions active since then, returned whole) and `--limit <n>`. `--signals` adds interrupts, rejected and failed tool calls, compactions, API errors, and rollbacks, and `--replies` adds the agent's final reply to each prompt. `--format` accepts `text`, `markdown`, `json` (full result with bounds and stats), or `jsonl` (one session per line). Both providers are read unless `--provider` names one; `--provider opencode` exits with an error.
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
sidekick dump --prompts --all --since 7d --signals --replies --format jsonl > sessions.jsonl
|
|
197
|
+
```
|
|
182
198
|
|
|
183
199
|
## Prompt History
|
|
184
200
|
|
|
@@ -193,7 +209,7 @@ Show recent user prompts across Codex sessions, newest first — across every wo
|
|
|
193
209
|
| `--limit <n>` | Maximum prompts to show (default: 20) |
|
|
194
210
|
| `--path <sessionId>` | Print the rollout transcript path for a session ID or prefix |
|
|
195
211
|
|
|
196
|
-
Codex-only for now (reads the global `~/.codex/history.jsonl`); Claude Code and OpenCode are not yet supported. Not to be confused with `sidekick quota history`, the quota utilization heatmap.
|
|
212
|
+
Codex-only for now (reads the global `~/.codex/history.jsonl`); Claude Code and OpenCode are not yet supported (for Claude Code and Codex prompts grouped by session, use [`sidekick dump --prompts`](#prompts-by-session)). Not to be confused with `sidekick quota history`, the quota utilization heatmap.
|
|
197
213
|
|
|
198
214
|
## HTML Report
|
|
199
215
|
|
|
@@ -211,7 +227,7 @@ Generate a self-contained HTML session report and open it in the default browser
|
|
|
211
227
|
| `--no-open` | Write the file without opening the browser |
|
|
212
228
|
| `--no-thinking` | Omit thinking blocks from the transcript |
|
|
213
229
|
|
|
214
|
-
Global flags `--project
|
|
230
|
+
Global flags `--project`, `--provider`, and `--json` (prints the report path as `{"path": …}`) also apply.
|
|
215
231
|
|
|
216
232
|
You can also press `r` in the TUI dashboard to generate a report for the current session.
|
|
217
233
|
|
|
@@ -325,24 +341,24 @@ History is stored at `~/.config/sidekick/quota-history/<workspaceId>/<provider>.
|
|
|
325
341
|
sidekick accounts [command]
|
|
326
342
|
```
|
|
327
343
|
|
|
328
|
-
Keep several Claude Code and Codex logins on one machine and switch between them without `/logout` cycles. Sidekick registers the login you are already using automatically (labelled with its email), verifies every switch by reading the live credential store back, warns about running apps that still hold the previous login, and flags expiring credentials before they fail. Account data is stored in `~/.config/sidekick/accounts/` with strict file permissions and atomic writes with rollback on failure. See the [Account Switcher](https://cesarandreslopez.github.io/sidekick-agent-hub/features/account-switcher/) guide for the per-app reachability table and platform notes.
|
|
329
|
-
|
|
330
|
-
| Command | Description
|
|
331
|
-
| ------------------------------------------------ |
|
|
332
|
-
| `sidekick accounts` | Interactive picker (arrow keys, `Enter` switch, `a` add, `l` sign in again, `r` remove, `s` shell, `u` undo, `?` help, `q` quit). Prints the list when piped
|
|
333
|
-
| `accounts list` | Saved accounts with health and expiry
|
|
334
|
-
| `accounts add [--label <name>] [--current] [-y]` | Sign in to a new account in an isolated profile; `--current` registers or relabels the live login
|
|
335
|
-
| `accounts switch <name> \| --next [--force]` | Make an account active (label, email, id, or unique prefix); `--force` ignores an expired health verdict
|
|
336
|
-
| `accounts login <name>` | Sign in again to an existing (expired) account, keeping its id and label
|
|
337
|
-
| `accounts remove <name> [-y]` | Delete a saved account and its credentials (prompts unless `--yes`/`--force`; required for `--json`/non-TTY)
|
|
338
|
-
| `accounts shell <name> [-- <cmd…>]` | Subshell, or one command, where `claude`/`codex` use the account
|
|
339
|
-
| `accounts env <name> [--shell <kind>]` | Print the environment for `eval` (`bash`, `zsh`, `fish`, `powershell`, `cmd`; default detected)
|
|
340
|
-
| `accounts undo` | Revert the last switch
|
|
341
|
-
| `accounts doctor`
|
|
342
|
-
| `accounts config auto-switch <pct\|off>` | Persist the auto-switch quota threshold (continuous auto-switching runs in a long-running host such as VS Code)
|
|
343
|
-
| `accounts config keep-alive <on\|off\|run>` | Refresh inactive accounts through the official CLIs (the dashboard runs it hourly); `run` executes one pass now
|
|
344
|
-
|
|
345
|
-
`sidekick accounts` and `accounts list` accept `--provider claude-code|codex|all`; the per-account subcommands accept `claude-code|codex`; `config` takes no provider. The global `--json` applies everywhere. A switch prints `✓ verified` once the live store reads back the new credential, one `!` line per running app that still holds the previous login, and the undo command. A switch to an `expired` or `missing` account is refused with a sign-in hint unless you pass `--force`.
|
|
344
|
+
Keep several Claude Code and Codex logins on one machine and switch between them without `/logout` cycles. Sidekick registers the login you are already using automatically (labelled with its email), verifies every switch by reading the live credential store back, warns about running Claude apps that still hold the previous login, refuses a Codex switch while Codex sessions run, keeps exactly one usable copy of every login (the rest are private backups neither CLI reads), and flags expiring credentials before they fail. Account data is stored in `~/.config/sidekick/accounts/` with strict file permissions and atomic writes with rollback on failure. See the [Account Switcher](https://cesarandreslopez.github.io/sidekick-agent-hub/features/account-switcher/) guide for the per-app reachability table and platform notes.
|
|
345
|
+
|
|
346
|
+
| Command | Description |
|
|
347
|
+
| ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
348
|
+
| `sidekick accounts` | Interactive picker (arrow keys, `Enter` switch, `a` add, `l` sign in again, `r` remove, `s` shell, `u` undo, `?` help, `q` quit). Prints the list when piped |
|
|
349
|
+
| `accounts list` | Saved accounts with health and expiry |
|
|
350
|
+
| `accounts add [--label <name>] [--current] [-y]` | Sign in to a new account in an isolated profile; `--current` registers or relabels the live login |
|
|
351
|
+
| `accounts switch <name> \| --next [--force]` | Make an account active (label, email, id, or unique prefix); `--force` ignores an expired health verdict but never skips saving the outgoing login or the Codex running-session check |
|
|
352
|
+
| `accounts login <name>` | Sign in again to an existing (expired) account, keeping its id and label |
|
|
353
|
+
| `accounts remove <name> [-y]` | Delete a saved account and its credentials (prompts unless `--yes`/`--force`; required for `--json`/non-TTY) |
|
|
354
|
+
| `accounts shell <name> [-- <cmd…>]` | Subshell, or one command, where `claude`/`codex` use the account |
|
|
355
|
+
| `accounts env <name> [--shell <kind>]` | Print the environment for `eval` (`bash`, `zsh`, `fish`, `powershell`, `cmd`; default detected) |
|
|
356
|
+
| `accounts undo` | Revert the last switch |
|
|
357
|
+
| `accounts doctor [--fix [-y]]` | Read-only check of credential expiry, stored Claude and Codex credentials (unused, second live, unreadable, interrupted switches), running apps, the Codex credential store, and keep-alive; `--fix` repairs what Sidekick owns after asking (`-y` skips; required for `--json`/non-TTY), and `--json` lists the repairs |
|
|
358
|
+
| `accounts config auto-switch <pct\|off>` | Persist the auto-switch quota threshold (continuous auto-switching runs in a long-running host such as VS Code) |
|
|
359
|
+
| `accounts config keep-alive <on\|off\|run>` | Refresh inactive accounts through the official CLIs (the dashboard runs it hourly); `run` executes one pass now |
|
|
360
|
+
|
|
361
|
+
`sidekick accounts` and `accounts list` accept `--provider claude-code|codex|all`; the per-account subcommands accept `claude-code|codex`; `config` takes no provider. The global `--json` applies everywhere. A switch prints `✓ verified` once the live store reads back the new credential, one `!` line per running app that still holds the previous login, and the undo command. A switch to an `expired` or `missing` account is refused with a sign-in hint unless you pass `--force`. A Codex switch is refused while Codex CLI, app, or IDE sessions run or keep-alive is refreshing the target account; `--force` overrides neither. For the live account, `shell` and `env` use the normal Claude or Codex home instead of a profile.
|
|
346
362
|
|
|
347
363
|
```bash
|
|
348
364
|
sidekick accounts # interactive picker
|
|
@@ -351,12 +367,13 @@ sidekick accounts add --label Work # sign in to a second account; curren
|
|
|
351
367
|
sidekick accounts switch work # switch by label, email, or id
|
|
352
368
|
eval "$(sidekick accounts env work)" # this shell only: claude/codex use Work
|
|
353
369
|
sidekick accounts shell work -- claude # one claude session as Work
|
|
354
|
-
sidekick accounts doctor # what would break a switch right now
|
|
370
|
+
sidekick accounts doctor # what would break a switch right now (read-only)
|
|
371
|
+
sidekick accounts doctor --fix # repair stored credentials Sidekick owns (asks first)
|
|
355
372
|
```
|
|
356
373
|
|
|
357
374
|
`remove` prints the resolved account and asks for an interactive y/N answer (default No). Pass `-y`/`--yes` to skip the prompt; `--json` and non-TTY contexts require the flag and exit `1` without it — **unattended automation that removes accounts must add `--yes`**.
|
|
358
375
|
|
|
359
|
-
The legacy `sidekick account --add | --login | --switch | --switch-to <id> | --remove <id> | --launcher <name> | --auto-switch <pct|off>` flags still work and print the equivalent `sidekick accounts …` command on stderr. `--launcher` writes a POSIX
|
|
376
|
+
The legacy `sidekick account --add | --login | --switch | --switch-to <id> | --remove <id> | --launcher <name> | --auto-switch <pct|off>` flags still work and print the equivalent `sidekick accounts …` command on stderr. `--launcher` writes a POSIX script to `~/.local/bin` that runs `sidekick accounts shell` each time, so it follows the account whether or not it is the live login; `accounts shell` and `accounts env` are the cross-platform replacements.
|
|
360
377
|
|
|
361
378
|
## Dashboard Panels
|
|
362
379
|
|