One command to launch any project in your ~/work folder with a full tmux session — correct windows, panes, and running processes — every time.
Built for developers juggling multiple projects simultaneously. No more manually activating venvs, starting servers, and opening terminals one by one.
work # fuzzy picker — lists all git repos in ~/work
work myproject # launch by name (partial match works)
work kill myproject # kill session so it starts fresh next time
work kill # fuzzy picker to kill a running session
work list # see all running sessionsworkscans~/workfor all git repos (any depth up to 3 levels)- If a
~/.tmuxp/<project>.yamlexists → loads your custom layout - If not → opens a generic 2-window session (shell + git log)
- Sessions persist when you close your terminal — rerunning
work myprojectreattaches
# Ubuntu/Debian
sudo apt install tmux
# already installed on most Linux distros
tmux -Vpip install tmuxpgit clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install --bincurl -sfL https://direnv.net/install.sh | bash# Project launcher
export PATH="$HOME/bin:$PATH"
# fzf
export PATH="$HOME/.fzf/bin:$PATH"
[ -f "$HOME/.fzf/shell/completion.bash" ] && source "$HOME/.fzf/shell/completion.bash"
[ -f "$HOME/.fzf/shell/key-bindings.bash" ] && source "$HOME/.fzf/shell/key-bindings.bash"
# direnv (if installed)
eval "$($HOME/.local/bin/direnv hook bash)"Then reload:
source ~/.bashrcmkdir -p ~/bin
# copy the `work` file from this gist to ~/bin/work
chmod +x ~/bin/work# copy .tmux.conf from this gist to ~/.tmux.confCopy the example yaml and edit it for your project:
mkdir -p ~/.tmuxp
cp example-project.yaml ~/.tmuxp/myproject.yamlThe session name and yaml filename must match your project's directory name (lowercase, hyphens).
Example: project at ~/work/kashif/my-app → ~/.tmuxp/my-app.yaml
Projects without a yaml still work — they just get a plain 2-window session.
Add a .envrc to any project to auto-activate its environment on cd:
Python project:
# ~/work/myproject/.envrc
source_env_if_exists .env
[ -d ".venv" ] && source .venv/bin/activateNode project:
# ~/work/myproject/.envrc
source_env_if_exists .env
PATH_add node_modules/.binAllow it once:
direnv allow ~/work/myprojectThese work in Windows Terminal + WSL2 (Alt-based, no prefix key needed):
| Action | Shortcut |
|---|---|
| Switch to window 1/2/3/4 | Alt+1 Alt+2 Alt+3 Alt+4 |
| Next / prev window | Alt+n / Alt+p |
| Detach session | Alt+d |
| Split pane vertically | Alt+v |
| Split pane horizontally | Alt+s |
| Zoom pane (fullscreen toggle) | Alt+z |
| Force kill current pane | Alt+x |
| Move between panes | Ctrl+h / Ctrl+j / Ctrl+k / Ctrl+l |
Note: Standard
Ctrl+bprefix is replaced withCtrl+Spacein the config. Windows Terminal interceptsCtrl+bandCtrl+a, so Alt-based bindings are used instead.
Everything custom lives in the project's yaml. Some examples:
Start Docker before the server:
panes:
- shell_command:
- docker-compose up -d
- python manage.py runserverTail a log file in a dedicated pane:
- window_name: logs
panes:
- shell_command:
- tail -f logs/app.logOpen a database shell automatically:
- shell_command:
- source .venv/bin/activate
- python manage.py dbshell| File | Location | Purpose |
|---|---|---|
work |
~/bin/work |
The launcher script |
.tmux.conf |
~/.tmux.conf |
tmux keybindings and settings |
example-project.yaml |
~/.tmuxp/<project>.yaml |
Per-project session layout |