Experimental terminal multiplexer in Zig, designed for modern terminal workflows (Ghostty + zmx) with tiling layouts, tabs, popups, mouse interactions, and plugin-extensible behavior.
- Active prototype (
0.1.0-dev) - Runtime loop works as the default mode
- Built-in compatibility checks and manual soak scripts are included
- Multiple layouts:
vertical_stack,horizontal_stack,grid,paperwm,fullscreen - Tabs/workspaces with window movement between tabs
- Popup shell and panel controls
- Scrollback mode with search/navigation
- Mouse modes:
hybrid,passthrough,compositor - Optional plugin host (Bun-based process model)
- Optional plugin layout backend (
layout_backend=plugin)
- Zig
0.15.2or newer (project minimum) - A POSIX-like environment (macOS/Linux)
- Optional:
zmxfor session attach/detach workflowbunfor TypeScript plugin examples- Ghostty for the compatibility path documented in this repo
# Build
zig build
# Run interactive runtime loop
zig build run
# Run tests
zig build test
# Run compatibility smoke checks
zig build compat
# or directly:
scripts/compat/ci-smoke.shBinary output:
./zig-out/bin/ykmx
ykmx --help
ykmx --version
ykmx --benchmark 300
ykmx --benchmark-layout 500
ykmx --smoke-zmx my-session# Build first
zig build
# Start or attach to a session running ykmx
zmx attach dev ./zig-out/bin/ykmx
# Reattach later
zmx attach devDetach from the current zmx client with Ctrl+\.
Config is loaded from the first existing file:
$XDG_CONFIG_HOME/ykmx/config$XDG_CONFIG_HOME/ykmx/config.toml$XDG_CONFIG_HOME/ykmx/config.zig$HOME/.config/ykmx/config$HOME/.config/ykmx/config.toml$HOME/.config/ykmx/config.zig
Minimal example:
layout_backend="native"
default_layout="vertical_stack"
master_count=1
master_ratio_permille=600
gap=1
show_tab_bar=true
show_status_bar=true
mouse_mode="hybrid"
plugins_enabled=false
plugin_dir="$HOME/.config/ykmx/plugins"
plugins_dir="$HOME/.config/ykmx/plugins.d"Reference config lives at docs/examples/config.toml.
Prefix key is Ctrl+G.
- Windows:
ccreate,xclose,h/j/k/lfocus direction,J/Knext/prev by index - Tabs:
tnew,wclose active,]/[next/prev,mmove focused window to next tab - Layout:
Spacecycle layout,H/Lshrink/grow master ratio,I/Omaster count up/down - Popup/panels:
ptoggle popup shell,Escclose focused popup,Tabcycle popup focus - Scrollback:
u/dpage up/down,stoggle local scrollback navigation mode - Mouse mode:
Mcyclehybrid -> passthrough -> compositor - Quit ykmx:
q(graceful shutdown of ykmx process) - Detach request:
\
When plugins_enabled=true, ykmx can run plugins as separate processes via:
plugin.tomlrun="..."(generic runtime command in plugin cwd)- fallback:
bun run <plugin_dir>/index.ts
Supported plugin directory modes:
plugin_dir=/abs/path/to/plugin(single plugin)plugins_dir=/abs/path/to/plugins.d(directory of plugin subfolders)plugins_dirs=[...](multiple roots)
Example plugins are in docs/examples/plugins.d/:
paperwm(layout example)desktop-wm(floating overlap + drag/resize + controls)popup-controlssidebar-panelbottom-panelcommand-palettetheme-switch-command-palettewindows31-decoration-themeretro-win31-themepython-demo(language-agnostic runtime viaplugin.toml run=...)
- Docs index / TOC:
docs/README.md - Usage guide:
docs/usage.md - Architecture overview:
docs/architecture.md - Runtime flow:
docs/runtime-flow.md - Module ownership map:
docs/module-map.md - Refactor history:
docs/refactor-log.md - Compatibility matrix and checklist:
docs/compatibility.md - Implementation plan/context:
docs/plan.md - Contributor/agent operating guide:
AGENTS.md
- This is an experimental codebase; interfaces and config keys may change.
- For plugin behavior and NDJSON event/action protocol details, use
docs/usage.mdas the source of truth.