Process-native tmux session manager with MCP support
Project description
termtap
Process-native tmux session manager with MCP support.
✨ Features
- 🎯 Smart Detection - Auto-detects Python, SSH, Claude processes
- 📝 Handler System - Process-specific output filtering and caching
- 🔌 MCP Ready - Tools and resources for Claude/LLMs
- 🚀 Service Orchestration - Run multi-service environments
- 🔍 Fuzzy Search - Filter sessions with patterns
- 🎨 Rich Display - Tables, boxes, and formatted output
📋 Prerequisites
Required system dependencies:
- tmux - Terminal multiplexer
- gum - Interactive terminal UI components
# macOS
brew install tmux gum
# Arch Linux
sudo pacman -S tmux gum
# Ubuntu/Debian
sudo apt install tmux
# For gum, see: https://github.com/charmbracelet/gum#installation
# Fedora
sudo dnf install tmux
# For gum, use: go install github.com/charmbracelet/gum@latest
📦 Installation
# Install via uv tool (recommended)
uv tool install termtap
# Or with pipx
pipx install termtap
# Update to latest
uv tool upgrade termtap
# Uninstall
uv tool uninstall termtap
🚀 Quick Start
# 1. Install termtap
uv tool install "git+https://github.com/angelsen/tap-tools.git#subdirectory=packages/termtap"
# 2. Add to Claude
claude mcp add termtap -- termtap --mcp
# 3. Run REPL
termtap
🔌 MCP Setup for Claude
# Quick setup with Claude CLI
claude mcp add termtap -- termtap --mcp
Or manually configure Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"termtap": {
"command": "termtap",
"args": ["--mcp"]
}
}
}
🎮 Usage
Interactive REPL
termtap # Start REPL
termtap --mcp # Start as MCP server
Commands
>>> ls() # List all sessions with processes
>>> execute("python3") # Start Python REPL in tmux
>>> pane() # Read output with caching and interaction hints
>>> interrupt() # Send Ctrl+C to current pane
>>> run("demo") # Run service group from config
Command Reference
| Command | Description |
|---|---|
execute(command, target=None) |
Run command in tmux pane |
pane(target=None, page=None) |
Read output with pagination and interaction hints |
ls(filter=None) |
List sessions with optional filter |
interrupt(target=None) |
Send interrupt signal |
send_keys(keys, target=None) |
Send raw key sequences |
run(group) |
Run service configuration |
track(target=None, duration=10) |
Monitor pane state |
🛠️ Service Configuration
Define multi-service environments in termtap.toml:
[init.demo]
layout = "even-horizontal"
[init.demo.backend]
pane = 0
command = "uv run python -m backend"
path = "demo/backend"
ready_pattern = "Uvicorn running on"
timeout = 10
[init.demo.frontend]
pane = 1
command = "npm run dev"
path = "demo/frontend"
ready_pattern = "Local:.*localhost"
depends_on = ["backend"]
Run with: run("demo")
📁 Examples
See examples/ directory for:
- Basic usage patterns
- Service orchestration setups
- MCP integration examples
🏗️ Architecture
Built on ReplKit2 for dual REPL/MCP functionality.
Key Design:
- Pane-Centric - Everything operates through
Paneobjects - Process-Native - Uses
/procand tmux state directly - Handler System - Process-specific capture and filtering
- 0-Based Pagination - Navigate cached output efficiently
📚 Documentation
- Architecture - System design
- Handlers - Process-specific handlers
- Commands - Command implementations
🛠️ Development
# Clone repository
git clone https://github.com/angelsen/tap-tools
cd tap-tools
# Install for development
uv sync --package termtap
# Run development version
uv run --package termtap termtap
# Run tests and checks
make check-termtap # Check build
make format # Format code
make lint # Fix linting
📄 License
MIT - see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file termtap-0.6.0.tar.gz.
File metadata
- Download URL: termtap-0.6.0.tar.gz
- Upload date:
- Size: 75.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcb2e89128ffe44c38b0f51229109c6ca2ae97cdab4aa01f8998f2af1d775431
|
|
| MD5 |
833001e707e8ba5d66f7c566d4bf73db
|
|
| BLAKE2b-256 |
9033bd32ac6f7e95ece0a634b12294858e5ab44bc2135100428a2d17a7a3cce3
|
File details
Details for the file termtap-0.6.0-py3-none-any.whl.
File metadata
- Download URL: termtap-0.6.0-py3-none-any.whl
- Upload date:
- Size: 68.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
759ed3ab685d5cf39b08824937f3829b0fa495ced326527e234742425a157be1
|
|
| MD5 |
7890fc5ce8fc7e2fd72d6a25f695ebd7
|
|
| BLAKE2b-256 |
a6d7cf848be187fabb3ac819f6acbc2286501e81ad82b9affe4f9b10cf397e35
|