@generativereality/cctabs 0.2.0 → 0.3.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/.claude-plugin/plugin.json +1 -1
- package/README.md +29 -2
- package/dist/index.js +1500 -405
- package/package.json +3 -1
- package/skills/cctabs/SKILL.md +75 -8
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@generativereality/cctabs",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Claude Code tab manager. Terminal tabs as the UI, no tmux.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"check": "npm run typecheck && npm run build",
|
|
20
20
|
"release": "bumpp && npm publish",
|
|
21
21
|
"sync-plugin": "bash scripts/sync-plugin.sh",
|
|
22
|
+
"build:tabby-plugin": "cd tabby-plugin && npm install && npm run build",
|
|
23
|
+
"publish:tabby-plugin": "cd tabby-plugin && npm publish --access public",
|
|
22
24
|
"prepack": "bash scripts/sync-plugin.sh --check && npm run build"
|
|
23
25
|
},
|
|
24
26
|
"keywords": [
|
package/skills/cctabs/SKILL.md
CHANGED
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cctabs
|
|
3
|
-
description:
|
|
3
|
+
description: |
|
|
4
|
+
Manage Claude Code sessions across terminal tabs (Wave Terminal or Tabby) — list, open, fork, close, inspect output, send input. Each terminal tab runs its own Claude Code session.
|
|
5
|
+
|
|
6
|
+
TRIGGER when the user says any of: "open a new tab", "open a new cctab" (singular alias), "spawn a tab", "a new cctabs session", "in another tab", "in a separate tab", "fork this tab", "list my tabs", "close that tab", "send to <tab>", "resume <name>" — anything that refers to a terminal tab running Claude Code. ALSO trigger for: "/cctabs", or when the user mentions Wave Terminal / Tabby tab management for Claude Code.
|
|
7
|
+
|
|
8
|
+
DO NOT confuse with the Agent tool (background subagents): if the user explicitly says "tab" / "cctab" / "cctabs" they want a separate Claude Code session in a real terminal tab — call this skill, not Agent. The Agent tool is correct when the user says "subagent", "background agent", "spawn an agent", "do this in parallel without a new tab", or when the work is interconnected with the current session's filesystem state.
|
|
9
|
+
|
|
10
|
+
NOT for: browser tabs (use playwright/browser-automation), tmux panes, screen sessions, or non-Claude terminals.
|
|
4
11
|
---
|
|
5
12
|
|
|
6
13
|
You are managing Claude Code sessions using the `cctabs` CLI.
|
|
7
14
|
|
|
8
|
-
**Important:** "tabs" here means **terminal tabs** (
|
|
15
|
+
**Important:** "tabs" here means **terminal tabs** (Wave Terminal or Tabby), NOT browser tabs. Each terminal tab runs its own Claude Code session. This skill is for managing those terminal-based Claude Code sessions — not for browser automation.
|
|
9
16
|
|
|
10
17
|
## Before you spawn anything: is cctabs the right tool?
|
|
11
18
|
|
|
@@ -37,6 +44,64 @@ npm install -g @generativereality/cctabs
|
|
|
37
44
|
|
|
38
45
|
Do not modify PATH or npm configuration beyond this.
|
|
39
46
|
|
|
47
|
+
### Tabby users: a one-time plugin install is needed
|
|
48
|
+
|
|
49
|
+
Wave Terminal works out of the box. **Tabby additionally needs a small companion plugin** that exposes a localhost HTTP API the cctabs CLI talks to.
|
|
50
|
+
|
|
51
|
+
You don't need to detect this proactively — every cctabs command will fail with a self-documenting error if the plugin isn't running:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
cctabs Tabby plugin not reachable at http://127.0.0.1:3300.
|
|
55
|
+
reason: …
|
|
56
|
+
Install + restart Tabby in one shot from inside a Tabby tab:
|
|
57
|
+
cctabs install-tabby-plugin
|
|
58
|
+
…
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
When you see that error, ask the user once:
|
|
62
|
+
|
|
63
|
+
> *"You're in Tabby and the cctabs plugin isn't installed. I can `cctabs install-tabby-plugin --yes` — that npm-installs the plugin AND restarts Tabby in the background, dropping you back into a forked session. Caveat: any other Tabby tabs you have open will be killed. OK?"*
|
|
64
|
+
|
|
65
|
+
On approval, run `cctabs install-tabby-plugin --yes`. Tabby quits ~2s after the command returns, reopens automatically, and spawns a new tab with your forked claude session. **Your current turn ends when Tabby quits**; the resumed claude in the new tab is where the user will continue.
|
|
66
|
+
|
|
67
|
+
If the user wants to keep their other Tabby tabs intact, run `cctabs install-tabby-plugin --no-restart` instead and tell them to quit + reopen Tabby themselves.
|
|
68
|
+
|
|
69
|
+
`cctabs doctor` is also available for a deliberate environment check (terminal, Wave Accessibility, plugin reachability, Wave DB) — useful if something feels off, but **not required as a preflight** since every command fails loudly on its own.
|
|
70
|
+
|
|
71
|
+
#### Auto-install + auto-restart (recommended)
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
cctabs install-tabby-plugin --yes
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
What it does, in order:
|
|
78
|
+
1. `npm install --legacy-peer-deps --prefix <tabby-plugins-dir> tabby-cctabs`
|
|
79
|
+
2. Captures the current claude session id from `~/.claude/projects/<slug>/`
|
|
80
|
+
3. Spawns a detached background worker that quits Tabby, waits for it to die, reopens it, then opens a new tab running `claude --resume <id> --fork-session` in your current cwd.
|
|
81
|
+
|
|
82
|
+
**Other Tabby tabs in the same window get killed.** Tabby's session recovery may or may not bring them back. Use `--no-restart` to skip step 3 if the user wants control.
|
|
83
|
+
|
|
84
|
+
#### Manual install (fallback)
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
TABBY_PLUGINS="$HOME/Library/Application Support/tabby/plugins"
|
|
88
|
+
mkdir -p "$TABBY_PLUGINS"
|
|
89
|
+
[ -f "$TABBY_PLUGINS/package.json" ] || echo '{"private":true}' > "$TABBY_PLUGINS/package.json"
|
|
90
|
+
npm install --legacy-peer-deps --prefix "$TABBY_PLUGINS" tabby-cctabs
|
|
91
|
+
# then ask the user to quit + reopen Tabby
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`--legacy-peer-deps` is required: the plugin's peer deps (`tabby-core`, `@angular/*`, …) live inside Tabby itself, not on npm. Tabby's GUI plugin manager handles this internally.
|
|
95
|
+
|
|
96
|
+
Linux: replace `~/Library/Application Support/tabby` with `${XDG_CONFIG_HOME:-$HOME/.config}/tabby`.
|
|
97
|
+
Windows: `%APPDATA%\tabby`.
|
|
98
|
+
|
|
99
|
+
#### Alternative: install via Tabby's GUI
|
|
100
|
+
|
|
101
|
+
If the user prefers, point them at Tabby → **Settings → Plugins**, search "cctabs", click install, then quit + reopen Tabby. Same end state.
|
|
102
|
+
|
|
103
|
+
Do not assume "no Wave detected → cctabs unusable" — Tabby is fully supported.
|
|
104
|
+
|
|
40
105
|
---
|
|
41
106
|
|
|
42
107
|
Each Claude Code session runs in its own **terminal tab**. `cctabs` lets you — and other Claude Code sessions — introspect and orchestrate the full session fleet.
|
|
@@ -317,17 +382,19 @@ cctabs new feature ~/Dev/myapp --worktree
|
|
|
317
382
|
|
|
318
383
|
## Handling `cctabs new` Timeout Errors
|
|
319
384
|
|
|
320
|
-
`cctabs new` may occasionally fail with "Timed out waiting for new terminal block". This does **NOT** mean you have too many tabs or that
|
|
385
|
+
`cctabs new` may occasionally fail with "Timed out waiting for new terminal block" (or, on Tabby, "Shell prompt never appeared in new tab"). This does **NOT** mean you have too many tabs or that the terminal has hit a limit.
|
|
321
386
|
|
|
322
|
-
**Possible causes
|
|
323
|
-
-
|
|
324
|
-
- The internal timeout may be slightly too short for the current system load
|
|
325
|
-
- Transient IPC timing issue between cctabs and
|
|
387
|
+
**Possible causes:**
|
|
388
|
+
- The terminal app may need to be in focus / foreground for tab creation to register (true for both Wave and Tabby).
|
|
389
|
+
- The internal timeout may be slightly too short for the current system load.
|
|
390
|
+
- Transient IPC timing issue between cctabs and the terminal.
|
|
391
|
+
- **Tabby only:** the cctabs plugin must be installed and running (`curl http://127.0.0.1:3300/api/health` to verify).
|
|
326
392
|
|
|
327
393
|
**What to do:**
|
|
328
394
|
1. **Retry the same command** — it often works on the second attempt
|
|
329
395
|
2. If it fails again, wait a few seconds and retry once more
|
|
330
|
-
3. If it keeps failing, ask the user to bring
|
|
396
|
+
3. If it keeps failing, ask the user to bring the terminal app to the foreground and try again
|
|
397
|
+
4. On Tabby, also confirm the plugin is reachable (see health check above)
|
|
331
398
|
|
|
332
399
|
**What NOT to do:**
|
|
333
400
|
- ❌ Do NOT assume there is a "tab limit" — there isn't one
|