ntm

Named Tmux Manager - orchestrate multiple AI coding agents (Claude Code, Codex, Gemini) in tiled tmux panes with visual dashboards, command palette, context rotation, Agent Mail integration, and robot mode for automation.

$ 설치

git clone https://github.com/Dicklesworthstone/agent_flywheel_clawdbot_skills_and_integrations /tmp/agent_flywheel_clawdbot_skills_and_integrations && cp -r /tmp/agent_flywheel_clawdbot_skills_and_integrations/skills/ntm ~/.claude/skills/agent_flywheel_clawdbot_skills_and_integrations

// tip: Run this command in your terminal to install the skill


name: ntm description: "Named Tmux Manager - orchestrate multiple AI coding agents (Claude Code, Codex, Gemini) in tiled tmux panes with visual dashboards, command palette, context rotation, Agent Mail integration, and robot mode for automation."

NTM - Named Tmux Manager

A powerful tmux session management tool for orchestrating multiple AI coding agents in parallel. Spawn, manage, and coordinate Claude Code, Codex, and Gemini agents across tiled panes with stunning TUI, automated context rotation, and deep integrations.

Quick Start

# Check dependencies
ntm deps -v

# Shell integration (add to ~/.zshrc)
eval "$(ntm init zsh)"

# Interactive tutorial
ntm tutorial

# Create a multi-agent session
ntm spawn myproject --cc=2 --cod=1 --gmi=1

# Send a prompt to all Claude agents
ntm send myproject --cc "Explore this codebase and summarize its architecture."

# Open the command palette (or press F6 after `ntm bind`)
ntm palette myproject

Session Creation

Spawn Agents

# Spawn with specific agent counts
ntm spawn myproject --cc=3 --cod=2 --gmi=1

# Quick project setup (creates dir, git init, VSCode settings, spawns agents)
ntm quick myproject --template=go
ntm spawn myproject --cc=2

# Just create empty panes (no agents)
ntm create myproject --panes=10

# Using profiles/personas
ntm spawn myproject --profiles=architect,implementer,tester
ntm spawn myproject --profile-set=backend-team

Agent Flags

FlagAgent TypeCLI
--cc=NClaude Codeclaude
--cod=NCodex CLIcodex
--gmi=NGemini CLIgemini

Add More Agents

# Add 2 more Claude agents to existing session
ntm add myproject --cc=2

# Add mixed agents
ntm add myproject --cod=1 --gmi=1

Sending Prompts

Broadcast to Agent Types

# Send to all Claude agents
ntm send myproject --cc "Implement the user auth module"

# Send to all Codex agents
ntm send myproject --cod "Write unit tests for auth"

# Send to all Gemini agents
ntm send myproject --gmi "Review and document the API"

# Send to ALL agents (excludes user pane)
ntm send myproject --all "Review the current codebase state"

Interrupt All Agents

# Send Ctrl+C to all agent panes
ntm interrupt myproject

Session Navigation

CommandAliasDescription
ntm listlntList all tmux sessions
ntm attachrntAttach to session
ntm statussntShow detailed status with agent counts
ntm viewvntUnzoom, tile layout, attach
ntm zoomzntZoom to specific pane
ntm dashboarddash, dInteractive visual dashboard
ntm killkntKill session (-f to force)
# View session status (shows C/X/G/U indicators)
ntm status myproject

# View all panes in tiled layout
ntm view myproject

# Zoom to pane 3
ntm zoom myproject 3

# Kill session (with confirmation)
ntm kill myproject

# Force kill (no prompt)
ntm kill -f myproject

Command Palette

Fuzzy-searchable TUI with pre-configured prompts:

# Open palette for session
ntm palette myproject

# Or press F6 in tmux (after running ntm bind)
ntm bind                    # Set up F6 keybinding
ntm bind --key=F5           # Use different key
ntm bind --show             # Show current binding

Palette Features

  • Animated gradient banner with Catppuccin themes
  • Fuzzy search through all commands
  • Pin/favorite commands (Ctrl+P / Ctrl+F)
  • Live preview pane with prompt metadata
  • Quick select with numbers 1-9
  • Visual target selector (All/Claude/Codex/Gemini)
  • Help overlay with ? or F1

Palette Navigation

KeyAction
↑/↓ or j/kNavigate commands
1-9Quick select command
EnterSelect command
EscBack / Quit
?Help overlay
Ctrl+PPin/unpin command
Ctrl+FFavorite/unfavorite

Interactive Dashboard

Visual monitoring for any session:

ntm dashboard myproject
# Or: ntm dash myproject
# Or: d myproject (with shell aliases)

Dashboard Features

  • Visual pane grid with color-coded agent cards
  • Live agent counts (Claude/Codex/Gemini/User)
  • Token velocity badges (tokens-per-minute)
  • Context usage indicators (green/yellow/orange/red)
  • Real-time refresh with r
  • Quick zoom with z or Enter
  • Context shortcuts with c, mail with m

Dashboard Navigation

KeyAction
↑/↓ or j/kNavigate panes
1-9Quick select pane
z or EnterZoom to pane
rRefresh pane data
cView context usage
mOpen Agent Mail
q or EscQuit dashboard

Output Capture

Copy Output

# Copy specific pane
ntm copy myproject:1

# Copy all pane outputs
ntm copy myproject --all

# Copy only Claude panes
ntm copy myproject --cc

# Filter lines by regex
ntm copy myproject --pattern 'ERROR'

# Extract only code blocks
ntm copy myproject --code

# Save to file instead of clipboard
ntm copy myproject --output errors.txt

# Last N lines
ntm copy myproject --cc -l 500

Save Outputs

# Save all outputs to timestamped files
ntm save myproject -o ~/logs

# Save only Codex outputs
ntm save myproject --cod -o ~/logs

Monitoring & Analysis

# Real-time agent activity
ntm activity myproject --watch

# Health status
ntm health myproject

# Stream agent output
ntm watch myproject --cc

# Extract code blocks from output
ntm extract myproject --lang=go

# Compare two panes
ntm diff myproject cc_1 cod_1

# Search pane output
ntm grep 'error' myproject -C 3

# Session analytics
ntm analytics --days 7

# File reservation locks
ntm locks myproject --all-agents

Checkpoints

Save and restore session state:

# Create checkpoint
ntm checkpoint save myproject -m "Before refactor"

# List checkpoints
ntm checkpoint list myproject

# Show checkpoint details
ntm checkpoint show myproject 20251210-143052

# Delete checkpoint
ntm checkpoint delete myproject 20251210-143052 -f

Context Window Management

NTM monitors context usage and auto-rotates agents before they exhaust context.

How It Works

  1. Monitoring: Token usage estimated per agent
  2. Warning: Alert at 80% usage
  3. Compaction: Try /compact or summarization first
  4. Rotation: Fresh agent with handoff summary if needed

Context Indicators

ColorUsageStatus
Green< 40%Plenty of room
Yellow40-60%Comfortable
Orange60-80%Approaching threshold
Red> 80%Needs attention

Compaction Recovery

When an agent's context is compacted, NTM auto-sends a recovery prompt to help regain project context, optionally including bead state from bv.

Agent Mail Integration

Multi-agent coordination across sessions:

# Send message to specific agent
ntm mail send myproject --to GreenCastle "Review the API changes"

# Send to all agents
ntm mail send myproject --all "Checkpoint: sync and report status"

# View inboxes
ntm mail inbox myproject

# Read specific agent's mail
ntm mail read myproject --agent BlueLake

# Acknowledge message
ntm mail ack myproject 42

Pre-commit Guard

Prevent commits that conflict with other agents' file reservations:

ntm hooks guard install
ntm hooks guard uninstall

Robot Mode (AI Automation)

Machine-readable JSON output for integration with AI agents:

State Inspection

ntm --robot-status              # Sessions, panes, agent states
ntm --robot-context=SESSION     # Context window usage per agent
ntm --robot-snapshot            # Unified state: sessions + beads + mail
ntm --robot-tail=SESSION        # Recent pane output
ntm --robot-plan                # bv execution plan
ntm --robot-health              # Project health summary
ntm --robot-dashboard           # Dashboard summary

Agent Control

ntm --robot-send=SESSION --msg="Fix auth" --type=claude
ntm --robot-spawn=SESSION --spawn-cc=2 --spawn-wait
ntm --robot-interrupt=SESSION
ntm --robot-assign=SESSION --assign-beads=bd-1,bd-2

CASS Integration

ntm --robot-cass-search="auth error" --cass-since=7d
ntm --robot-cass-context="how to implement auth"
ntm --robot-cass-status

Profiles & Personas

Define agent behavioral characteristics:

# List available profiles
ntm profiles list

# Show profile details
ntm profiles show architect

# Filter by agent or tag
ntm profiles list --agent claude --tag review

# Spawn with profiles
ntm spawn myproject --profiles=architect,implementer,tester

Built-in Profiles

  • architect - High-level design and review
  • implementer - Feature implementation
  • reviewer - Code review and quality
  • tester - Testing and validation
  • documenter - Documentation

Notifications

Multi-channel notifications for events:

# Configure in ~/.config/ntm/config.toml
[notifications]
enabled = true
events = ["agent.error", "agent.crashed", "agent.rate_limit"]

[notifications.desktop]
enabled = true

[notifications.webhook]
enabled = true
url = "https://hooks.slack.com/..."

Event Types

EventDescription
agent.errorAgent hit an error
agent.crashedAgent exited unexpectedly
agent.rate_limitRate limit hit
rotation.neededContext rotation needed
session.createdNew session spawned

Command Hooks

Run custom scripts on NTM events:

# ~/.config/ntm/hooks.toml

[[command_hooks]]
event = "post-spawn"
command = "notify-send 'NTM' 'Agents spawned'"

[[command_hooks]]
event = "pre-send"
command = "echo \"$(date): $NTM_MESSAGE\" >> ~/.ntm-send.log"

Available Events

pre-spawn, post-spawn, pre-send, post-send, pre-add, post-add, pre-shutdown, post-shutdown

Multi-Agent Strategies

Divide and Conquer

ntm send myproject --cc "design the database schema"
ntm send myproject --cod "implement the models"
ntm send myproject --gmi "write tests"

Competitive Comparison

ntm send myproject --all "implement a rate limiter"
ntm view myproject  # Compare side-by-side

Specialist Teams

ntm send myproject --cc "focus on architecture and review"
ntm send myproject --cod "focus on implementation"
ntm send myproject --gmi "focus on testing and docs"

Review Pipeline

ntm send myproject --cc "implement feature X"
# Wait, then:
ntm send myproject --cod "review Claude's code"
ntm send myproject --gmi "write tests for edge cases"

Shell Aliases

After eval "$(ntm init zsh)":

CategoryAliases
Agent Launchcc, cod, gmi
Sessioncnt, sat, qps (create, spawn, quick)
Agent Mgmtant, bp, int (add, send, interrupt)
Navigationrnt, lnt, snt, vnt, znt
Dashboarddash, d
Outputcpnt, svnt
Utilitiesncp, knt, cad

Configuration

ntm config init          # Create default config
ntm config show          # Show current config
ntm config project init  # Create .ntm/config.toml in project

Config File (~/.config/ntm/config.toml)

projects_base = "~/Developer"

[agents]
claude = 'claude --dangerously-skip-permissions'
codex = "codex --dangerously-bypass-approvals-and-sandbox"
gemini = "gemini --yolo"

[tmux]
default_panes = 10
palette_key = "F6"

[context_rotation]
enabled = true
warning_threshold = 0.80
rotate_threshold = 0.95

Environment Variables

VariableDescription
NTM_PROJECTS_BASEBase directory for projects
NTM_THEMEColor theme: auto, mocha, latte, nord, plain
NTM_ICONSIcon set: nerd, unicode, ascii
NTM_REDUCE_MOTIONDisable animations

Pane Naming Convention

Panes follow the pattern: <project>__<agent>_<number>

  • myproject__cc_1 - First Claude agent
  • myproject__cod_2 - Second Codex agent
  • myproject__gmi_1 - First Gemini agent

In status output:

  • C = Claude
  • X = Codex
  • G = Gemini
  • U = User pane

Upgrade

ntm upgrade               # Check and install updates
ntm upgrade --check       # Check only
ntm upgrade --yes         # Auto-confirm

Requirements

  • tmux (any recent version)
  • At least one agent CLI: claude, codex, or gemini
  • Optional: bv for beads, Agent Mail MCP for coordination