juliaserver - Persistent Julia REPL sessions via tmux
I’ve built a very simple bash CLI tool that manages long-lived Julia REPL sessions in tmux, solving the startup time problem for interactive development for me.
The Problem
Interactive Julia development often means repeatedly paying the cost of package precompilation and startup time. Each script run starts from a cold Julia instance.
The natural instinct for me is to keep a REPL open forever. But this becomes unsustainable when working with multiple projects that have different package environments - I end up juggling too many terminal windows and ultimately losing track and paying the startup cost more often than necessary.
The Tool
juliaserver maintains persistent Julia REPL sessions (with Revise automatically, if available).
# Launch a session for your project
jls launch . --name demo_session # [name is optional, can also be a path]
# Run your script - first time pays normal startup cost
jls run demo_session analyze.jl -o
# Run again - instant, no recompilation
jls run demo_session analyze.jl -o
# Or attach to the session and work interactively
jls attach demo_session
# Now you're in the Julia REPL directly
# Detach with `Ctrl+b d` when done
Key Features
- Interactive sessions: Attach to work in the REPL directly, or send scripts from your terminal or editor. So if you script fails, you can jump in the same repl and investigate, then detach when you’re done and rerun it.
- GUI support: Plots and interactive visualizations work just as well as they would otherwise.
- Multiple sessions: Different projects/environments run simultaneously and can “disappear” when you don’t need them, while maintaining state to re-enter later.
- Output capture: --output flag shows results without attaching,
jls print [session]can do the same, making it possible to print, copy, or pipe the state of the REPL if desired. - Pure bash: Just tmux + Julia
LLMs
As a bonus, this also enables LLM coding tools, like Claude Code, Codex, or others, to work with Julia interactively by sending code to a REPL, waiting for it to finish, checking the output, and then iterating like a human would in an interactive session. Since making this, I’ve used it to debug with “look at my REPL and investigate [something weird]”, to explore the behavior of something in two different environments by sending them commands and comparing the outputs, and so on. All I did to hook that up was tell Claude to run jls help before doing any julia work.
- GitHub: GitHub - tomerarnon/juliaserver: tmux-based persistent julia sessions with convenient tooling
Feedback welcome!