# teemux **Repository Path**: never-Giveup/teemux ## Basic Information - **Project Name**: teemux - **Description**: No description available - **Primary Language**: Unknown - **License**: BSD-3-Clause - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-30 - **Last Updated**: 2026-01-30 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README
Aggregate logs from multiple processes in a single view
View in browser or terminal • Filter with patterns • Stream to AI agents via MCP
View a demo of Teemux in action
--- ## Demo ```bash npx teemux -- curl -N https://teemux.com/random-logs ``` ## Motivation * Needed a simple way to browse logs aggregated across multiple processes. * Needed a simple way to give agents a unified view of all the logs ## Install ```bash npm install -g teemux ``` ## Usage ```bash teemux --name api -- node api.js teemux --name worker -- node worker.js teemux -- redis-server # name defaults to "redis-server" ``` The first process starts a local server on port 8336. Others connect automatically. ### Options | Option | Alias | Default | Description | |--------|-------|---------|-------------| | `--name` | `-n` | command name | Identifier for this process in logs | | `--port` | `-p` | 8336 | Port for the log aggregation server | | `--buffer` | `-b` | 10000 | Number of log lines to keep in server buffer | | `--force-leader` | `-f` | false | Force this process to become the leader, replacing any existing leader | All options can also be set via environment variables with `TEEMUX_` prefix: ```bash TEEMUX_PORT=9000 teemux -- node app.js ``` ## Viewing Logs ### Browser Open http://127.0.0.1:8336/ to view aggregated logs with: - Color-coded process names - Auto-scroll (sticks to bottom like a terminal) - Scroll up to pause, scroll back down to resume ### Terminal / curl ```bash curl http://127.0.0.1:8336/ ``` Plain text stream of all logs. ### MCP Server for AI Agents teemux includes a built-in [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that enables AI agents to programmatically access logs in your development environment. This makes it easy for coding assistants like Claude, Cursor, or other AI tools to inspect application logs, search for errors, and understand what's happening in your running processes. The MCP server runs on the same port as the HTTP server at `/mcp` and provides these tools: | Tool | Description | Parameters | |------|-------------|------------| | `get_logs` | Get recent logs from buffer | `limit?`, `include?`, `exclude?` | | `search_logs` | Search logs with patterns | `limit?`, `include?`, `exclude?` | | `clear_logs` | Clear the log buffer | none | | `get_process_names` | List all process names that have logged | none | #### Configuring your AI agent Add teemux as an MCP server in your AI tool's configuration. For Claude Code, add to your MCP settings: ```json { "mcpServers": { "teemux": { "command": "npx", "args": [ "mcp-remote", "http://127.0.0.1:8336/mcp" ] } } } ``` Once configured, your AI agent can: - **Inspect logs** when debugging issues ("What errors are in the logs?") - **Search for specific events** ("Find all database connection errors") - **Monitor processes** ("What processes are currently running?") - **Clear logs** to start fresh when testing #### Example MCP usage ```bash # Initialize session curl -X POST http://127.0.0.1:8336/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}},"id":1}' # List available tools (use session ID from response above) curl -X POST http://127.0.0.1:8336/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -H "mcp-session-id: