docs: add tmux integration and interactive terminal documentation
- Add Tmux Integration section to configurations.md with all config options - Add Visual Multi-Agent with Tmux subsection to features.md - Add Interactive Terminal Tools section documenting interactive_bash tool
This commit is contained in:
parent
8f31211c75
commit
601ea32a1c
@ -219,6 +219,66 @@ agent-browser screenshot result.png
|
|||||||
agent-browser close
|
agent-browser close
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Tmux Integration
|
||||||
|
|
||||||
|
Run background subagents in separate tmux panes for **visual multi-agent execution**. See your agents working in parallel, each in their own terminal pane.
|
||||||
|
|
||||||
|
**Enable tmux integration** via `tmux` in `oh-my-opencode.json`:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tmux": {
|
||||||
|
"enabled": true,
|
||||||
|
"layout": "main-vertical",
|
||||||
|
"main_pane_size": 60,
|
||||||
|
"main_pane_min_width": 120,
|
||||||
|
"agent_pane_min_width": 40
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
| Option | Default | Description |
|
||||||
|
|--------|---------|-------------|
|
||||||
|
| `enabled` | `false` | Enable tmux subagent pane spawning. Only works when running inside an existing tmux session. |
|
||||||
|
| `layout` | `main-vertical` | Tmux layout for agent panes. See [Layout Options](#layout-options) below. |
|
||||||
|
| `main_pane_size` | `60` | Main pane size as percentage (20-80). |
|
||||||
|
| `main_pane_min_width` | `120` | Minimum width for main pane in columns. |
|
||||||
|
| `agent_pane_min_width` | `40` | Minimum width for each agent pane in columns. |
|
||||||
|
|
||||||
|
### Layout Options
|
||||||
|
|
||||||
|
| Layout | Description |
|
||||||
|
|--------|-------------|
|
||||||
|
| `main-vertical` | Main pane left, agent panes stacked on right (default) |
|
||||||
|
| `main-horizontal` | Main pane top, agent panes stacked bottom |
|
||||||
|
| `tiled` | All panes in equal-sized grid |
|
||||||
|
| `even-horizontal` | All panes in horizontal row |
|
||||||
|
| `even-vertical` | All panes in vertical stack |
|
||||||
|
|
||||||
|
### Requirements
|
||||||
|
|
||||||
|
1. **Must run inside tmux**: The feature only activates when OpenCode is already running inside a tmux session
|
||||||
|
2. **Tmux installed**: Requires tmux to be available in PATH
|
||||||
|
|
||||||
|
### How It Works
|
||||||
|
|
||||||
|
When `tmux.enabled` is `true` and you're inside a tmux session:
|
||||||
|
- Background agents (via `delegate_task(run_in_background=true)`) spawn in new tmux panes
|
||||||
|
- Each pane shows the subagent's real-time output
|
||||||
|
- Panes are automatically closed when the subagent completes
|
||||||
|
- Layout is automatically adjusted based on your configuration
|
||||||
|
|
||||||
|
**Example workflow**:
|
||||||
|
```bash
|
||||||
|
# Start tmux session
|
||||||
|
tmux new -s dev
|
||||||
|
|
||||||
|
# Run OpenCode inside tmux
|
||||||
|
opencode
|
||||||
|
|
||||||
|
# Now background agents will appear in separate panes
|
||||||
|
```
|
||||||
|
|
||||||
## Git Master
|
## Git Master
|
||||||
|
|
||||||
Configure git-master skill behavior:
|
Configure git-master skill behavior:
|
||||||
|
|||||||
@ -62,6 +62,27 @@ delegate_task(agent="explore", background=true, prompt="Find auth implementation
|
|||||||
background_output(task_id="bg_abc123")
|
background_output(task_id="bg_abc123")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Visual Multi-Agent with Tmux
|
||||||
|
|
||||||
|
Enable `tmux.enabled` to see background agents in separate tmux panes:
|
||||||
|
|
||||||
|
```json
|
||||||
|
{
|
||||||
|
"tmux": {
|
||||||
|
"enabled": true,
|
||||||
|
"layout": "main-vertical"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
When running inside tmux:
|
||||||
|
- Background agents spawn in new panes
|
||||||
|
- Watch multiple agents work in real-time
|
||||||
|
- Each pane shows agent output live
|
||||||
|
- Auto-cleanup when agents complete
|
||||||
|
|
||||||
|
See [Tmux Integration](configurations.md#tmux-integration) for full configuration options.
|
||||||
|
|
||||||
Customize agent models, prompts, and permissions in `oh-my-opencode.json`. See [Configuration](configurations.md#agents).
|
Customize agent models, prompts, and permissions in `oh-my-opencode.json`. See [Configuration](configurations.md#agents).
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -445,6 +466,29 @@ Disable specific hooks in config:
|
|||||||
| **session_search** | Full-text search across session messages |
|
| **session_search** | Full-text search across session messages |
|
||||||
| **session_info** | Get session metadata and statistics |
|
| **session_info** | Get session metadata and statistics |
|
||||||
|
|
||||||
|
### Interactive Terminal Tools
|
||||||
|
|
||||||
|
| Tool | Description |
|
||||||
|
|------|-------------|
|
||||||
|
| **interactive_bash** | Tmux-based terminal for TUI apps (vim, htop, pudb). Pass tmux subcommands directly without prefix. |
|
||||||
|
|
||||||
|
**Usage Examples**:
|
||||||
|
```bash
|
||||||
|
# Create a new session
|
||||||
|
interactive_bash(tmux_command="new-session -d -s dev-app")
|
||||||
|
|
||||||
|
# Send keystrokes to a session
|
||||||
|
interactive_bash(tmux_command="send-keys -t dev-app 'vim main.py' Enter")
|
||||||
|
|
||||||
|
# Capture pane output
|
||||||
|
interactive_bash(tmux_command="capture-pane -p -t dev-app")
|
||||||
|
```
|
||||||
|
|
||||||
|
**Key Points**:
|
||||||
|
- Commands are tmux subcommands (no `tmux` prefix)
|
||||||
|
- Use for interactive apps that need persistent sessions
|
||||||
|
- One-shot commands should use regular `Bash` tool with `&`
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## MCPs: Built-in Servers
|
## MCPs: Built-in Servers
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user