A high-performance, Data-Oriented Julia Workspace Assistant & REPL Monitor with an interactive tmux TUI and native Zig IPC broker.
Inspect variables, dataframes, matrices, composite structs, and package dependencies in real time alongside your Julia REPL — completely standalone, with zero Neovim or external package requirements.
jEMach is built around Data-Oriented Design (DoD) principles for minimum latency, zero GC pressure, and optimal cache locality:
- Julia Engine (
src/jEMach.jl): Asynchronous background introspection task organizing workspace symbols into a Struct-of-Arrays (SoA) columnar table (WorkspaceTable). Reusable buffers eliminate GC allocation overhead during periodic polling. - Interactive tmux TUI (
scripts/jl_tui.lua): Standalone LuaJIT terminal UI connecting over UNIX domain sockets (/tmp/jemach_<project>.sock). Single-pass linear scan with dirty-rendering (0.0% CPU usage when idle). - Native Zig Broker (
zig/): Ultra-fast fan-out IPC broker and SoA multi-array structures (std.MultiArrayList) for high-throughput zero-copy event streaming.
julia .
]
# pkg>
add https://github.com/kitajusSus/jEMach
# or using Pkg API:
using Pkg
Pkg.add(url="https://github.com/kitajusSus/jEMach")- Start your Julia REPL inside a tmux session:
julia -t auto --project=.
- Load and start
jEMach:using jEMach jEMach.start() # Automatically opens the interactive TUI in a side pane
- When finished:
jEMach.stop() # Stops the watcher and closes the side panel automatically
- Split your current tmux window and launch the assistant:
tmux split-window -h -l 60 "./scripts/jl-assist" - In the Julia REPL:
using jEMach # or fallback via include: include("scripts/jl_watcher.jl")
To automatically start jEMach whenever an interactive Julia REPL launches, add this to ~/.julia/config/startup.jl:
if isinteractive()
try
using jEMach
catch
end
endSee docs/src/startup.md for advanced configuration.
The TUI provides 4 dedicated panels accessible via 1, 2, 3, 4 or Tab:
[1] Workspace: Real-time Data-Oriented tree view of variables, matrices, dataframes, structs, and modules.[2] History: REPL session command log with multi-select checkboxes (Space) to package commands into reusable procedures (p).[3] Procedures: Library of saved procedures with live split-view source code preview, run execution benchmarks (Enter), and REPL parameter editing (e).[4] Packages: Interactive project package manager (aadd,dremove,uupdate).
Turn your experimental REPL commands into parameterized, reproducible procedures with automatic AST variable analysis:
- Press
2to switch to History. - Press
Spaceto toggle[x]on the commands you want in your procedure. - Press
p(Make Procedure): an inline modal dialog will prompt for the procedure name. - Hit
Enter:jEMachextracts free variables, sets default values from your session, generatesprocedures/<name>.jl, and automatically loads it! - In
[3] Procedures, hitEnterto run with profiling oreto edit arguments in the REPL.
using jEMach
# Option A: Extract last N commands into a parameterized procedure
jEMach.make_procedure(:check_sample, last=4)
# Option B: Record commands interactively
jEMach.record(:verify_matrix)
A = rand(10, 10)
A = A + A'
e = eigen(A)
all(e.values .> -1e-5)
jEMach.record_stop()
# Run procedure with profiling (time & memory metrics tracked in TUI)
jEMach.run_procedure(:check_sample)
# List all discovered procedures (with optional search query)
jEMach.list_procedures()
jEMach.list_procedures("matrix")
jEMach.find_procedures("sample")| Key | Context | Action |
|---|---|---|
/ |
Global | Search & Live Filter (procedures, workspace variables, history, packages) |
Esc / x |
Global | Clear search filter and restore full list |
1 / 2 / 3 / 4 |
Global | Jump directly to Workspace / History / Procedures / Packages |
Tab / ] / [ |
Global | Cycle to next / previous tab |
j / k (or ↓ / ↑) |
Global | Move cursor down / up |
Space |
History | Toggle selection [x] / [ ] on command |
a |
History | Toggle select all / clear all |
p |
History | Make Procedure from selected commands (opens modal prompt) |
↵ (Enter) |
History | Send highlighted command to REPL |
↵ (Enter) |
Procedures | Run highlighted procedure with benchmark profiling |
e |
Procedures | Paste <proc_name>() into REPL line to customize parameters |
d |
Procedures | Delete procedure file from disk (with in-TUI confirmation) |
r |
Procedures | Reload procedure definitions from disk |
l / ↵ (Enter) |
Workspace | Expand node or evaluate println(var) in REPL |
h (or ←) |
Workspace | Collapse node / jump to parent |
i |
Workspace | Inspect variable details, methods, and creation history |
e |
Workspace | Insert variable expression directly into REPL command line |
d |
Workspace | Hide item from view |
D |
Workspace | Restore all hidden items |
s |
Workspace | Save clean reproducible session script |
a / d / u |
Packages | Add / Remove / Update package (in-TUI dialogs) |
c |
Global | Clear REPL screen (Ctrl-L) |
q / Ctrl-C |
Global | Quit assistant |
jEMach includes specialized introspection extractors for:
- DataFrames & Tables.jl: Column names, row counts, and column types.
- 1D Arrays & 2D Matrices: Dimensions, element types, and value slices.
- Dictionaries & Sets: Key-value pairs and entry expressions.
- Tuples & NamedTuples: Indexed and named member access.
- Composite Structs: Real-time field resolution via
fieldnames(T)and chained accessors.
▼ Main
df DataFrame (100 rows) 100×2 DataFrame
├─ :colA Vector{Int64} (100 rows) [1, 2, 3...]
└─ :colB Vector{Float64} (100 rows) [1.0, 2.0...]
x Int64 42
my_func Function (2 methods)
▶ LoadedPackage Module [collapsed — press l to expand]
./scripts/jl-assist [-p PANE_ID] [-w WIDTH] [-f]
-p PANE_ID Target tmux pane running Julia (auto-detected by default)
-w WIDTH Width of the TUI pane in columns (default: 60)
-f Force a new TUI pane even if one is already open
jEMach comes with a native IPC broker written in Zig for fan-out PUB/SUB communication:
cd zig
zig build test # Runs Data-Oriented Design MultiArrayList unit tests
zig build # Builds zig-out/bin/jemach-broker- Julia >= 1.10
- tmux >= 3.0
- luajit (
sudo pacman -S luajiton Arch Linux,sudo apt install luajiton Ubuntu/Debian)
