tmux-processes

Solid

Patterns for running long-lived processes in tmux. Use when starting dev servers, watchers, tilt, or any process expected to outlive the conversation.

Web & Frontend 402 stars 39 forks Updated today

Install

View on GitHub

Quality Score: 79/100

Stars 20%
87
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
0
Description 5%
100

Skill Content

# tmux Process Management ## Interactive Shell Requirement **Use send-keys pattern for reliable shell initialization.** Creating a session spawns an interactive shell automatically. Use `send-keys` to run commands within that shell, ensuring PATH, direnv, and other initialization runs properly. ```bash # WRONG - inline command bypasses shell init, breaks PATH/direnv tmux new-session -d -s "$SESSION" -n main 'tilt up' # CORRECT - create session, then send command to interactive shell tmux new-session -d -s "$SESSION" -n main tmux send-keys -t "$SESSION:main" 'tilt up' Enter ``` ## Session Naming Convention Always derive session name from the project: ```bash SESSION=$(basename $(git rev-parse --show-toplevel 2>/dev/null) || basename $PWD) ``` For multiple processes in one project, use windows not separate sessions: - Session: `myapp` - Windows: `server`, `tests`, `logs` ## Starting Processes ### Single Process ```bash SESSION=$(basename $(git rev-parse --show-toplevel 2>/dev/null) || basename $PWD) # Create session with named window, then send command tmux new-session -d -s "$SESSION" -n main tmux send-keys -t "$SESSION:main" '<command>' Enter ``` ### Idempotent Start Check if already running before starting: ```bash SESSION=$(basename $(git rev-parse --show-toplevel 2>/dev/null) || basename $PWD) if ! tmux has-session -t "$SESSION" 2>/dev/null; then tmux new-session -d -s "$SESSION" -n main tmux send-keys -t "$SESSION:main" '<command>' Enter else echo "S...

Details

Author
aiskillstore
Repository
aiskillstore/marketplace
Created
7 months ago
Last Updated
today
Language
Python
License
None

Similar Skills

Semantically similar based on skill content — not just same category