Skip to content

drolosoft/cmux-resurrect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

59 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

crex logo

cmux-resurrect

CI Go Report Card Go Reference codecov License: MIT Homebrew GitHub Release cmux

Session persistence for cmux β€” your terminal workspaces, resurrected.

cmux is a popular terminal multiplexer in the Ghostty ecosystem (14K+ stars). It handles session restoration well most of the time, but crashes, forced updates, and unexpected reboots can still wipe your workspace. crex (short for cmux-resurrect) is a safety net for those moments.

⚑️ One command saves your entire cmux layout. One command brings it back β€” workspaces, splits, CWDs, pinned state, startup commands, everything.

Inspired by tmux-resurrect (12.7K stars) β€” crex does for cmux what tmux-resurrect does for tmux, and takes it further with Workspace Blueprints: define your ideal terminal setup in a Markdown file (Obsidian-compatible), version it, share it with your team, and let crex build it for you.

crex demo


πŸš€ Quick Start

Install with Homebrew (recommended)

brew install drolosoft/tap/cmux-resurrect

Both crex and cmux-resurrect are ready to use, with shell completions installed automatically. No Go toolchain required. macOS only (cmux is a macOS terminal).

Install with go install

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

For building from source, see docs/building.md.

Enable Shell Completion

Homebrew users get completions automatically. For manual installs, add one line to your shell config:

eval "$(crex completion zsh)"    # zsh β€” add to ~/.zshrc
eval "$(crex completion bash)"   # bash β€” add to ~/.bashrc
crex completion fish | source    # fish β€” run once

Now crex <TAB> shows all commands, crex restore <TAB> completes your saved layout names, and flags like --mode complete their values. See docs/shell-completion.md for the full guide.

Try it

crex save my-day                # snapshot your current layout
crex save my-day --dry-run      # or preview first without saving

πŸ’Ύ Save & Restore

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

Every workspace, split, CWD, pinned state, and startup command β€” captured and restored. Layouts are saved to ~/.config/crex/layouts/.

crex save my-day

πŸ“₯ Workspace Blueprints

Define your workspaces in Obsidian-compatible Markdown. Import creates only what's missing β€” it's idempotent.

## Projects
**Icon | Name | Template | Pin | Path**

- [x] | 🌐 | webapp    | dev     | yes | ~/projects/webapp
- [x] | βš™οΈ | api       | dev     | yes | ~/projects/api-server
- [x] | πŸ§ͺ | tests     | go      | yes | ~/projects/testing

## Templates

### dev
- [x] main terminal (focused)
- [x] split right: `npm run dev`
- [x] split right: `lazygit`
crex import-from-md           # create workspaces from Blueprint
crex export-to-md             # capture live state to Blueprint

crex import-from-md in action

For the full Blueprint format, templates, and CLI management, see docs/blueprint.md.


✨ Why crex?

tmux-resurrect proved that session persistence is essential for any serious terminal multiplexer workflow. Every multiplexer eventually gets one β€” crex is that tool for cmux.

tmux-resurrect crex
πŸ“ Plugin configuration Workspace Blueprint β€” Markdown files, Obsidian-compatible
🧩 Manual pane recreation Reusable templates (dev, go, monitor)
πŸ“₯ One-way restore Bidirectional β€” import from and export to Markdown
πŸ‘οΈ Execute immediately Dry-run mode β€” preview every command first
⏱️ Manual saves Auto-save with launchd β€” deduped, zero-maintenance
πŸ“‹ Edit config files CLI workspace management β€” add, remove, toggle from terminal
πŸ”€ Basic tab completion Dynamic completions β€” layout names, workspace names, flag values (bash/zsh/fish)

πŸ“š Documentation

Doc Description
Commands Full command reference, flags, and recipes
Workspace Blueprints Blueprint format, templates, CLI management
Workflows Save/Restore vs Import, dry-run, side-by-side comparison
Configuration config.toml reference and defaults
Auto-Save launchd integration for macOS
Shell Completion Setup, troubleshooting, what gets completed
Building from Source Makefile targets, cross-compilation, platform support
Architecture Internal design for contributors

🌟 Contributing

Contributions are welcome β€” bug fixes, new templates, feature ideas. Open an issue or submit a PR.

If crex saves your sessions, consider giving it a ⭐ on GitHub β€” it helps others discover the project.


β˜• Support

If crex saved you time or made your workflow easier, consider buying me a coffee β€” it keeps the next one coming!

Buy Me A Coffee


πŸ“œ License

MIT License β€” free to use, modify, and distribute.

Born from a real need: a crashed cmux session took an hour of carefully arranged workspaces with it. crex exists so that never happens again.

Forged by Drolosoft Β· Tools we wish existed

About

πŸ”„βœ¨πŸ–₯️ Session persistence for cmux β€” save, restore, and manage your terminal workspaces. Never lose your layout again.

Topics

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors