Repository navigation
Sessions
Think of ananta as two pieces that work together:
- The server — a background program that owns every pane, runs your shell commands, and keeps everything alive.
- The client — the thin program you type in inside your terminal. It only sends keystrokes and draws frames.
Because the server is separate, you can close your terminal, drop your SSH connection, or reboot your computer, and your panes keep running. Come back later and reattach — nothing is lost.
📸 Screenshot coming here: Diagram showing client and server connected by a unix socket. 🎬 Video coming here: Detach, close terminal, reattach later — your work is still there.
You type in a terminal (client)
↓ keystrokes
┌─────────────────────┐
│ ananta server │ ← owns panes, PTYs, scrollback
│ (runs in background)│
└─────────────────────┘
↑ frames to draw
You see output in your terminal (client)
| Command | What it does |
|---|---|
ananta |
Attach to session "main" (create it if needed) |
ananta -s work |
Attach to session "work" |
ananta new work |
Create session "work" and attach (error if it exists) |
ananta attach work |
Attach to an existing session |
ananta ls |
List all live sessions (panes, attached/detached) |
ananta kill work |
End a session and every program in it |
ananta local |
Run without a background session (closes when the terminal closes) |
📸 Screenshot coming here: Output of
ananta lsshowing one attached and one detached session. 🎬 Video coming here: Creating, listing, and killing sessions.
Inside ananta, press alt+d to detach. The server keeps running and your panes keep producing output. Close your terminal or drop SSH — it does not matter.
Come back later:
ananta # attach to "main"
ananta -s work # attach to "work"
ananta attach workWhen you reattach, everything is re-laid out for your new terminal size, and the scrollback that filled while you were away is all still there.
Only one client can be attached to a session at a time. If you attach from a second terminal, the first client is told to leave and exits with a notice. This is handy for moving between machines.
Once a session is running, any shell or script can drive it. The program always goes in double quotes, as one argument:
ananta open "htop" -n 3 -w 0.33 -s test # htop, workspace 3, 33% wide, session "test"
ananta open "tail -f /var/log/syslog" --below
ananta open "make watch" -k # -k: keep keyboard focus where it is
ananta open # no program: a new shell
ananta workspace 3 # switch the view
ananta focus left # left | right | up | down
ananta width 50% # resize the focused column
ananta send -e "make test" # type into a pane (-e presses Enter)
ananta close # close the focused pane
ananta list # list panes (id, workspace, column, width, program)
ananta action overview # run any action by name
ananta action goto_workspace 2Flags may go before or after the program. -s NAME picks the session; otherwise it defaults to the session you are inside (every pane has ANANTA_SESSION and ANANTA_PANE set), else main.
Inside ananta local there is no session, so name one with -s.
open starts the program in the directory you ran the command from (-d DIR to choose another).
📸 Screenshot coming here: Terminal running
ananta open "htop"andananta list. 🎬 Video coming here: Controlling a running session from another terminal window.
Everything lives under $XDG_RUNTIME_DIR/ananta-<uid>/ (or the temp folder), mode 0700:
| File | Purpose |
|---|---|
NAME.sock |
The unix socket clients connect to |
NAME.log |
The server's output, useful for crash reports |
Session names may contain letters, digits, ., _, - (up to 48 characters).
📸 Screenshot coming here: The session socket and log files on disk. 🎬 Video coming here: Finding the logs when something goes wrong.
-
leader+Qinside the session — ends it; attached clients get "session ended". -
ananta kill NAME— from any terminal. -
leader+d/alt+donly detaches; the session keeps running and can be re-attached later.
There is no saved session state on disk. A session exists only while its server is running. If the machine restarts, sessions are gone — like tmux without plugins.
🎬 Video coming here: The difference between detach and kill.