forked from asheshgoplani/agent-deck
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathllms-full.txt
More file actions
1728 lines (1230 loc) · 45.8 KB
/
llms-full.txt
File metadata and controls
1728 lines (1230 loc) · 45.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Agent Deck - Complete Documentation for AI Assistants
This file contains complete documentation for AI/LLM consumption.
**Discord:** https://discord.gg/e4xSs6NBN8
---
# README
<div align="center">
<!-- Status Grid Logo -->
<img src="site/logo.svg" alt="Agent Deck Logo" width="120">
# Agent Deck
**Your AI agent command center**
[](https://github.com/asheshgoplani/agent-deck/stargazers)
[](https://go.dev)
[](LICENSE)
[](https://github.com/asheshgoplani/agent-deck)
[](https://github.com/asheshgoplani/agent-deck/releases)
[](https://discord.gg/e4xSs6NBN8)
[Features](#features) . [Install](#installation) . [Quick Start](#quick-start) . [Docs](#documentation) . [Discord](https://discord.gg/e4xSs6NBN8) . [FAQ](#faq)
</div>
<details>
<summary><b>Ask AI about Agent Deck</b></summary>
**Option 1: Claude Code Skill** (recommended for Claude Code users)
```bash
/plugin marketplace add asheshgoplani/agent-deck
/plugin install agent-deck@agent-deck-help
```
Then ask: *"How do I set up MCP pooling?"*
**Option 2: OpenCode** (has built-in Claude skill compatibility)
```bash
# Create skill directory
mkdir -p ~/.claude/skills/agent-deck/references
# Download skill and references
curl -sL https://raw.githubusercontent.com/asheshgoplani/agent-deck/main/skills/agent-deck/SKILL.md \
> ~/.claude/skills/agent-deck/SKILL.md
for f in cli-reference config-reference tui-reference troubleshooting; do
curl -sL "https://raw.githubusercontent.com/asheshgoplani/agent-deck/main/skills/agent-deck/references/${f}.md" \
> ~/.claude/skills/agent-deck/references/${f}.md
done
```
OpenCode will auto-discover the skill from `~/.claude/skills/`.
**Option 3: Any LLM** (ChatGPT, Claude, Gemini, etc.)
```
Read https://raw.githubusercontent.com/asheshgoplani/agent-deck/main/README.md
and answer: How do I fork a session?
```
</details>
https://github.com/user-attachments/assets/e4f55917-435c-45ba-92cc-89737d0d1401
## The Problem
Running Claude Code on 10 projects? OpenCode on 5 more? Another agent somewhere in the background?
**Managing multiple AI sessions gets messy fast.** Too many terminal tabs. Hard to track what's running, what's waiting, what's done. Switching between projects means hunting through windows.
## The Solution
**Agent Deck is mission control for your AI coding agents.**
One terminal. All your agents. Complete visibility.
- **See everything at a glance** — running, waiting, or idle status for every agent instantly
- **Switch in milliseconds** — jump between any session with a single keystroke
- **Stay organized** — groups, search, notifications, and git worktrees keep everything manageable
## Features
### Fork Sessions
Try different approaches without losing context. Fork any Claude conversation instantly. Each fork inherits the full conversation history.
- Press `f` for quick fork, `F` to customize name/group
- Fork your forks to explore as many branches as you need
### MCP Manager
Attach MCP servers without touching config files. Need web search? Browser automation? Toggle them on per project or globally. Agent Deck handles the restart automatically.
- Press `m` to open, `Space` to toggle, `Tab` to cycle scope (LOCAL/GLOBAL)
- Define your MCPs once in `~/.agent-deck/config.toml`, then toggle per session — see [Configuration Reference](skills/agent-deck/references/config-reference.md)
### MCP Socket Pool
Running many sessions? Socket pooling shares MCP processes across all sessions via Unix sockets, reducing MCP memory usage by 85-90%. Connections auto-recover from MCP crashes in ~3 seconds via a reconnecting proxy. Enable with `pool_all = true` in [config.toml](skills/agent-deck/references/config-reference.md).
### Search
Press `/` to fuzzy-search across all sessions. Filter by status with `!` (running), `@` (waiting), `#` (idle), `$` (error). Press `G` for global search across all Claude conversations.
### Status Detection
Smart polling detects what every agent is doing right now:
| Status | Symbol | What It Means |
|--------|--------|---------------|
| **Running** | `●` green | Agent is actively working |
| **Waiting** | `◐` yellow | Needs your input |
| **Idle** | `○` gray | Ready for commands |
| **Error** | `✕` red | Something went wrong |
### Notification Bar
Waiting sessions appear right in your tmux status bar. Press `Ctrl+b 1-6` to jump directly to them.
```
⚡ [1] frontend [2] api [3] backend
```
### Git Worktrees
Multiple agents can work on the same repo without conflicts. Each worktree is an isolated working directory with its own branch.
- `agent-deck add . -c claude --worktree feature/a --new-branch` creates a session in a new worktree
- `agent-deck add . --worktree feature/b -b --location subdirectory` places the worktree under `.worktrees/` inside the repo
- `agent-deck worktree cleanup` finds and removes orphaned worktrees
Configure the default worktree location in `~/.agent-deck/config.toml`:
```toml
[worktree]
default_location = "subdirectory" # "sibling" (default), "subdirectory", or a custom path
```
`sibling` creates worktrees next to the repo (`repo-branch`). `subdirectory` creates them inside it (`repo/.worktrees/branch`). A custom path like `~/worktrees` or `/tmp/worktrees` creates repo-namespaced worktrees at `<path>/<repo_name>/<branch>`. The `--location` flag overrides the config per session.
### Multi-Tool Support
Agent Deck works with any terminal-based AI tool:
| Tool | Integration Level |
|------|-------------------|
| **Claude Code** | Full (status, MCP, fork, resume) |
| **Gemini CLI** | Full (status, MCP, resume) |
| **OpenCode** | Status detection, organization |
| **Codex** | Status detection, organization |
| **Cursor** (terminal) | Status detection, organization |
| **Custom tools** | Configurable via `[tools.*]` in config.toml |
## Installation
**Works on:** macOS, Linux, Windows (WSL)
```bash
curl -fsSL https://raw.githubusercontent.com/asheshgoplani/agent-deck/main/install.sh | bash
```
Then run: `agent-deck`
<details>
<summary>Other install methods</summary>
**Homebrew**
```bash
brew install asheshgoplani/tap/agent-deck
```
**Go**
```bash
go install github.com/asheshgoplani/agent-deck/cmd/agent-deck@latest
```
**From Source**
```bash
git clone https://github.com/asheshgoplani/agent-deck.git && cd agent-deck && make install
```
</details>
### Claude Code Skill
Install the agent-deck skill for AI-assisted session management:
```bash
/plugin marketplace add asheshgoplani/agent-deck
/plugin install agent-deck@agent-deck
```
<details>
<summary>Uninstalling</summary>
```bash
agent-deck uninstall # Interactive uninstall
agent-deck uninstall --keep-data # Remove binary only, keep sessions
```
See [Troubleshooting](skills/agent-deck/references/troubleshooting.md#uninstalling) for full details.
</details>
## Quick Start
```bash
agent-deck # Launch TUI
agent-deck add . -c claude # Add current dir with Claude
agent-deck session fork my-proj # Fork a Claude session
agent-deck mcp attach my-proj exa # Attach MCP to session
```
### Key Shortcuts
| Key | Action |
|-----|--------|
| `Enter` | Attach to session |
| `n` | New session |
| `f` / `F` | Fork (quick / dialog) |
| `m` | MCP Manager |
| `s` | Skills Manager (Claude) |
| `M` | Move session to group |
| `S` | Settings |
| `/` / `G` | Search / Global search |
| `r` | Restart session |
| `d` | Delete |
| `?` | Full help |
See [TUI Reference](skills/agent-deck/references/tui-reference.md) for all shortcuts and [CLI Reference](skills/agent-deck/references/cli-reference.md) for all commands.
## Documentation
| Guide | What's Inside |
|-------|---------------|
| [CLI Reference](skills/agent-deck/references/cli-reference.md) | Commands, flags, scripting examples |
| [Configuration](skills/agent-deck/references/config-reference.md) | config.toml, MCP setup, custom tools, socket pool |
| [TUI Reference](skills/agent-deck/references/tui-reference.md) | Keyboard shortcuts, status indicators, navigation |
| [Troubleshooting](skills/agent-deck/references/troubleshooting.md) | Common issues, debugging, recovery, uninstalling |
Additional resources:
- [CONTRIBUTING.md](CONTRIBUTING.md) — how to contribute
- [CHANGELOG.md](CHANGELOG.md) — release history
### Updates
Agent Deck checks for updates automatically. Run `agent-deck update` to install, or set `auto_update = true` in [config.toml](skills/agent-deck/references/config-reference.md) for automatic updates.
## FAQ
<details>
<summary><b>How is this different from just using tmux?</b></summary>
Agent Deck adds AI-specific intelligence on top of tmux: smart status detection (knows when Claude is thinking vs. waiting), session forking with context inheritance, MCP management, global search across conversations, and organized groups. Think of it as tmux plus AI awareness.
</details>
<details>
<summary><b>Can I use it on Windows?</b></summary>
Yes, via WSL (Windows Subsystem for Linux). [Install WSL](https://learn.microsoft.com/en-us/windows/wsl/install), then run the installer inside WSL. WSL2 is recommended for full feature support including MCP socket pooling.
</details>
<details>
<summary><b>Will it interfere with my existing tmux setup?</b></summary>
No. Agent Deck creates its own tmux sessions with the prefix `agentdeck_*`. Your existing sessions are untouched. The installer backs up your `~/.tmux.conf` before adding optional config, and you can skip it with `--skip-tmux-config`.
</details>
## Development
```bash
make build # Build
make test # Test
make lint # Lint
```
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
## Star History
If Agent Deck saves you time, give us a star! It helps others discover the project.
[](https://star-history.com/#asheshgoplani/agent-deck&Date)
## License
MIT License — see [LICENSE](LICENSE)
---
<div align="center">
Built with [Bubble Tea](https://github.com/charmbracelet/bubbletea) and [tmux](https://github.com/tmux/tmux)
**[Docs](skills/agent-deck/references/) . [Issues](https://github.com/asheshgoplani/agent-deck/issues) . [Discussions](https://github.com/asheshgoplani/agent-deck/discussions)**
</div>
---
# SKILL GUIDE
---
name: agent-deck
description: Terminal session manager for AI coding agents. Use when user mentions "agent-deck", "session", "sub-agent", "MCP attach", "git worktree", or needs to (1) create/start/stop/restart/fork sessions, (2) attach/detach MCPs, (3) manage groups/profiles, (4) get session output, (5) configure agent-deck, (6) troubleshoot issues, (7) launch sub-agents, or (8) create/manage worktree sessions. Covers CLI commands, TUI shortcuts, config.toml options, and automation.
compatibility: claude, opencode
---
# Agent Deck
Terminal session manager for AI coding agents. Built with Go + Bubble Tea.
**Version:** 0.8.98 | **Repo:** [github.com/asheshgoplani/agent-deck](https://github.com/asheshgoplani/agent-deck)
## Script Path Resolution (IMPORTANT)
This skill includes helper scripts in its `scripts/` subdirectory. When Claude Code loads this skill, it shows a line like:
```
Base directory for this skill: /path/to/.../skills/agent-deck
```
**You MUST use that base directory path to resolve all script references.** Store it as `SKILL_DIR`:
```bash
# Set SKILL_DIR to the base directory shown when this skill was loaded
SKILL_DIR="/path/shown/in/base-directory-line"
# Then run scripts as:
$SKILL_DIR/scripts/launch-subagent.sh "Title" "Prompt" --wait
```
**Common mistake:** Do NOT use `<project-root>/scripts/launch-subagent.sh`. The scripts live inside the skill's own directory (plugin cache or project skills folder), NOT in the user's project root.
**For plugin users**, the path looks like: `~/.claude/plugins/cache/agent-deck/agent-deck/<hash>/skills/agent-deck/scripts/`
**For local development**, the path looks like: `<repo>/skills/agent-deck/scripts/`
## Quick Start
```bash
# Launch TUI
agent-deck
# Create and start a session
agent-deck add -t "Project" -c claude /path/to/project
agent-deck session start "Project"
# Send message and get output
agent-deck session send "Project" "Analyze this codebase"
agent-deck session output "Project"
```
## Essential Commands
| Command | Purpose |
|---------|---------|
| `agent-deck` | Launch interactive TUI |
| `agent-deck add -t "Name" -c claude /path` | Create session |
| `agent-deck session start/stop/restart <name>` | Control session |
| `agent-deck session send <name> "message"` | Send message |
| `agent-deck session output <name>` | Get last response |
| `agent-deck session current [-q\|--json]` | Auto-detect current session |
| `agent-deck session fork <name>` | Fork Claude conversation |
| `agent-deck mcp list` | List available MCPs |
| `agent-deck mcp attach <name> <mcp>` | Attach MCP (then restart) |
| `agent-deck status` | Quick status summary |
| `agent-deck add --worktree <branch>` | Create session in git worktree |
| `agent-deck worktree list` | List worktrees with sessions |
| `agent-deck worktree cleanup` | Find orphaned worktrees/sessions |
**Status:** `●` running | `◐` waiting | `○` idle | `✕` error
## Sub-Agent Launch
**Use when:** User says "launch sub-agent", "create sub-agent", "spawn agent"
```bash
$SKILL_DIR/scripts/launch-subagent.sh "Title" "Prompt" [--mcp name] [--wait]
```
The script auto-detects current session/profile and creates a child session.
### Retrieval Modes
| Mode | Command | Use When |
|------|---------|----------|
| **Fire & forget** | (no --wait) | Default. Tell user: "Ask me to check when ready" |
| **On-demand** | `agent-deck session output "Title"` | User asks to check |
| **Blocking** | `--wait` flag | Need immediate result |
### Recommended MCPs
| Task Type | MCPs |
|-----------|------|
| Web research | `exa`, `firecrawl` |
| Code documentation | `context7` |
| Complex reasoning | `sequential-thinking` |
## Consult Another Agent (Codex, Gemini)
**Use when:** User says "consult with codex", "ask gemini", "get codex's opinion", "what does codex think", "consult another agent", "brainstorm with codex/gemini", "get a second opinion"
**IMPORTANT:** You MUST use the `--tool` flag to specify which agent. Without it, the script defaults to Claude.
### Quick Reference
```bash
# Consult Codex (MUST include --tool codex)
$SKILL_DIR/scripts/launch-subagent.sh "Consult Codex" "Your question here" --tool codex --wait --timeout 120
# Consult Gemini (MUST include --tool gemini)
$SKILL_DIR/scripts/launch-subagent.sh "Consult Gemini" "Your question here" --tool gemini --wait --timeout 120
```
**DO NOT** try to create Codex/Gemini sessions manually with `agent-deck add`. Always use the script above. It handles tool-specific initialization, readiness detection, and output retrieval automatically.
### Full Options
```bash
$SKILL_DIR/scripts/launch-subagent.sh "Title" "Prompt" \
--tool codex|gemini \ # REQUIRED for non-Claude agents
--path /project/dir \ # Working directory (auto-inherits parent path if omitted)
--wait \ # Block until response is ready
--timeout 180 \ # Seconds to wait (default: 300)
--mcp exa # Attach MCP servers (can repeat)
```
### Supported Tools
| Tool | Flag | Notes |
|------|------|-------|
| Claude | `--tool claude` | Default, no flag needed |
| Codex | `--tool codex` | Requires `codex` CLI installed |
| Gemini | `--tool gemini` | Requires `gemini` CLI installed |
### How It Works
1. Script auto-detects current session and profile
2. Creates a child session with the specified tool in the parent's project directory
3. Waits for the tool to initialize (handles Codex approval prompts automatically)
4. Sends the question/prompt
5. With `--wait`: polls until the agent responds, then returns the full output
6. Without `--wait`: returns immediately, check output later with `agent-deck session output "Title"`
### Examples
```bash
# Code review from Codex
$SKILL_DIR/scripts/launch-subagent.sh "Codex Review" "Read cmd/main.go and suggest improvements" --tool codex --wait --timeout 180
# Architecture feedback from Gemini
$SKILL_DIR/scripts/launch-subagent.sh "Gemini Arch" "Review the project structure and suggest better patterns" --tool gemini --wait --timeout 180
# Both in parallel (consult both, compare answers)
$SKILL_DIR/scripts/launch-subagent.sh "Ask Codex" "Best way to handle errors in Go?" --tool codex --wait --timeout 120 &
$SKILL_DIR/scripts/launch-subagent.sh "Ask Gemini" "Best way to handle errors in Go?" --tool gemini --wait --timeout 120 &
wait
```
### Cleanup
After getting the response, remove the consultation session:
```bash
agent-deck remove "Consult Codex"
# Or remove multiple at once:
agent-deck remove "Codex Review" && agent-deck remove "Gemini Arch"
```
## TUI Keyboard Shortcuts
### Navigation
| Key | Action |
|-----|--------|
| `j/k` or `↑/↓` | Move up/down |
| `h/l` or `←/→` | Collapse/expand groups |
| `Enter` | Attach to session |
### Session Actions
| Key | Action |
|-----|--------|
| `n` | New session |
| `r/R` | Restart (reloads MCPs) |
| `m` | MCP Manager |
| `s` | Skills Manager (Claude) |
| `f/F` | Fork Claude session |
| `d` | Delete |
| `M` | Move to group |
### Search & Filter
| Key | Action |
|-----|--------|
| `/` | Local search |
| `G` | Global search (all Claude conversations) |
| `!@#$` | Filter by status (running/waiting/idle/error) |
### Global
| Key | Action |
|-----|--------|
| `?` | Help overlay |
| `Ctrl+Q` | Detach (keep tmux running) |
| `q` | Quit |
## MCP Management
**Default:** Do NOT attach MCPs unless user explicitly requests.
```bash
# List available
agent-deck mcp list
# Attach and restart
agent-deck mcp attach <session> <mcp-name>
agent-deck session restart <session>
# Or attach on create
agent-deck add -t "Task" -c claude --mcp exa /path
```
**Scopes:**
- **LOCAL** (default) - `.mcp.json` in project, affects only that session
- **GLOBAL** (`--global`) - Claude config, affects all projects
## Worktree Workflows
### Create Session in Git Worktree
When working on a feature that needs isolation from main branch:
```bash
# Create session with new worktree and branch
agent-deck add /path/to/repo -t "Feature Work" -c claude --worktree feature/my-feature --new-branch
# Create session in existing branch's worktree
agent-deck add . --worktree develop -c claude
```
### List and Manage Worktrees
```bash
# List all worktrees and their associated sessions
agent-deck worktree list
# Show detailed info for a session's worktree
agent-deck worktree info "My Session"
# Find orphaned worktrees/sessions (dry-run)
agent-deck worktree cleanup
# Actually clean up orphans
agent-deck worktree cleanup --force
```
### When to Use Worktrees
| Use Case | Benefit |
|----------|---------|
| **Parallel agent work** | Multiple agents on same repo, different branches |
| **Feature isolation** | Keep main branch clean while agent experiments |
| **Code review** | Agent reviews PR in worktree while main work continues |
| **Hotfix work** | Quick branch off main without disrupting feature work |
## Configuration
**File:** `~/.agent-deck/config.toml`
```toml
[claude]
config_dir = "~/.claude" # Global Claude profile
dangerous_mode = true # --dangerously-skip-permissions
[profiles.work.claude]
config_dir = "~/.claude-work" # Optional override for profile "work"
[logs]
max_size_mb = 10 # Max before truncation
max_lines = 10000 # Lines to keep
[mcps.exa]
command = "npx"
args = ["-y", "exa-mcp-server"]
env = { EXA_API_KEY = "key" }
description = "Web search"
```
See [config-reference.md](references/config-reference.md) for all options.
## Troubleshooting
| Issue | Solution |
|-------|----------|
| Session shows error | `agent-deck session start <name>` |
| MCPs not loading | `agent-deck session restart <name>` |
| Flag not working | Put flags BEFORE arguments: `-m "msg" name` not `name -m "msg"` |
### Report a Bug
If something isn't working, create a GitHub issue with context:
```bash
# Gather debug info
agent-deck version
agent-deck status --json
cat ~/.agent-deck/config.toml | grep -v "KEY\|TOKEN\|SECRET" # Sanitized config
# Create issue at:
# https://github.com/asheshgoplani/agent-deck/issues/new
```
**Include:**
1. What you tried (command/action)
2. What happened vs expected
3. Output of commands above
4. Relevant log: `tail -100 ~/.agent-deck/logs/agentdeck_<session>_*.log`
See [troubleshooting.md](references/troubleshooting.md) for detailed diagnostics.
## Session Sharing
Share Claude sessions between developers for collaboration or handoff.
**Use when:** User says "share session", "export session", "send to colleague", "import session"
```bash
# Export current session to file (session-share is a sibling skill)
$SKILL_DIR/../session-share/scripts/export.sh
# Output: ~/session-shares/session-<date>-<title>.json
# Import received session
$SKILL_DIR/../session-share/scripts/import.sh ~/Downloads/session-file.json
```
**See:** [session-share skill](../session-share/SKILL.md) for full documentation.
## Critical Rules
1. **Flags before arguments:** `session start -m "Hello" name` (not `name -m "Hello"`)
2. **Restart after MCP attach:** Always run `session restart` after `mcp attach`
3. **Never poll from other agents** - can interfere with target session
## References
- [cli-reference.md](references/cli-reference.md) - Complete CLI command reference
- [config-reference.md](references/config-reference.md) - All config.toml options
- [tui-reference.md](references/tui-reference.md) - TUI features and shortcuts
- [troubleshooting.md](references/troubleshooting.md) - Common issues and bug reporting
- [session-share skill](../session-share/SKILL.md) - Export/import sessions for collaboration
---
# CLI REFERENCE
# CLI Command Reference
Complete reference for all agent-deck CLI commands.
## Table of Contents
- [Global Options](#global-options)
- [Basic Commands](#basic-commands)
- [Session Commands](#session-commands)
- [MCP Commands](#mcp-commands)
- [Group Commands](#group-commands)
- [Profile Commands](#profile-commands)
## Global Options
```bash
-p, --profile <name> Use specific profile
--json JSON output
-q, --quiet Minimal output
```
## Basic Commands
### add - Create session
```bash
agent-deck add [path] [options]
```
| Flag | Description |
|------|-------------|
| `-t, --title` | Session title |
| `-g, --group` | Group path |
| `-c, --cmd` | Command (claude, gemini, opencode, codex, custom) |
| `--parent` | Parent session (creates child) |
| `--mcp` | Attach MCP (repeatable) |
```bash
agent-deck add -t "My Project" -c claude .
agent-deck add -t "Child" --parent "Parent" -c claude /tmp/x
agent-deck add -t "Research" -c claude --mcp exa --mcp firecrawl /tmp/r
```
### list - List sessions
```bash
agent-deck list [--json] [--all]
agent-deck ls # Alias
```
### remove - Remove session
```bash
agent-deck remove <id|title>
agent-deck rm # Alias
```
### status - Status summary
```bash
agent-deck status [-v|-q|--json]
```
- Default: `2 waiting - 5 running - 3 idle`
- `-v`: Detailed list by status
- `-q`: Just waiting count (for scripts)
## Session Commands
### session start
```bash
agent-deck session start <id|title> [-m "message"] [--json] [-q]
```
`-m` sends initial message after agent is ready.
**CRITICAL:** Flags MUST come BEFORE session name!
```bash
# Correct
agent-deck session start -m "Hello" my-project
# WRONG - flag ignored!
agent-deck session start my-project -m "Hello"
```
### session stop
```bash
agent-deck session stop <id|title>
```
### session restart
```bash
agent-deck session restart <id|title>
```
Reloads MCPs without losing conversation (Claude/Gemini).
### session fork (Claude only)
```bash
agent-deck session fork <id|title> [-t "title"] [-g "group"]
```
Creates new session with same Claude conversation.
**Requirements:**
- Session must be Claude tool
- Must have valid Claude session ID
### session attach
```bash
agent-deck session attach <id|title>
```
Interactive PTY mode. Press `Ctrl+Q` to detach.
### session show
```bash
agent-deck session show [id|title] [--json] [-q]
```
Auto-detects current session if no ID provided.
**JSON output includes:**
- Session details (id, title, status, path, group, tool)
- Claude/Gemini session ID
- Attached MCPs (local, global, project)
- tmux session name
### session current
```bash
agent-deck session current [--json] [-q]
```
Auto-detect current session and profile from tmux environment.
```bash
# Human-readable
agent-deck session current
# Session: test, Profile: work, ID: c5bfd4b4, Status: running
# For scripts
agent-deck session current -q
# test
# JSON
agent-deck session current --json
# {"session":"test","profile":"work","id":"c5bfd4b4",...}
```
**Profile auto-detection priority:**
1. `AGENTDECK_PROFILE` env var
2. Parse from `CLAUDE_CONFIG_DIR` (`~/.claude-work` -> `work`)
3. Config default or `default`
### session set
```bash
agent-deck session set <id|title> <field> <value>
```
**Fields:** title, path, command, tool, claude-session-id, gemini-session-id
### session send
```bash
agent-deck session send <id|title> "message" [--no-wait] [-q] [--json]
```
Default: Waits for agent readiness before sending.
### session output
```bash
agent-deck session output [id|title] [--json] [-q]
```
Get last response from Claude/Gemini session.
### session set-parent / unset-parent
```bash
agent-deck session set-parent <session> <parent>
agent-deck session unset-parent <session>
```
## MCP Commands
### mcp list
```bash
agent-deck mcp list [--json] [-q]
```
### mcp attached
```bash
agent-deck mcp attached [id|title] [--json] [-q]
```
Shows MCPs from LOCAL, GLOBAL, PROJECT scopes.
### mcp attach
```bash
agent-deck mcp attach <session> <mcp> [--global] [--restart]
```
- `--global`: Write to Claude config (all projects)
- `--restart`: Restart session immediately
### mcp detach
```bash
agent-deck mcp detach <session> <mcp> [--global] [--restart]
```
## Group Commands
### group list
```bash
agent-deck group list [--json] [-q]
```
### group create
```bash
agent-deck group create <name> [--parent <group>]
```
### group delete
```bash
agent-deck group delete <name> [--force]
```
`--force`: Move sessions to parent and delete.
### group move
```bash
agent-deck group move <session> <group>
```
Use `""` or `root` to move to default group.
## Profile Commands
```bash
agent-deck profile list
agent-deck profile create <name>
agent-deck profile delete <name>
agent-deck profile default [name]
```
## Session Resolution
Commands accept:
- **Title:** `"My Project"` (exact match)
- **ID prefix:** `abc123` (6+ chars)
- **Path:** `/path/to/project`
- **Current:** Omit ID in tmux (uses env var)
## Exit Codes
| Code | Meaning |
|------|---------|
| 0 | Success |
| 1 | Error |
| 2 | Not found |
---
# CONFIG REFERENCE
# Configuration Reference
All options for `~/.agent-deck/config.toml`.
## Table of Contents
- [Top-Level](#top-level)
- [[claude] Section](#claude-section)
- [[logs] Section](#logs-section)
- [[updates] Section](#updates-section)
- [[global_search] Section](#global_search-section)
- [[mcp_pool] Section](#mcp_pool-section)
- [[mcps.*] Section](#mcps-section)
- [[tools.*] Section](#tools-section)
## Top-Level
```toml
default_tool = "claude" # Pre-selected tool when creating sessions
```
## [claude] Section
Claude Code integration settings.
```toml
[claude]
config_dir = "~/.claude" # Path to Claude config directory
dangerous_mode = true # Enable --dangerously-skip-permissions
[profiles.work.claude]
config_dir = "~/.claude-work" # Optional override for profile "work"
```
| Key | Type | Default | Description |
|-----|------|---------|-------------|
| `config_dir` | string | `~/.claude` | Claude config directory. Override with `CLAUDE_CONFIG_DIR` env. |
| `profiles.<name>.claude.config_dir` | string | none | Profile-specific Claude config directory. Takes precedence over `[claude].config_dir` when that profile is active. |
| `dangerous_mode` | bool | `false` | Skip Claude permission dialogs. Required for automation. |
Config resolution order for Claude config dir:
1. `CLAUDE_CONFIG_DIR` env var
2. `[profiles.<active-profile>.claude].config_dir`
3. `[claude].config_dir`
4. `~/.claude`
### Multiple Claude accounts (per profile)
Use a global default, then override only profiles that need a different Claude account/config:
```toml
[claude]
config_dir = "~/.claude" # Global default (personal)
[profiles.work.claude]
config_dir = "~/.claude-work" # Work account
[profiles.clientx.claude]
config_dir = "~/.claude-clientx" # Client account
```