MCPcopy Index your code
hub / github.com/drolosoft/cmux-resurrect

github.com/drolosoft/cmux-resurrect @v1.21.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.21.0 ↗ · + Follow
1,216 symbols 3,944 edges 137 files 512 documented · 42%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

crex logo

crex (cmux-resurrect)

Ghostty cmux GitHub Release Go Report Card License: MIT Homebrew

Design, manage, and automate terminal workspaces — for cmux and Ghostty.

Save layouts by name. Restore them anytime. Switch between them in seconds. Resume AI coding sessions mid-conversation. Launch workspaces from Alfred. 🐦‍🔥

crex demo


Features

**💾 [Save & Restore](docs/commands.md)** Every tab, pane, CWD, and command — captured and restored by name. **📦 [16 Templates](docs/templates.md)** Instant workspace setup — splits, IDE layouts, AI pair-programming. **📝 [Markdown Blueprints](docs/blueprint.md)** Obsidian-compatible, version-controlled, shareable workspace definitions. **🤖 [AI Auto-Detection](docs/commands.md#ai-session-auto-detection)** 15 AI tools detected. Sessions resume mid-conversation automatically. **🔍 [Alfred Integration](docs/alfred.md)** NEW Search and launch any workspace from Alfred with one keystroke. **⚡ [Auto-Accept](docs/configuration.md#auto-accept-for-ai-agents)** NEW Skip permission prompts on restore for Claude, Codex, OpenCode, and 10 more.

Quick Start

brew install drolosoft/tap/crex       # install
crex setup                            # first-run wizard
crex save my-day                      # snapshot your layout
crex restore my-day                   # bring it all back
crex pop                              # instant workspace picker (Ctrl+G)

crex quick start

Also available via go install github.com/drolosoft/cmux-resurrect/cmd/crex@latest. See Building.


Instant Workspace Picker

Type crex pop or hit Ctrl+G — a floating picker with fuzzy search across all layouts, templates, and individual workspaces.

crex pop picker

Tab into any layout to browse its workspaces:

crex pop drill into workspaces


Alfred Integration

Search and restore workspaces directly from Alfred. Type crex + your query — every saved workspace is searchable by name.

crex Alfred integration

Key Action
Enter Restore workspace
Cmd+Enter Restore full layout
Alt+Enter Show layout details
Ctrl+Enter Open TOML file

Works with both cmux and Ghostty. See Alfred setup guide for installation.


One Command, Full IDE

crex template use ide

crex template use ide

16 built-in templates — from simple splits to monitoring dashboards. See the Template Gallery.


AI Session Resume

crex save detects running AI sessions and captures their session IDs. On restore, each resumes exactly where you left off.

crex❯ save my-day

📦 my-day
   7 🧩 drolosoft 📌
   ├── claude --resume 90d6d97b... ★
   └── →right 🌐 https://drolosoft.com/

   🚀 Homepage 📌
   ├── npm run dev
   ├── →right nvim CLAUDE.md ★
   └── →right 🌐 http://localhost:3000/

15 tools supported: Claude Code, OpenCode, Codex, Amp, Gemini CLI, Copilot, Grok, Cursor, Aider, and more. Any foreground process (npm, nvim, htop) is also detected and restored.

Configure auto-accept to skip permission prompts on restore — agents start in autonomous mode automatically.


Interactive Shell

crex tui — a REPL with browse mode, numbered items, history, and tab completion.

crex interactive shell


Supported Backends

Backend Status Detection
cmux Full support Auto-detected via CMUX_SOCKET_PATH
Ghostty Full support Auto-detected when running

macOS only. Both backends auto-detected — same commands, same templates, same Blueprints.


vs cmux native restore

cmux native crex
🔄 Restores last session on relaunch Named layout library — switch between saved layouts
📐 No templates 16 built-in templates
📝 JSON snapshots Markdown Blueprints — Obsidian-compatible
🔍 AI tools via hooks Any foreground process — npm, vim, htop, all detected
Automatic on relaunch On-demand — filter, dry-run, restore specific workspaces
⏱️ Saves on quit Watch daemon — background auto-save

Documentation

Commands Full command reference
Templates 16 built-in templates with diagrams
Blueprints Markdown workspace definitions
Alfred Alfred workflow setup
Configuration config.toml, auto-accept, env vars
Auto-Save Daemon, shell hooks, launchd
Shell Completion bash, zsh, fish setup
Workflows Save/Restore vs Import comparison
Building Build from source

Contributing

Contributions welcome — bug fixes, templates, feature ideas. Open an issue or PR.

If crex saves your sessions, a ⭐ helps others discover it.

Support

Buy Me A Coffee


MIT License · Forged by Drolosoft · Tools we wish existed

Extension points exported contracts — how you extend this code

Backend (Interface)
Backend abstracts interaction with a terminal multiplexer/emulator. Implementations exist for cmux (CLIClient) and Ghost [5 …
internal/client/client.go
Store (Interface)
Store defines the interface for layout persistence. [1 implementers]
internal/persist/store.go
BannerCycleFn (FuncType)
BannerCycleFn cycles the banner style and returns (newStyle, preview, error). preview is the rendered banner in the new
internal/tui/shell.go
DryRunFormatter (Interface)
DryRunFormatter generates human-readable command strings for dry-run mode. [2 implementers]
internal/client/dryrun.go
PaneGeometryProvider (Interface)
PaneGeometryProvider is optionally implemented by backends that expose pane pixel geometry. Used during save to infer sp [2 …
internal/client/client.go
SurfaceRenamer (Interface)
SurfaceRenamer is optionally implemented by backends that can set the title of an individual surface/tab (not just the w [2 …
internal/client/client.go
PaneResizer (Interface)
PaneResizer is optionally implemented by backends that support programmatic pane resizing. Used during restore to apply [1 …
internal/client/client.go

Core symbols most depended-on inside this repo

ln
called by 76
cmd/style.go
f
called by 70
cmd/style.go
NewFileStore
called by 55
internal/persist/store.go
String
called by 41
internal/tui/pop.go
Save
called by 37
internal/persist/store.go
Run
called by 35
internal/orchestrate/watch.go
unitName
called by 31
cmd/branding.go
Parse
called by 28
internal/mdfile/parse.go

Shape

Function 822
Method 283
Struct 91
TypeAlias 12
Interface 7
FuncType 1

Languages

Go99%
TypeScript1%

Modules by API surface

cmd/completion_test.go55 symbols
internal/tui/pop.go37 symbols
internal/orchestrate/save_test.go37 symbols
cmd/template_test.go37 symbols
internal/orchestrate/restore_test.go33 symbols
internal/client/dryrun.go33 symbols
cmd/branding_test.go31 symbols
internal/detect/sessions.go30 symbols
internal/client/ghostty.go30 symbols
internal/gallery/gallery_test.go29 symbols
internal/detect/sessions_test.go28 symbols
internal/client/client.go27 symbols

For agents

$ claude mcp add cmux-resurrect \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page