Sarah's Forge.Dev
← All Projects
Tmux-Session-Manager@TransIRC:~
Tmux-Session-Manager
A small python script for interacting with tmux sessions
โ˜… 0   ๐Ÿด 0
View on GitHub

๐Ÿง  Session Manager for Tmux

A full-screen, interactive terminal interface for managing active tmux sessions --- with session info, live navigation, and the ability to send messages to users via tmux display-popup.

Built with โค๏ธ for the TransIRC project and retro-modern terminal workflows.


Session Manager Screenshot


โœจ Features

  • ๐Ÿ“Š Rich table UI for tmux session details (created time, attachment state, duration, current window, logged IP)
  • ๐Ÿงญ Navigate sessions with arrow keys
  • ๐Ÿ” View detailed window lists per session
  • โŒจ๏ธ Attach directly to a session
  • โ™ป๏ธ Refresh session list in real-time
  • ๐Ÿ“ข Broadcast messages via tmux display-popup
  • ๐Ÿงพ Detects real IP address (via REAL_IP environment variable)
  • ๐Ÿšฆ Signal-safe and terminal-resize friendly

๐Ÿš€ Requirements

  • Python 3.7+

  • tmux (>= 3.2 recommended)

  • Python packages:

    • readchar

    • rich

Install dependencies:

pip install readchar rich

๐Ÿงฐ Usage

Use the arrow keys to navigate the list of active tmux sessions.

Key Action
โ†‘/โ†“ Navigate sessions
a Attach to selected session
r Refresh session list
m Send admin message to session(s)
q Quit the manager

๐Ÿ“ฌ Messaging System

You can send a short pop-up message to:

  • The currently selected session

  • All active sessions

Messages use tmux display-popup and are visible for 5 seconds.


๐Ÿ› ๏ธ Environment Integration

If your tmux sessions expose a REAL_IP environment variable, it will be displayed in the session overview.

To set this manually in a session:

tmux set-environment REAL_IP 1.2.3.4


๐Ÿค– For Developers

This tool is meant to be dropped into SSH environments, IRC shells, or BBS-style systems where tmux sessions represent active users.

Feel free to fork and adapt it to your own infrastructure!


๐ŸŒ Related Projects

  • Rich --- Beautiful terminal output in Python

  • readchar --- Simplified key handling for terminal input

  • tmux --- Terminal multiplexer

Developer Updates

Loading updates...