tmux-team 3.0.0 → 3.0.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 +27 -15
- package/package.json +14 -14
- package/src/cli.ts +9 -1
- package/src/commands/help.ts +15 -2
- package/src/commands/learn.ts +80 -0
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -63,6 +63,8 @@ npm install -g tmux-team
|
|
|
63
63
|
|
|
64
64
|
**Requirements:** Node.js >= 18, tmux, macOS/Linux
|
|
65
65
|
|
|
66
|
+
**Alias:** `tmt` is available as a shorthand for `tmux-team`
|
|
67
|
+
|
|
66
68
|
### Shell Completion
|
|
67
69
|
|
|
68
70
|
```bash
|
|
@@ -111,18 +113,20 @@ tmux-team add claude 10.0 "Frontend specialist"
|
|
|
111
113
|
tmux-team add codex 10.1 "Backend engineer"
|
|
112
114
|
tmux-team add gemini 10.2 "Code reviewer"
|
|
113
115
|
|
|
114
|
-
# Send messages
|
|
115
|
-
tmux-team talk codex "Review the auth module
|
|
116
|
-
tmux-team talk all "Starting the refactor now"
|
|
116
|
+
# Send messages and wait for response (recommended for better token utilization)
|
|
117
|
+
tmux-team talk codex "Review the auth module" --wait
|
|
118
|
+
tmux-team talk all "Starting the refactor now" --wait
|
|
117
119
|
|
|
118
|
-
#
|
|
119
|
-
|
|
120
|
-
tmux-team check codex 200 # More lines if needed
|
|
120
|
+
# Or use the shorthand alias
|
|
121
|
+
tmt talk codex "Quick question" --wait
|
|
121
122
|
|
|
122
123
|
# Manage agents
|
|
123
124
|
tmux-team list
|
|
124
125
|
tmux-team update codex --remark "Now handling tests"
|
|
125
126
|
tmux-team remove gemini
|
|
127
|
+
|
|
128
|
+
# Learn more
|
|
129
|
+
tmux-team learn
|
|
126
130
|
```
|
|
127
131
|
|
|
128
132
|
### From Claude Code
|
|
@@ -130,8 +134,8 @@ tmux-team remove gemini
|
|
|
130
134
|
Once the plugin is installed, coordinate directly from your Claude Code session:
|
|
131
135
|
|
|
132
136
|
```
|
|
133
|
-
/tmux-team:team codex "Can you review my changes?"
|
|
134
|
-
/tmux-team:team all "I'm starting the database migration"
|
|
137
|
+
/tmux-team:team codex "Can you review my changes?" --wait
|
|
138
|
+
/tmux-team:team all "I'm starting the database migration" --wait
|
|
135
139
|
```
|
|
136
140
|
|
|
137
141
|
---
|
|
@@ -140,9 +144,9 @@ Once the plugin is installed, coordinate directly from your Claude Code session:
|
|
|
140
144
|
|
|
141
145
|
| Command | Description |
|
|
142
146
|
|---------|-------------|
|
|
143
|
-
| `talk <agent> "<msg>"` | Send message
|
|
147
|
+
| `talk <agent> "<msg>" --wait` | Send message and wait for response (recommended) |
|
|
144
148
|
| `talk ... --delay 5` | Wait 5 seconds before sending |
|
|
145
|
-
| `talk ... --
|
|
149
|
+
| `talk ... --timeout 300` | Set max wait time (default: 180s) |
|
|
146
150
|
| `check <agent> [lines]` | Read agent's terminal output (default: 100 lines) |
|
|
147
151
|
| `list` | Show all configured agents |
|
|
148
152
|
| `add <name> <pane> [remark]` | Register a new agent |
|
|
@@ -152,6 +156,7 @@ Once the plugin is installed, coordinate directly from your Claude Code session:
|
|
|
152
156
|
| `config [show/set/clear]` | View/modify settings |
|
|
153
157
|
| `preamble [show/set/clear]` | Manage agent preambles |
|
|
154
158
|
| `install-skill <agent>` | Install skill for Claude/Codex (--local/--user) |
|
|
159
|
+
| `learn` | Show educational guide |
|
|
155
160
|
| `completion [zsh\|bash]` | Output shell completion script |
|
|
156
161
|
|
|
157
162
|
---
|
|
@@ -213,16 +218,23 @@ Global settings that apply to all projects:
|
|
|
213
218
|
|
|
214
219
|
## ✨ Features
|
|
215
220
|
|
|
216
|
-
### 📡
|
|
221
|
+
### 📡 Async Mode (Recommended)
|
|
217
222
|
|
|
218
|
-
|
|
219
|
-
# Delay before sending (safe alternative to sleep)
|
|
220
|
-
tmux-team talk codex "message" --delay 5
|
|
223
|
+
The `--wait` flag is recommended for better token utilization:
|
|
221
224
|
|
|
225
|
+
```bash
|
|
222
226
|
# Wait for response with nonce-based completion detection
|
|
223
|
-
tmux-team talk codex "
|
|
227
|
+
tmux-team talk codex "Review this code" --wait
|
|
228
|
+
|
|
229
|
+
# With custom timeout for complex tasks
|
|
230
|
+
tmux-team talk codex "Implement the feature" --wait --timeout 300
|
|
231
|
+
|
|
232
|
+
# Delay before sending (safe alternative to sleep)
|
|
233
|
+
tmux-team talk codex "message" --wait --delay 5
|
|
224
234
|
```
|
|
225
235
|
|
|
236
|
+
Enable by default: `tmux-team config set mode wait`
|
|
237
|
+
|
|
226
238
|
### 📜 Agent Preambles
|
|
227
239
|
|
|
228
240
|
Inject hidden instructions into every message via local `tmux-team.json`:
|
package/package.json
CHANGED
|
@@ -1,24 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tmux-team",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "CLI tool for AI agent collaboration in tmux - manage cross-pane communication",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
7
7
|
"tmux-team": "./bin/tmux-team",
|
|
8
8
|
"tmt": "./bin/tmux-team"
|
|
9
9
|
},
|
|
10
|
-
"scripts": {
|
|
11
|
-
"dev": "tsx src/cli.ts",
|
|
12
|
-
"tmt": "./bin/tmux-team",
|
|
13
|
-
"test": "vitest",
|
|
14
|
-
"test:run": "vitest run",
|
|
15
|
-
"lint": "oxlint src/",
|
|
16
|
-
"lint:fix": "oxlint src/ --fix",
|
|
17
|
-
"format": "prettier --write src/",
|
|
18
|
-
"format:check": "prettier --check src/",
|
|
19
|
-
"type:check": "tsc --noEmit",
|
|
20
|
-
"check": "npm run type:check && npm run lint && npm run format:check"
|
|
21
|
-
},
|
|
22
10
|
"keywords": [
|
|
23
11
|
"tmux",
|
|
24
12
|
"cli",
|
|
@@ -54,5 +42,17 @@
|
|
|
54
42
|
"prettier": "^3.7.4",
|
|
55
43
|
"typescript": "^5.3.0",
|
|
56
44
|
"vitest": "^1.2.0"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"dev": "tsx src/cli.ts",
|
|
48
|
+
"tmt": "./bin/tmux-team",
|
|
49
|
+
"test": "vitest",
|
|
50
|
+
"test:run": "vitest run",
|
|
51
|
+
"lint": "oxlint src/",
|
|
52
|
+
"lint:fix": "oxlint src/ --fix",
|
|
53
|
+
"format": "prettier --write src/",
|
|
54
|
+
"format:check": "prettier --check src/",
|
|
55
|
+
"type:check": "tsc --noEmit",
|
|
56
|
+
"check": "npm run type:check && npm run lint && npm run format:check"
|
|
57
57
|
}
|
|
58
|
-
}
|
|
58
|
+
}
|
package/src/cli.ts
CHANGED
|
@@ -20,6 +20,7 @@ import { cmdCompletion } from './commands/completion.js';
|
|
|
20
20
|
import { cmdConfig } from './commands/config.js';
|
|
21
21
|
import { cmdPreamble } from './commands/preamble.js';
|
|
22
22
|
import { cmdInstallSkill } from './commands/install-skill.js';
|
|
23
|
+
import { cmdLearn } from './commands/learn.js';
|
|
23
24
|
|
|
24
25
|
// ─────────────────────────────────────────────────────────────
|
|
25
26
|
// Argument parsing
|
|
@@ -106,17 +107,20 @@ function main(): void {
|
|
|
106
107
|
|
|
107
108
|
// Help - load config to show current mode/timeout
|
|
108
109
|
if (!command || command === 'help' || command === '--help' || command === '-h') {
|
|
110
|
+
// Show intro highlight when running just `tmux-team` with no args
|
|
111
|
+
const showIntro = !command || argv.length === 0;
|
|
109
112
|
try {
|
|
110
113
|
const paths = resolvePaths();
|
|
111
114
|
const config = loadConfig(paths);
|
|
112
115
|
const helpConfig: HelpConfig = {
|
|
113
116
|
mode: config.mode,
|
|
114
117
|
timeout: config.defaults.timeout,
|
|
118
|
+
showIntro,
|
|
115
119
|
};
|
|
116
120
|
cmdHelp(helpConfig);
|
|
117
121
|
} catch {
|
|
118
122
|
// Fallback if config can't be loaded
|
|
119
|
-
cmdHelp();
|
|
123
|
+
cmdHelp({ showIntro });
|
|
120
124
|
}
|
|
121
125
|
process.exit(ExitCodes.SUCCESS);
|
|
122
126
|
}
|
|
@@ -229,6 +233,10 @@ function main(): void {
|
|
|
229
233
|
}
|
|
230
234
|
break;
|
|
231
235
|
|
|
236
|
+
case 'learn':
|
|
237
|
+
cmdLearn();
|
|
238
|
+
break;
|
|
239
|
+
|
|
232
240
|
default:
|
|
233
241
|
ctx.ui.error(`Unknown command: ${command}. Run 'tmux-team help' for usage.`);
|
|
234
242
|
ctx.exit(ExitCodes.ERROR);
|
package/src/commands/help.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { VERSION } from '../version.js';
|
|
|
8
8
|
export interface HelpConfig {
|
|
9
9
|
mode?: 'polling' | 'wait';
|
|
10
10
|
timeout?: number;
|
|
11
|
+
showIntro?: boolean;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
export function cmdHelp(config?: HelpConfig): void {
|
|
@@ -15,17 +16,28 @@ export function cmdHelp(config?: HelpConfig): void {
|
|
|
15
16
|
const timeout = config?.timeout ?? 180;
|
|
16
17
|
const isWaitMode = mode === 'wait';
|
|
17
18
|
|
|
19
|
+
// Show intro highlight when running just `tmux-team` with no args
|
|
20
|
+
if (config?.showIntro) {
|
|
21
|
+
console.log(`
|
|
22
|
+
${colors.cyan('┌─────────────────────────────────────────────────────────────┐')}
|
|
23
|
+
${colors.cyan('│')} ${colors.yellow('New to tmux-team?')} Run ${colors.green('tmux-team learn')} or ${colors.green('tmt learn')} ${colors.cyan('│')}
|
|
24
|
+
${colors.cyan('│')} ${colors.dim('tmt is a shorthand alias for tmux-team')} ${colors.cyan('│')}
|
|
25
|
+
${colors.cyan('└─────────────────────────────────────────────────────────────┘')}`);
|
|
26
|
+
}
|
|
27
|
+
|
|
18
28
|
// Mode indicator with clear explanation
|
|
19
29
|
const modeInfo = isWaitMode
|
|
20
|
-
? `${colors.yellow('CURRENT MODE')}: ${colors.green('wait')} (timeout: ${timeout}s)
|
|
30
|
+
? `${colors.yellow('CURRENT MODE')}: ${colors.green('wait')} (timeout: ${timeout}s) ${colors.green('✓ recommended')}
|
|
21
31
|
${colors.dim('→ talk commands will BLOCK until agent responds or timeout')}
|
|
22
32
|
${colors.dim('→ Response is returned directly, no need to use check command')}`
|
|
23
33
|
: `${colors.yellow('CURRENT MODE')}: ${colors.cyan('polling')}
|
|
24
34
|
${colors.dim('→ talk commands send and return immediately')}
|
|
25
|
-
${colors.dim('→ Use check command to read agent response')}
|
|
35
|
+
${colors.dim('→ Use check command to read agent response')}
|
|
36
|
+
${colors.dim('→')} ${colors.yellow('TIP')}: ${colors.dim('Use --wait or set mode to wait for better token utilization')}`;
|
|
26
37
|
|
|
27
38
|
console.log(`
|
|
28
39
|
${colors.cyan('tmux-team')} v${VERSION} - AI agent collaboration in tmux
|
|
40
|
+
${colors.dim('Alias: tmt')}
|
|
29
41
|
|
|
30
42
|
${modeInfo}
|
|
31
43
|
|
|
@@ -44,6 +56,7 @@ ${colors.yellow('COMMANDS')}
|
|
|
44
56
|
${colors.green('preamble')} [show|set|clear] Manage agent preambles
|
|
45
57
|
${colors.green('install-skill')} <agent> Install skill for AI agent
|
|
46
58
|
${colors.green('completion')} Output shell completion script
|
|
59
|
+
${colors.green('learn')} Show educational guide
|
|
47
60
|
${colors.green('help')} Show this help message
|
|
48
61
|
|
|
49
62
|
${colors.yellow('OPTIONS')}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// ─────────────────────────────────────────────────────────────
|
|
2
|
+
// learn command - educational guide for tmux-team
|
|
3
|
+
// ─────────────────────────────────────────────────────────────
|
|
4
|
+
|
|
5
|
+
import { colors } from '../ui.js';
|
|
6
|
+
|
|
7
|
+
export function cmdLearn(): void {
|
|
8
|
+
console.log(`
|
|
9
|
+
${colors.cyan('tmux-team')} - Multi-Agent Coordination Guide
|
|
10
|
+
|
|
11
|
+
${colors.yellow('WHAT IS TMUX-TEAM?')}
|
|
12
|
+
|
|
13
|
+
tmux-team enables AI agents (Claude, Codex, Gemini) running in separate
|
|
14
|
+
terminal panes to communicate with each other. Think of it as a messaging
|
|
15
|
+
system for terminal-based AI agents.
|
|
16
|
+
|
|
17
|
+
${colors.yellow('CORE CONCEPT')}
|
|
18
|
+
|
|
19
|
+
Each agent runs in its own tmux pane. When you talk to another agent:
|
|
20
|
+
1. Your message is sent to their pane via tmux send-keys
|
|
21
|
+
2. They see it as if a human typed it
|
|
22
|
+
3. You read their response by capturing their pane output
|
|
23
|
+
|
|
24
|
+
${colors.yellow('ESSENTIAL COMMANDS')}
|
|
25
|
+
|
|
26
|
+
${colors.green('tmux-team list')} List available agents
|
|
27
|
+
${colors.green('tmux-team talk')} <agent> "<msg>" Send a message
|
|
28
|
+
${colors.green('tmux-team check')} <agent> [lines] Read agent's response
|
|
29
|
+
${colors.green('tmux-team talk')} <agent> --wait Send and wait for response
|
|
30
|
+
|
|
31
|
+
${colors.yellow('RECOMMENDED: ASYNC MODE (--wait)')}
|
|
32
|
+
|
|
33
|
+
The ${colors.green('--wait')} flag is recommended for better token utilization:
|
|
34
|
+
|
|
35
|
+
${colors.dim('# Without --wait (polling mode):')}
|
|
36
|
+
tmux-team talk codex "Review this code"
|
|
37
|
+
${colors.dim('# ... wait manually ...')}
|
|
38
|
+
tmux-team check codex ${colors.dim('← extra command')}
|
|
39
|
+
|
|
40
|
+
${colors.dim('# With --wait (async mode):')}
|
|
41
|
+
tmux-team talk codex "Review this code" --wait
|
|
42
|
+
${colors.dim('↳ Blocks until response, returns it directly')}
|
|
43
|
+
|
|
44
|
+
Enable by default: ${colors.cyan('tmux-team config set mode wait')}
|
|
45
|
+
|
|
46
|
+
${colors.yellow('PRACTICAL EXAMPLES')}
|
|
47
|
+
|
|
48
|
+
${colors.dim('# Quick question (async)')}
|
|
49
|
+
tmux-team talk codex "What's the auth status?" --wait
|
|
50
|
+
|
|
51
|
+
${colors.dim('# Delegate a task with timeout')}
|
|
52
|
+
tmux-team talk gemini "Implement login form" --wait --timeout 300
|
|
53
|
+
|
|
54
|
+
${colors.dim('# Broadcast to all agents')}
|
|
55
|
+
tmux-team talk all "Sync: PR #123 was merged" --wait
|
|
56
|
+
|
|
57
|
+
${colors.yellow('CONFIGURATION')}
|
|
58
|
+
|
|
59
|
+
Config file: ${colors.cyan('./tmux-team.json')}
|
|
60
|
+
|
|
61
|
+
{
|
|
62
|
+
"$config": { "mode": "wait" },
|
|
63
|
+
"codex": { "pane": "%1", "remark": "Code reviewer" },
|
|
64
|
+
"gemini": { "pane": "%2", "remark": "Documentation" }
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
Find your pane ID: ${colors.cyan('tmux display-message -p "#{pane_id}"')}
|
|
68
|
+
|
|
69
|
+
${colors.yellow('BEST PRACTICES')}
|
|
70
|
+
|
|
71
|
+
1. ${colors.green('Use --wait for important tasks')} - ensures complete response
|
|
72
|
+
2. ${colors.green('Be explicit')} - tell agents exactly what you need
|
|
73
|
+
3. ${colors.green('Set timeout appropriately')} - complex tasks need more time
|
|
74
|
+
4. ${colors.green('Broadcast sparingly')} - only for announcements everyone needs
|
|
75
|
+
|
|
76
|
+
${colors.yellow('NEXT STEP')}
|
|
77
|
+
|
|
78
|
+
Run ${colors.cyan('tmux-team list')} to see available agents in your project.
|
|
79
|
+
`);
|
|
80
|
+
}
|