No description
Find a file
Einar Sveinsson ebe5487def docs: update README and installer for session auto-restore
- Add session persistence to features list
- Installer adds auto-restore snippet to .zshrc
- Fix stale references to old ~/.dev-layouts and ~/.projects paths
2026-03-23 12:21:24 +00:00
layouts feat: initial commit - dev launcher with tmux layouts 2026-03-23 11:25:01 +00:00
dev feat(session): auto-save and restore tmux sessions across reboots 2026-03-23 12:18:59 +00:00
install.sh docs: update README and installer for session auto-restore 2026-03-23 12:21:24 +00:00
README.md docs: update README and installer for session auto-restore 2026-03-23 12:21:24 +00:00

dev — tmux project launcher

A CLI tool that manages tmux sessions for your projects. Jump into any project with a single command — each gets a tmux session with your preferred window/pane layout.

Features

  • Instant switchingdev cache opens or switches to your project
  • fzf pickerdev with no args to fuzzy-find
  • Configurable layouts — define windows and pane splits per project
  • Auto-registers reposdev init scans a directory and walks you through setup
  • Session persistence — auto-saves active sessions, restores them after reboot
  • Works inside tmux — switches sessions instead of nesting

Requirements

  • zsh
  • tmux (3.4+)
  • fzf
  • nvim
  • claude (Claude Code CLI) — optional

Install

git clone <this-repo> && cd dev-launcher
./install.sh

This copies dev to ~/bin, layouts to ~/.config/dev-launcher/layouts/, and creates ~/.config/dev-launcher/projects. Make sure ~/bin is in your PATH:

export PATH="$HOME/bin:$PATH"  # add to .zshrc

Quick start

# Scan a directory for git repos and register them
dev init ~/code

# Or register the current directory
cd ~/code/myproject && dev add

# Open a project
dev cache

# Clone, register, and open in one step
dev clone git@github.com:org/repo.git

Commands

Command Description
dev Pick a project from fzf list
dev <key> Open project by shortkey
dev init [dir] Scan directory for git repos and register them
dev clone <url> [key] Clone a repo, register it, and open it
dev add [path] [key] Register an existing repo (defaults to current dir)
dev list List all registered projects
dev layouts List available layouts
dev save Save list of active sessions
dev restore Restore saved sessions (detached)
dev help Show usage info

Projects file

~/.config/dev-launcher/projects — one project per line:

# shortkey:name:path[:layout]
cache:Cache Service:~/code/github/cacheservice
vpay:ValitorPay:~/code/github/valitorpay:split
orchestrator:Payment Orchestrator:~/code/github/orchestrator:dotnet

The layout field is optional and defaults to default. Switching layout with dev layout automatically persists the choice.

Session persistence

Active sessions are auto-saved every time you open a project. On login, dev restore runs automatically (added to .zshrc by the installer) and recreates all previously active sessions detached with their configured layouts.

You can also run manually:

dev save      # explicitly save active sessions
dev restore   # recreate saved sessions

Layouts

Layout files live in ~/.config/dev-launcher/layouts/<name>.layout. They define what windows and panes to create.

Syntax

# Comments start with #
# [name] creates a new tmux window
# First line after [name] is the command for the initial pane
# Empty command = plain shell
# Use $CLAUDE to insert claude with configured args

[window-name]
command for first pane

# Split the current window into panes:
#   >        vertical split (side by side)
#   v        horizontal split (top/bottom)
#   >40%     vertical split, new pane gets 40% width
#   v30%     horizontal split, new pane gets 30% height

>50% command     # add a pane to the right
v30% command     # add a pane below

Included layouts

default — three separate windows:

[nvim]       [claude]       [shell]

split — nvim and claude side by side, shell below claude:

┌──────────┬──────────┐
│          │  claude   │
│  nvim    ├──────────┤
│          │  shell    │
└──────────┴──────────┘

Plus a separate shell window.

dotnet — like default but with an extra services window for running processes.

Creating your own layout

# Create a new layout file
cat > ~/.config/dev-launcher/layouts/fullstack.layout << 'EOF'
# Fullstack layout
[editor]
nvim .
>40% $CLAUDE

[shell]

[services]
npm run dev
v50% docker compose logs -f
EOF

Then assign it to a project in ~/.config/dev-launcher/projects:

myapp:My App:~/code/myapp:fullstack

Configuration

All config lives in ~/.config/dev-launcher/:

~/.config/dev-launcher/
├── projects         # project registry
└── layouts/         # layout files
    ├── default.layout
    ├── split.layout
    └── ...

Edit the top of ~/bin/dev to change defaults:

CONFIG_DIR=~/.config/dev-launcher    # config directory
GITHUB_DIR=~/code/github             # default clone directory
CLAUDE_ARGS="--dangerously-skip-permissions"  # claude flags, or "" for default