termuna

Your setup, carried

A kit is a small sealed bundle of your own shell setup that Termuna carries to the host and applies before your shell starts, so you never land on a server with nothing. It is removed when the session ends.

Not the account recovery kit, which is what gets you back into your encrypted data when the passphrase is lost. Same word, unrelated feature.

What a kit holds

Three things, all optional, all yours:

  • A few rc files: a .bashrc, a .zshrc, a .profile or a .vimrc with your aliases, prompt and functions, written by path the way they sit in a home directory.
  • Environment variables: EDITOR, LANG, LESS, a proxy.
  • Termuna's own compiled terminfo entry, one tick box, so a host that has never heard of this terminal still draws it correctly.

A kit is an item in the same encrypted vault as your hosts and snippets, sealed on your device. With Termuna Cloud it syncs to your other machines and your phone with everything else in the vault, and the relay stores only ciphertext; without an account it stays on the machine that made it and works there all the same. The whole kit, files and variables together, is capped at 64 KiB: a working shell setup, not a dotfiles repository. For the repository, clone it on the far side. A kit is for the first thirty seconds, not for your whole home directory.

How it reaches the host

When a session starts, Termuna makes a per-session directory in the host's temp space, mode 0700 from the moment it exists and under a name nobody can guess, writes the kit into it and starts your shell reading it. Your rc files are sourced from there and your variables are already set when the prompt appears. The shell is still the host's own shell, and it reads the host's own login files first, so choosing a kit never costs you the setup the server already had.

# on the host, while the session is live
$ echo $TERMUNA_KIT_DIR
/tmp/termuna-kit-3f9c01a2b7e4
$ echo $TERMUNA_KIT
dotfiles

Termuna never writes to your real home directory on the host. Your .bashrc, .zshrc, .profile and ~/.ssh on the server are read, never edited, and every path a kit names is refused if it would leave the session directory. The one file outside that directory is the terminfo entry, below, and that one is taken back too.

When the session ends, the directory is removed: exactly the files the kit wrote, never a recursive delete, so anything you put in there yourself is left where you put it. If the link drops and redial brings it back, the kit is applied again under a new directory, because a redial is a new connection and a new shell. A shared connection carrying several panes applies the kit once, and every pane on it sees it; the directory stays until the last session on that connection is gone.

Terminfo, and the one file outside the session directory

Termuna has its own terminal description, termuna-256color. Most hosts have never seen it, and a host that does not know your TERM gives you a shell where colours, keys or line editing quietly misbehave. So a kit can install the compiled entry, carried inside Termuna itself, at ~/.terminfo/t/termuna-256color on the host. That is the only path outside the per-session directory Termuna ever writes, and nothing else under ~/.terminfo is touched. The session that wrote it removes it when it ends. An entry that is already there, byte for byte the same, is left alone: not rewritten, and not removed afterwards.

The pane always states the TERM you actually got, so there is never a guess: termuna-256color when the entry is in place, xterm-256color when it is not. A ~/.terminfo that will not take the entry is one amber line and not a refusal of the kit: the rest of the kit still applies.

Which kit a host gets

A kit is chosen on a host, or on a group of hosts, and the host's own choice wins. A group hands its kit to every host under it that has not chosen, and the nearest group above a host is the one that decides.

The host hasIts group hasWhat is carried
a kita kitThe host's kit, alone. Kits do not merge, so what the host's row says is what you get.
nothing chosena kitThe group's kit.
a kitnothingThe host's kit.
No kit (none)a kitNothing. Setting a host to no kit is how you opt one machine out of a group's kit.
nothing chosennothingNothing. Sessions start exactly as they did before kits existed.

A kit deleted on another machine while a host still pointed at it carries nothing and says so on the host's row. It never stops the connection.

When a kit is not carried

Three cases, and each one says so in the pane in a single amber line rather than failing silently or failing the session. The shell always opens: a kit is a convenience, never a gate.

CaseWhat the pane saysWhat to do
No temp space on the far side kit dotfiles not applied: /tmp is read only on this host, the session continues without it The host's temp directory is missing or will not take a directory. Give the account a writable /tmp or $TMPDIR, or set the host to no kit.
The far side is not POSIX kit dotfiles not applied: this far side is not POSIX like, no shell answered, the session continues without it A network device, a restricted shell or anything else with no POSIX shell behind it. There is no rc to read there: set that host to no kit.
Over the 64 KiB cap kit dotfiles not applied: 7 KiB over the 64 KiB cap after 3 files, the session continues without it Trim the rc files or move the rest into a repository you clone on the host. The kit editor's meter shows the size against the cap as you type.

Making one

Open Ctrl+K > Kits for the list and the editor, then pick the kit on a host or on a group in the connections screen. Put in the part of your shell setup you actually want on every server, not all of it. A good first kit is one .bashrc of about ten lines.

# .bashrc, a kit that earns its place
alias ll='ls -lah'
alias gs='git status -sb'
export LESS='-R -F -X'
# a prompt that tells you which machine you are on
PS1='\h:\w\$ '

Next: Cloud continuity