Next: Dev Tool Immich Photo Manager AI-powered photo management for Immich
DevHunt

cmux-resurrect

Session persistence for cmux — your terminal workspaces, resurrected.

macOS Linux MIT License Open Source
crex demo — save my-day, restore my-day

The Problem

cmux is the fastest-growing terminal multiplexer in the Ghostty ecosystem (12K+ stars). It handles session restoration well most of the time, but crashes, forced updates, and unexpected reboots can still wipe your workspace.

The Solution

crex is a safety net for those moments. One command saves your entire cmux layout — workspaces, splits, CWDs, pinned state, startup commands. One command brings it all back. Inspired by tmux-resurrect, crex goes further with Workspace Blueprints: define your ideal terminal setup in Obsidian-compatible Markdown, version it, share it with your team.

Why crex?

tmux-resurrect proved that session persistence is essential. Every multiplexer eventually gets one — crex is that tool for cmux.

tmux-resurrect crex
🎯 Saves/restores tmux sessions Saves/restores cmux sessions
📝 Plugin configuration Workspace Blueprint — Markdown files, Obsidian-compatible
🧩 Manual pane recreation Reusable templates (dev, go, monitor)
📥 One-way restore Bidirectional — import-from-md & export-to-md
👁 Execute immediately Dry-run — preview every command first
Manual saves Auto-save + launchd — deduped, zero-maintenance
📋 Edit config files CLI — add, remove, toggle from terminal
crex save my-day — 14 workspaces saved in one command

Features

💾

Full Layout Capture

Saves workspaces, splits, CWDs, pinned state, and active tab to TOML. One command to snapshot your entire session.

📝

Workspace Blueprint

Declare your ideal workspace setup in a Markdown file — Obsidian-compatible, version-controlled, shareable with your team.

🧩

Reusable Templates

Define pane layouts once (dev, go, monitor) and reference them from any workspace. No more repeating split configurations.

👁

Dry-Run Preview

See every cmux command that will execute before anything runs. Inspect, verify, then restore with confidence.

Auto-Save with launchd

Periodic saves tied to cmux socket availability. Content-hash deduplication ensures no duplicate files. Zero maintenance.

📋

CLI Workspace Management

Add, remove, toggle, and list workspace entries directly from the terminal. No file editing required.

Shell Completion

Type less, do more. Tab completion for commands, layout names, and flags. Dynamic completions pull from your actual saved sessions. Zero-config for Homebrew users.

Tab Completion in Action

Completions are installed automatically with Homebrew. Layout names come from your actual saved sessions — not a static list.

crex res<TAB> → restore crex restore <TAB> → my-day production autosave crex save --<TAB> → --force --quiet --verbose

Workspace Blueprint

Workspace Blueprints are Markdown documents with two sections — Projects and Templates. Compatible with Obsidian and any Markdown editor. Checkboxes control which workspaces get created. Templates define reusable pane layouts.

📄 workspaces.md
## Projects **Icon | Name | Template | Pin | Path** - [x] | 🌐 | webapp | dev | yes | ~/projects/webapp - [x] | ⚙ | api-server | dev | yes | ~/projects/api-server - [x] | 🧪 | testing | go | yes | ~/projects/testing - [ ] | 📓 | notes | single | no | ~/documents/notes ## Templates ### dev - [x] main terminal (focused) - [x] split right: `npm run dev` - [x] split right: `lazygit` ### go - [x] main terminal (focused) - [x] split right: `go test ./...`

Quick Start

Three ways to install. One minute to start.

Install with Homebrew (recommended)

brew tap drolosoft/tap brew install cmux-resurrect

That's it — both crex and cmux-resurrect are ready to use. No Go toolchain required.

Install with go install

go install github.com/drolosoft/cmux-resurrect/cmd/crex@latest

Install from source

git clone https://github.com/drolosoft/cmux-resurrect.git cd cmux-resurrect make install-both # installs both crex and cmux-resurrect

Try it

crex save my-day # snapshot your layout crex restore my-day # bring it all back

Commands

Command Alias Description
crex save [name]Capture current layout to TOML
crex restore [name]Recreate workspaces, splits, and commands
crex listlsList saved layouts with workspace count
crex show <name>Display layout details (--raw for TOML)
crex edit <name>Open layout in $EDITOR
crex delete <name>rmDelete a saved layout
crex import-from-mdCreate workspaces from Workspace Blueprint
crex export-to-mdExport live cmux state to Workspace Blueprint
crex watch [name]Auto-save at interval (default: 5m)
crex workspace addws addAdd workspace entry to Blueprint
crex workspace removews rmRemove workspace entry from Blueprint
crex workspace listws lsList workspace entries in Blueprint
crex workspace togglews toggleEnable/disable a workspace entry
crex completion [bash|zsh|fish]Generate completion script for your shell
crex versionPrint version, commit, build date

Platform Compatibility

crex is a companion to cmux. If your Mac runs cmux, it runs crex — no extra dependencies, no compatibility surprises.

Platform Architecture Status
macOS (Apple Silicon)M1, M2, M3, M4✅ Tested
macOS (Intel)x86_64✅ Tested
Linuxx86_64✅ Builds
LinuxARM64✅ Builds

Built With

cmux-resurrect is a single Go binary with no runtime dependencies.

  • Go 1.26 — Fast compilation, single binary output
  • Cobra — CLI framework for commands and flags
  • go-toml/v2 — Configuration file parsing
  • Lipgloss — Styled CLI output with colors
  • Huh — Interactive TUI components (layout picker)
  • 42 tests — Comprehensive test suite with security coverage
Buy Me A Coffee

I build tools I wish existed, then give them away.
If one of them saved you time, a coffee keeps the next one coming.

Buy Me A Coffee QR

Ready to resurrect your sessions?

cmux-resurrect is free, open source, and ready to use.