Documentation Index
Fetch the complete documentation index at: https://docs.monolex.ai/llms.txt
Use this file to discover all available pages before exploring further.
Testing & Automation
MonoTerm has two interfaces for automation: test for UI verification
and ctl for controlling a running instance.
monoterm test
Spawns a fresh MonoTerm in a real pseudo-terminal and sends keystrokes
through the same path as a human typing. Use this to verify UI features.
monoterm test # run automated test suite
monoterm test spawn # start and show initial screen
monoterm test key @ # send @ key, show resulting screen
monoterm test key tab # send Tab key
monoterm test key ctrl+b # send Ctrl+B
Example: verify prompt box opens
$ monoterm test key @
Screen after '@':
0: FILES │
1: │ src/ │
2: │ │ main.rs │
3: │ │ lib.rs │
9: │ Cargo.toml │ ┌─ Prompt ──────────────┐
10: │ README.md │ │ Type or / for commands │
14: │ │ └────────────────────────┘
Automated suite runs 10 checks:
$ monoterm test
--- Prompt Box (@) ---
PASS Prompt visible
PASS FILES visible
--- Tab to tree ---
PASS Enter:insert hint
--- Tree search ---
PASS search bar / lib
--- Tab back to prompt ---
PASS Tab:files hint
--- Type in prompt ---
PASS hello in prompt
PASS hello NOT in search
--- Esc close ---
PASS Prompt gone
8/10 passed
monoterm ctl
Controls a running MonoTerm instance via Unix socket.
Connects automatically to the newest instance.
monoterm ctl status # instance info
monoterm ctl tabs # list all tabs
monoterm ctl read # read screen content
monoterm ctl run 'ls -la' # execute command in active tab
monoterm ctl write 'partial' # send text without Enter
monoterm ctl ctrl-c # send interrupt signal
Example: run a command and read output
$ monoterm ctl run 'echo hello'
ok
$ monoterm ctl read hello
hello
macbook@NIIA ~ %
When to use which
| test | ctl |
|---|
| Target | New instance | Running instance |
| Keys | Through keyboard layer | Direct to shell |
| Best for | UI verification | Shell automation |
| Speed | ~10s startup | Instant |