sidekick-agent-hub 0.26.5 → 0.26.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 CHANGED
@@ -4,10 +4,11 @@ Full-screen terminal dashboard for monitoring AI agent sessions — standalone,
4
4
 
5
5
  ![Sidekick CLI Dashboard](https://raw.githubusercontent.com/cesarandreslopez/sidekick-agent-hub/main/assets/sidekick-cli.gif)
6
6
 
7
- Sidekick CLI reads from `~/.config/sidekick/` — the same data files the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=CesarAndresLopez.sidekick-for-max) writes. Browse sessions, tasks, decisions, knowledge notes, mind maps, and more in an interactive terminal UI.
7
+ Sidekick CLI reads from `~/.config/sidekick/` (`%APPDATA%\sidekick\` on Windows) — the same data files the [VS Code extension](https://marketplace.visualstudio.com/items?itemName=CesarAndresLopez.sidekick-for-max) writes. Browse sessions, tasks, decisions, knowledge notes, mind maps, and more in an interactive terminal UI.
8
8
 
9
9
  ## What's New
10
10
 
11
+ - **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.
11
12
  - **0.26.5: cheaper dashboard watching** — newer-session detection reconciles each watched-file event with one stat, and catch-up polls cost one stat per unchanged directory instead of walking every session file.
12
13
  - **0.26.4: sharper authentication and policy guidance** — AI summary failures recognize expired-login and re-authentication messages with guidance matched to the credential kind, distinguish a rejected refresh token from an expired conversation, and treat `Permission denied by policy` (including HTTP 403) as an execution-policy denial.
13
14
  - **0.26.3: provider failure diagnosis and status evidence** — AI summary failures distinguish authentication, provider sessions, service, connection, timeout, rate-limit, execution-policy, runtime, and context-limit problems with provider-specific guidance, without signing in, switching providers, or replaying. `sidekick status`, the dashboard, and `doctor` show unavailable or partial public status instead of implying normal operation, and `status --json` adds `serviceStatus` with an `availability` discriminator.
@@ -56,7 +57,7 @@ OpenCode session data lives in OpenCode's platform-specific data directory:
56
57
 
57
58
  - Linux: `~/.local/share/opencode/`
58
59
  - macOS: `~/Library/Application Support/opencode/`
59
- - Windows: `%APPDATA%\\opencode\\`
60
+ - Windows: `%LOCALAPPDATA%\opencode\` (falls back to `%APPDATA%`)
60
61
 
61
62
  If `sqlite3` is missing or not executable in the current shell environment, Sidekick prints an actionable OpenCode-specific notice instead of silently failing session detection.
62
63
 
@@ -64,22 +65,22 @@ If `sqlite3` is missing or not executable in the current shell environment, Side
64
65
 
65
66
  ```bash
66
67
  sidekick dashboard [options]
67
- sidekick tasks|decisions|notes|stats|import|blocks|daily|weekly|monthly|sessions|quota|status|account|handoff|search|context|extract [options]
68
- sidekick today|doctor|statusline|mcp [options]
68
+ sidekick tasks|decisions|notes|stats|import|blocks|daily|weekly|monthly|sessions|quota|status|accounts|handoff|search|context|extract [options]
69
+ sidekick dump|history|report|peak|today|doctor|statusline|mcp [options]
69
70
  sidekick tasks add|tasks done|note add|decision add [args]
70
71
  ```
71
72
 
72
- The standalone commands open the dashboard directly to a specific panel or run a one-shot query. All accept `--project` and `--provider` flags.
73
+ The standalone commands run one-shot queries and print to stdout; only `dashboard` opens the TUI. All accept the global `--project` and `--provider` flags.
73
74
 
74
- | Flag | Description |
75
- | ---------------------- | ------------------------------------------------------------------------- |
76
- | `--project <path>` | Override project path (default: current working directory) |
77
- | `--provider <id>` | Session provider: `claude-code`, `opencode`, `codex`, or `auto` (default) |
78
- | `--no-color` | Disable colored output (also honors `NO_COLOR`) |
79
- | `--offline` | Price from the cached catalog only (also `SIDEKICK_OFFLINE=1`) |
80
- | `--output-file <path>` | Write a command's stdout to a file, without colour codes |
81
- | `--session <id>` | Follow a specific session by ID |
82
- | `--replay` | Replay existing events from the beginning before streaming live |
75
+ | Flag | Description |
76
+ | ---------------------- | ---------------------------------------------------------------------------------- |
77
+ | `--project <path>` | Override project path (default: current working directory) |
78
+ | `--provider <id>` | Session provider: `claude-code`, `opencode`, `codex`, or `auto` (default) |
79
+ | `--no-color` | Disable colored output (also honors `NO_COLOR`) |
80
+ | `--offline` | Price from the cached catalog only (also `SIDEKICK_OFFLINE=1`) |
81
+ | `--output-file <path>` | Write a command's stdout to a file, without colour codes |
82
+ | `--session <id>` | Follow a specific session by ID (`dashboard`, `dump`, `report`, `handoff open`) |
83
+ | `--replay` | Replay existing events from the beginning before streaming live (`dashboard` only) |
83
84
 
84
85
  ## Daily Brief & Statusline
85
86
 
@@ -96,12 +97,12 @@ sidekick statusline
96
97
  sidekick doctor
97
98
  ```
98
99
 
99
- Diagnose project identity, sessions, accounts, providers, and dependencies in one typed health report — the same diagnostics behind the VS Code `Sidekick: Run Doctor` command. Global flags `--project` and `--json` also apply.
100
+ Diagnose project identity, sessions, accounts, providers, and dependencies in one typed health report — the same diagnostics behind the VS Code `Sidekick: Run Doctor` command. Global flags `--project`, `--provider`, and `--json` also apply.
100
101
 
101
102
  ## Billing Blocks
102
103
 
103
104
  ```bash
104
- sidekick blocks [--active | --recent | --since <time>] [--csv]
105
+ sidekick blocks [--active | --recent | --since <time>] [--csv] [--no-cache]
105
106
  ```
106
107
 
107
108
  Five-hour billing blocks computed from session logs (ccusage-style: a block opens at the first usage event, aligned to the UTC hour, lasts five hours, and a longer gap opens a new one). Each block shows its cache-inclusive token total, cost with provenance, burn rate, and — for the open block — projected end-of-block tokens and cost plus the time remaining. Sessions are read once and cached by size and mtime under the Sidekick config directory. When the status line has persisted an official Claude Code rate-limit sample, it is shown beneath the local estimate for comparison. `--since` accepts an ISO date, `YYYY-MM-DD`, or a relative window such as `7d`; `--json` prints the full report and `--csv` one row per block.
@@ -117,7 +118,7 @@ Fold finished sessions from every provider into the history store that `sidekick
117
118
  ## Usage Reports
118
119
 
119
120
  ```bash
120
- sidekick daily|weekly|monthly|sessions [--since <time>] [--until <time>] [--breakdown] [--by-project] [--utc] [--csv]
121
+ sidekick daily|weekly|monthly|sessions [--since <time>] [--until <time>] [--breakdown] [--by-project] [--utc] [--csv] [--no-cache]
121
122
  ```
122
123
 
123
124
  Usage computed straight from session logs — no VS Code extension or history store required — for every provider with session data side by side (`--provider` narrows to one). Rows are bucketed by the time of each usage event on the local calendar (`--utc` for UTC), so a session that crosses midnight is split across both days; weeks start on Monday. `--breakdown` adds per-model sub-rows, `--by-project` groups by project, `sessions` prints one row per session, and `--json` / `--csv` feed scripts. Defaults: 30 days, 12 weeks, 12 calendar months, 30 days.
@@ -133,12 +134,12 @@ sidekick decision add "Store history as JSONL" --rationale "Append-only, crash-s
133
134
 
134
135
  Capture tasks, knowledge notes, and decisions from the terminal without opening the dashboard. Writes use the shared atomic merge writers, so concurrent captures from VS Code or other terminals are never lost (the extension's Kanban board picks them up live).
135
136
 
136
- | Command | Flags |
137
- | ---------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
138
- | `tasks add <subject>` | `--description <text>`, `--tags <csv>` |
139
- | `tasks done <id>` | Accepts a task ID or unique prefix |
140
- | `note add <content>` | `--file <path>`, `--title <title>`, `--type <type>` (`gotcha`/`pattern`/`guideline`/`tip`), `--importance <level>`, `--tags <csv>` |
141
- | `decision add <description>` | `--rationale <text>`, `--chosen <text>`, `--alternatives <csv>`, `--tags <csv>` |
137
+ | Command | Flags |
138
+ | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
139
+ | `tasks add <subject>` | `--description <text>`, `--tags <csv>` |
140
+ | `tasks done <id>` | Accepts a task ID or unique prefix |
141
+ | `note add <content>` | `--file <path>`, `--title <title>`, `--type <type>` (`gotcha`/`pattern`/`guideline`/`tip`, default `tip`), `--importance <level>` (`critical`/`high`/`medium`/`low`, default `medium`), `--tags <csv>`; `--file` defaults to `.` |
142
+ | `decision add <description>` | `--rationale <text>`, `--chosen <text>`, `--alternatives <csv>`, `--tags <csv>` |
142
143
 
143
144
  The global flag `--project` also applies.
144
145
 
@@ -173,6 +174,7 @@ Export session data as text, markdown, or JSON.
173
174
  | `--session <id>` | Target a specific session (default: most recent) |
174
175
  | `--list` | List available sessions and exit |
175
176
  | `--limit <n>` | Maximum sessions listed with `--list` (default: 50) |
177
+ | `--csv` | With `--list`, print the session table as CSV |
176
178
 
177
179
  Global flags `--project` and `--provider` also apply.
178
180
 
@@ -291,7 +293,7 @@ Codex quota commands and `sidekick mcp`'s `get_quota_status` always ask the API
291
293
 
292
294
  Use `--json` for machine-readable output; it includes `resolution`, `source`, `capturedSource`, `freshness`, and `ageMs`, plus `failureKind`, `httpStatus`, and `retryAfterMs` on unavailable responses. The `failure` descriptor explains an API failure even when fallback data is available. Claude Code requires active credentials (read from the system Keychain on macOS, or `~/.claude/.credentials.json` on Linux/Windows).
293
295
 
294
- When multi-account is enabled, `sidekick quota` shows the currently logged-in account email above the quota bars — resolved live from the provider's auth, so it stays correct even after a native `claude login` / `codex login`.
296
+ `sidekick quota` shows the currently logged-in account email above the quota bars — resolved live from the provider's auth, so it stays correct even after a native `claude login` / `codex login`.
295
297
 
296
298
  Use `sidekick quota --all` to show Claude and Codex quota together in a single run, plus z.ai when API quota is available or z.ai traffic is active. Each provider degrades independently — if one provider's quota can't be fetched, its error is shown inline and the others still render (the command never aborts on a single provider's failure). The combined view uses the same policy as the single-provider view; live values can change between calls. `--all --json` emits a provider-keyed payload for dashboards and automation.
297
299
 
@@ -311,36 +313,48 @@ Mon ··▒▒▓█▒░· ·░░·· ·▒▓
311
313
  Peak 92% · Avg 38% · Samples 612
312
314
  ```
313
315
 
314
- Flags: `--weeks <n>` (1-26, default 13), `--provider claude|codex|zai` (default all available, stacked), `--workspace <path>` (default `cwd`), `--window 5h|7d|max` (default `5h`), `--csv`. `--json` emits a `{ workspaceId, weeks, window, providers, generatedAt }` payload — the same shape consumed by the VS Code dashboard's Quota History panel. Cells are local calendar days.
316
+ Flags: `--weeks <n>` (1-26, default 13), `--provider claude|codex|zai` (`claude-code` and `z.ai` are accepted aliases; default all available, stacked), `--workspace <path>` (default `cwd`), `--window 5h|7d|max` (default `5h`), `--csv`. `--json` emits a `{ workspaceId, weeks, window, providers, generatedAt }` payload — the same shape consumed by the VS Code dashboard's Quota History panel. Cells are local calendar days.
315
317
 
316
318
  History is stored at `~/.config/sidekick/quota-history/<workspaceId>/<provider>.jsonl` (mode `0600`, 60-second debounce, 91-day retention). The workspace id is `sha256(realpath)[0..16]`, so the same folder yields the same store whether sampled from the CLI or VS Code.
317
319
 
318
320
  ## Account Management
319
321
 
320
322
  ```bash
321
- sidekick account [options]
323
+ sidekick accounts [command]
322
324
  ```
323
325
 
324
- Manage accounts across providers — save, list, switch, and remove without manual login/logout cycles. Supports Claude Code and Codex profiles. Account data is stored in `~/.config/sidekick/accounts/` with strict file permissions and atomic writes with rollback on failure.
326
+ 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.
327
+
328
+ | Command | Description |
329
+ | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
330
+ | `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 |
331
+ | `accounts list` | Saved accounts with health and expiry |
332
+ | `accounts add [--label <name>] [--current] [-y]` | Sign in to a new account in an isolated profile; `--current` registers or relabels the live login |
333
+ | `accounts switch <name> \| --next [--force]` | Make an account active (label, email, id, or unique prefix); `--force` ignores an expired health verdict |
334
+ | `accounts login <name>` | Sign in again to an existing (expired) account, keeping its id and label |
335
+ | `accounts remove <name> [-y]` | Delete a saved account and its credentials (prompts unless `--yes`/`--force`; required for `--json`/non-TTY) |
336
+ | `accounts shell <name> [-- <cmd…>]` | Subshell, or one command, where `claude`/`codex` use the account |
337
+ | `accounts env <name> [--shell <kind>]` | Print the environment for `eval` (`bash`, `zsh`, `fish`, `powershell`, `cmd`; default detected) |
338
+ | `accounts undo` | Revert the last switch |
339
+ | `accounts doctor` | Credential expiry, running apps, Codex credential store, keep-alive state |
340
+ | `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) |
341
+ | `accounts config keep-alive <on\|off\|run>` | Refresh inactive accounts through the official CLIs (the dashboard runs it hourly); `run` executes one pass now |
342
+
343
+ `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`.
325
344
 
326
- On first CLI startup, Sidekick auto-registers the active system Claude Code and Codex credentials as a **"Default"** account (when no saved account exists for that provider yet). Existing manually saved accounts are never overwritten — the flags below are only needed to add additional accounts or switch between them.
327
-
328
- | Flag | Description |
329
- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
330
- | `--provider <id>` | Provider: `claude-code` (default), `codex`, or `all` |
331
- | `--add` | Save the currently signed-in account |
332
- | `--login` | Sign in and save a **new** account via a provider-isolated login flow, without disturbing the active account until finalization |
333
- | `--label <name>` | Label for the account (required for Codex and `--login`; optional for Claude `--add`) |
334
- | `--switch` | Switch to the next saved account |
335
- | `--switch-to <id>` | Switch to a specific account by email, label, or ID |
336
- | `--remove <id>` | Remove a saved account by email, label, or ID (prompts for y/N confirmation first) |
337
- | `-y`, `--yes` / `--force` | Skip the `--remove` confirmation prompt (required for `--json` or non-interactive runs) |
338
- | `--launcher <name>` | Create an opt-in per-account terminal launcher for the active account |
339
- | `--auto-switch <pct\|off>` | Persist the auto-switch quota threshold (1–100), or `off` to disable. Continuous auto-switching runs in a long-running host such as VS Code |
345
+ ```bash
346
+ sidekick accounts # interactive picker
347
+ sidekick accounts list --json # { accounts, activeByProvider, registeredNow }
348
+ sidekick accounts add --label Work # sign in to a second account; current login untouched
349
+ sidekick accounts switch work # switch by label, email, or id
350
+ eval "$(sidekick accounts env work)" # this shell only: claude/codex use Work
351
+ sidekick accounts shell work -- claude # one claude session as Work
352
+ sidekick accounts doctor # what would break a switch right now
353
+ ```
340
354
 
341
- With no flags, lists all saved accounts and marks the active one. `--provider all` lists Claude and Codex accounts together. Use `--json` for machine-readable output (provider-keyed when `--provider all`).
355
+ `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`**.
342
356
 
343
- `--remove` prints the resolved account and asks for an interactive y/N answer (default No). Pass `-y`/`--yes` (or `--force`) 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`**.
357
+ 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 launcher script; `accounts shell` and `accounts env` are the cross-platform replacements.
344
358
 
345
359
  ## Dashboard Panels
346
360
 
@@ -353,7 +367,7 @@ The dashboard is a two-pane terminal UI. The left side shows a navigable list, t
353
367
  | 3 | **Kanban** | Task board with status columns |
354
368
  | 4 | **Notes** | Knowledge notes attached to files |
355
369
  | 5 | **Decisions** | Architectural decisions from sessions |
356
- | 6 | **Plans** | Discovered agent plans from `~/.claude/plans/` |
370
+ | 6 | **Plans** | Agent plans persisted in the project store from Claude Code, OpenCode, and Codex sessions |
357
371
  | 7 | **Events** | Live event stream with type badges, timestamps, and keyword-highlighted summaries |
358
372
  | 8 | **Charts** | Tool frequency bars, event distribution, activity heatmap, and pattern analysis |
359
373
 
@@ -425,10 +439,12 @@ Press `z` to cycle through layout modes:
425
439
  | `/` | Open filter overlay (supports substring, fuzzy, regex, and date modes — Tab cycles modes) |
426
440
  | `x` | Open context menu for selected item |
427
441
  | `M` | Toggle mouse capture (turn off to restore terminal text selection/copy) |
442
+ | `A` | Open the accounts overlay (`Enter` switches, `u` undoes the last switch) |
428
443
  | `?` | Show help |
429
444
  | `R` | Refresh persisted project data (tasks, notes, decisions, plans) from disk |
430
445
  | `r` | Generate HTML report for the current session |
431
446
  | `V` | Show version / changelog |
447
+ | `Esc` | Clear the filter, close an overlay, or return focus to the side list |
432
448
  | `q` / `Ctrl+C` | Quit |
433
449
 
434
450
  ## Mouse Support
@@ -448,7 +464,7 @@ Auto-detects the most recently active session provider:
448
464
 
449
465
  - **Claude Code** — `~/.claude/projects/`
450
466
  - **OpenCode** — OpenCode's data directory:
451
- Linux `~/.local/share/opencode/`, macOS `~/Library/Application Support/opencode/`, Windows `%APPDATA%\\opencode\\`
467
+ Linux `~/.local/share/opencode/`, macOS `~/Library/Application Support/opencode/`, Windows `%LOCALAPPDATA%\opencode\` (falls back to `%APPDATA%`)
452
468
  - **Codex** — `~/.codex/`
453
469
 
454
470
  Override with `--provider claude-code`, `--provider opencode`, or `--provider codex`.