Skip to main content

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
  • 🍎 macOS Support - Works on systems without /proc filesystem
  • 📝 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 Pane objects
  • Process-Native - Uses /proc and tmux state directly
  • Handler System - Process-specific capture and filtering
  • 0-Based Pagination - Navigate cached output efficiently

📚 Documentation

🛠️ 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

termtap-0.8.1.tar.gz (80.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

termtap-0.8.1-py3-none-any.whl (70.1 kB view details)

Uploaded Python 3

File details

Details for the file termtap-0.8.1.tar.gz.

File metadata

  • Download URL: termtap-0.8.1.tar.gz
  • Upload date:
  • Size: 80.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for termtap-0.8.1.tar.gz
Algorithm Hash digest
SHA256 9c2cdf146021be35f125a89d441dbf30c5bafba42f2a1bfeabc20c06fdf0b2ed
MD5 b48f0efcb1118327f76dc930d2b076e5
BLAKE2b-256 e22a98cea069302d45c64aa4294f22e920cba6171848d2198c23e0e762c2eb85

See more details on using hashes here.

File details

Details for the file termtap-0.8.1-py3-none-any.whl.

File metadata

  • Download URL: termtap-0.8.1-py3-none-any.whl
  • Upload date:
  • Size: 70.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.15

File hashes

Hashes for termtap-0.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9b033943fabc37a5d01c9597d8463e604764b6916c5c3908638c28d41e391912
MD5 7b20aa9585ab4110d998424df44d4954
BLAKE2b-256 c0fa4ef4a233250f47c1143da03eb4f5e511eafee17c04fd99ac6b40c772922a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page