What is MonoTerm?
MonoTerm is Monolex’s terminal-in-terminal. It wraps the same headless PTY engine that powers the Monolex desktop app, but renders directly to your existing terminal via crossterm — no Electron, no WebView, no GUI.Install
Quick Start
Keybindings
Default keybindings, configurable via JSON:| Key | Action |
|---|---|
Ctrl+T | New tab (project selector) |
Ctrl+W | Close tab |
Ctrl+N / Ctrl+P | Next / Previous tab |
Ctrl+B | Toggle sidebar |
Ctrl+R | Rename tab |
Ctrl+Q | Quit |
Alt+1~9 | Go to tab by number |
Alt+Backspace | Delete word backward |
Alt+Left/Right | Move word backward/forward |
~/Library/Application Support/Monolex/keybindings.json:
Architecture
MonoTerm does not implement a terminal emulator. It wraps the Monolex headless engine — the same Alacritty VTE parser, AtomicState diff engine, and PTY daemon that power the desktop app.What MonoTerm adds over raw headless:
| Feature | Headless | MonoTerm |
|---|---|---|
| PTY session | Yes | Yes + multi-tab |
| Grid rendering | GridUpdate JSON/binary | crossterm to host terminal |
| Sidebar | No | File tree, tabs, activity |
| IME support | inverse_cursor field | Virtual cursor tracking + hold |
| Resize | Grid worker only | Grid + PTY daemon (SIGWINCH) |
| Keybindings | N/A | Configurable JSON |
| Self-test | N/A | monoterm test (PTY harness) |
Virtual Cursor & IME
When apps like Claude Code hide the real cursor and draw their own using INVERSE video (\x1b[7m), MonoTerm detects the virtual cursor position
from the AtomicState layer and places the host terminal’s cursor there.
This ensures the parent terminal’s IME (Korean, Japanese, Chinese input)
composition window appears at the correct position — where the user is
actually editing, not where the hidden real cursor is.
The detection uses the same algorithm as the Monolex desktop app:
- Scan for INVERSE cells on the cursor row first (avoid false positives)
- Fall back to bottom-up scan
- Hold position during Ink erase-redraw cycles (6 frames)
- Distance check to discard false positives (zsh % marker, status bars)