Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

16 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš€ tpik - Modern TMUX Session Manager

A beautiful, modern Python TUI for managing tmux sessions with style and efficiency.

Version License Python Platform

โœจ What's New in v3.0

๐ŸŽจ Complete Rewrite: Migrated from bash to modern Python TUI using Textual framework
๐ŸŒˆ Beautiful Interface: Gradient headers, modern styling, and emoji indicators
โšก Rock Solid: Fixed all runtime errors and session jumping issues
๐Ÿ”ง Professional: Installation system with virtual environments and proper packaging


๐ŸŽฏ Features

๐Ÿ–ฅ๏ธ Modern Terminal Interface

  • Beautiful TUI built with Textual framework for stunning visuals
  • Gradient header with modern styling and emoji indicators
  • Rich session display with colors, status icons, and metadata
  • Responsive design that works perfectly on all screen sizes
  • Mouse and keyboard support for maximum accessibility

โญ Smart Session Management

  • Favorites system - star sessions for quick access with persistent storage
  • Live search - filter sessions in real-time as you type
  • Status indicators - see attached (โ—) vs detached (โ—‹) sessions at a glance
  • Session metadata - creation time, window count, and current window info
  • Current session highlighting - clearly shows which session you're in

๐ŸŽ›๏ธ Advanced TMUX Integration

  • Smart context detection - different behavior inside vs outside tmux
  • Session switching - seamless switching without detaching when inside tmux
  • Safe attachment - proper handling to prevent session jumping issues
  • Error handling - comprehensive error messages and recovery

๐Ÿ” Powerful Filtering & Search

  • Real-time search - filter sessions as you type
  • Favorites filter - toggle to show only starred sessions
  • Search highlighting - visual feedback for active filters
  • Quick clear - easily reset all filters

๐Ÿ“ฆ Installation

Automatic Installation (Recommended)

curl -sSL https://raw.githubusercontent.com/sobechestnut-dev/tpik/main/install-tui.sh | bash

This will:

  • โœ… Check all dependencies (Python 3.8+, tmux, python3-venv)
  • โœ… Create an isolated virtual environment
  • โœ… Install tpik from GitHub with all dependencies
  • โœ… Set up the tpik command and tp alias
  • โœ… Create configuration directories

Mobile-Friendly Manual Installation

For mobile devices or when you prefer step-by-step commands:

curl -sSL https://raw.githubusercontent.com/sobechestnut-dev/tpik/main/manual.sh | bash

This displays easy-to-copy commands you can paste one by one.

Manual Installation

# Clone the repository
git clone https://github.com/sobechestnut-dev/tpik.git
cd tpik

# Create virtual environment
python3 -m venv ~/.local/share/tpik
source ~/.local/share/tpik/bin/activate

# Install dependencies
pip install textual rich

# Install tpik
pip install -e .

# Create wrapper script
mkdir -p ~/.local/bin
cat > ~/.local/bin/tpik << 'EOF'
#!/bin/bash
exec "$HOME/.local/share/tpik/bin/python" -m tpik.app "$@"
EOF
chmod +x ~/.local/bin/tpik

# Add to PATH and create alias
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
echo 'alias tp="tpik"' >> ~/.bashrc
source ~/.bashrc

๐ŸŽฎ Usage

Launch tpik

tpik        # Launch the modern TUI
# or
tp          # Same as tpik (alias)

Interface Overview

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚            ๐Ÿš€ TPIK - Enhanced TMUX Manager ๐Ÿš€            โ”‚
โ”‚                   Modern Terminal Interface                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

โ”Œโ”€ Search โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ ๐Ÿ” Search sessions...                                       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€ Sessions โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ โ˜… โ— main (3w) - 08/04 15:30 [nvim] [CURRENT]               โ”‚
โ”‚ โ˜† โ—‹ development (2w) - 08/04 14:20 [zsh]                   โ”‚
โ”‚ โญ โ— background (1w) - 08/04 13:10 [htop]                  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

โ”Œโ”€ Controls โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ [๐ŸŽฏ Attach] [โœจ New] [๐Ÿ’€ Kill] [โญ Favorite] [๐Ÿ”– Filter] โ”‚
โ”‚                   [๐Ÿ”„ Refresh] [โŒ Quit]                    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŸข Ready - Welcome to tpik!

Keyboard Shortcuts

Key Action Description
Enter Attach Attach to selected session
N New Session Create new session
Del Kill Session Delete selected session
Space Toggle Favorite Add/remove from favorites
F Filter Favorites Show only starred sessions
F5 Refresh Reload session list
Q Quit Exit application
๐Ÿ” Search Type to filter sessions

๐ŸŽจ Modern Design Features

Visual Indicators

  • โ˜… / โ˜† - Favorite status (filled/empty star)
  • โ— / โ—‹ - Attachment status (filled/empty circle)
  • ๐Ÿš€ - App header with gradient background
  • ๐ŸŸข - Status indicators with emoji feedback
  • [CURRENT] - Highlights your current session

Color Coding

  • Green text - Currently attached sessions
  • Yellow stars - Favorite sessions
  • Cyan numbers - Window counts
  • Dim text - Timestamps and metadata
  • Gradient buttons - Modern button styling with hover effects

Smart Features

  • Responsive layout - Adapts to terminal size
  • Rich text rendering - Beautiful typography and spacing
  • Context awareness - Different behavior inside vs outside tmux
  • Error recovery - Graceful handling of edge cases

๐Ÿ“ Configuration

tpik stores configuration in ~/.config/tpik/:

  • favorites - Your starred sessions (one per line)
  • templates - Session templates for future use
  • history - Usage history and statistics

Example favorites file:

development
main
background
monitoring

๐Ÿ”ง Technical Details

Requirements

  • Python 3.8+ - Modern Python with type hints
  • tmux - Terminal multiplexer
  • Textual - Modern TUI framework
  • Rich - Beautiful terminal formatting

Architecture

  • Python package - Proper packaging with pyproject.toml
  • Virtual environment - Isolated dependencies
  • Modern TUI - Built on Textual framework for reliability
  • Type hints - Full typing for maintainability
  • Error handling - Comprehensive exception management

Platform Support

  • โœ… Linux - Full support
  • โœ… macOS - Full support
  • โœ… WSL - Works in Windows Subsystem for Linux
  • โŒ Windows - Not supported (tmux requirement)

๐Ÿ†š Migration from v2.0

If you're upgrading from the old bash version:

Uninstall Old Version

# Remove old script
rm ~/scripts/tpik.sh

# Remove old alias from shell config
sed -i '/tp.*scripts\/tpik.sh/d' ~/.bashrc

# Reload shell
source ~/.bashrc

Install New Version

curl -sSL https://raw.githubusercontent.com/sobechestnut-dev/tpik/main/install-tui.sh | bash

Your favorites will be preserved if stored in ~/.config/tpik/favorites.


๐Ÿ› Troubleshooting

Common Issues

"tmux not available"

# Ubuntu/Debian
sudo apt install tmux

# macOS
brew install tmux

"python3-venv not available"

# Ubuntu/Debian  
sudo apt install python3-venv

# Usually included on macOS

"Command not found: tpik"

# Add to PATH
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc

"Import errors"

# Reinstall in clean environment
rm -rf ~/.local/share/tpik
curl -sSL https://raw.githubusercontent.com/sobechestnut-dev/tpik/main/install-tui.sh | bash

๐Ÿค Contributing

Contributions are welcome! This is a modern Python project using:

  • Textual for the TUI framework
  • Rich for text formatting
  • Type hints throughout
  • Modern Python practices

Development Setup

git clone https://github.com/sobechestnut-dev/tpik.git
cd tpik

# Create development environment
python3 -m venv venv
source venv/bin/activate
pip install -e .

# Run from source
python -m tpik.app

๐Ÿ“„ License

MIT License - see LICENSE file for details.


๐Ÿ™ Credits

  • Textual Framework - For the amazing TUI capabilities
  • Rich Library - For beautiful terminal formatting
  • TMUX - The foundation this tool is built upon
  • Python Community - For the excellent ecosystem

๐Ÿ› Found a bug? Open an issue
๐Ÿ’ก Feature request? Start a discussion
โญ Like this project? Give it a star on GitHub!


tpik v3.0 - Modern TMUX session management made beautiful ๐Ÿš€

About

Enhanced TMUX Session Picker with favorites, templates, search, and intelligent tmux integration

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages