A productivity-enhancing Zsh-based utility for managing tmux sessions with templates, directory search, project-local configs, and custom window setups. Supercharged with fzf, jq, and fd.
- Attach to existing sessions quickly
- Create structured
tmuxsessions with multiple windows - Define custom project templates via JSON config
- Local (per-project) config support
- Search for directories using
fzf + fd - Clean and colorful
--helpoutput - Works well as a project launcher and terminal workspace manager
Ensure the following tools are installed:
Clone or copy the script into your dotfiles or source it from .zshrc:
source /path/to/tmux-sessionizer.zshOptionally set a global config path:
export TMUX_CONF_DIR="$HOME/.config/tmux"Attach to an existing tmux session by name or just attach if only one session exists.
ta # Attach to the last active session
ta dev-session # Attach to 'dev-session'Create and attach to a tmux session with optional window/template overrides.
tn my-session # Use default template
tn -n 4 -c "nvim ." my-session # 4 windows, run nvim in the first
tn -t rust my-session # Use the 'rust' template from configOptions:
-n,--num-windows: Override number of windows-c,--command: Command to run in a window (repeatable)-t,--template: Use a specific template
List all tmux sessions using fzf and attach to the selected one.
List all tmux sessions using fzf and kill the selected session.
Search for a directory using fzf (within defined search_dirs), then:
cdinto that directory- Create a session named after the folder
- Use the specified or default template to spawn windows + run commands
Options:
-n,--num-windows: Override number of windows-c,--command: Command to run in a window (repeatable)-t,--template: Use a specific template
t
t -t rust # Use 'rust' template while picking a folderShow full command usage in color with examples.
Defaults to:
$XDG_CONFIG_HOME/tmux/.tmux.sessionizer.json
# or
$HOME/.config/tmux/.tmux.sessionizer.json
Place a .tmux.sessionizer.json in any project root to override the global one.
{
"defaults": {
"windows": 3,
"commands": {
"1": ["nvim ."],
"3": ["echo \"running....\"", "git status", "echo working"]
},
"search_dirs": [
"~/Documents",
"~/Desktop",
"~/Documents/Projects",
"~/",
"~/.dev/config"
]
},
"dotfiles": {
"windows": 3,
"search_dirs": ["~/.dev", "~/.config", "~/.local"]
},
"rust": {
"windows": 2,
"commands": {
"1": ["nvim src/main.rs"],
"2": ["cargo watch -x run"]
},
"search_dirs": ["~/Projects/rust"]
},
"js": {
"windows": 2,
"commands": {
"1": ["nvim"],
"2": ["npm start"]
}
}
}Keys:
windows: Number of windows to open in the sessioncommands: Commands to run in windows (commands[0]→ window 1, etc.)search_dirs: Used bytcommand to search for project folders
- You can define templates like
"node","go","elixir"to bootstrap new sessions. - Create a
.tmux.sessionizer.jsonin a project to set up isolated environments. - Use
-cmultiple times to send different commands to different windows.
# Launch a rust dev session from anywhere
t -t rust
# Start a new session with default config
tn my-app
# Quickly jump to an existing session
tl
# Kill a stuck session
tkThis tool helps you instantly jump into a tmux-powered dev environment with:
- Preloaded editors
- Build/watch commands
- Shell tools
- A clean structure
All from a single command.
This project is heavily inspired by ThePrimeagen, whose tmux workflow and productivity content are second to none. If you like this tool, go check out his streams, dotfiles, and content — it's a goldmine.
Built with ❤️ by Paradox — designed for developers who live in the terminal.