Integrations
hi installs and ships none of the tools below. Where a target has one, a session wires it in the way the tool’s own README does; where it does not, the session goes on without it. The switches are rows in SETTINGS.md. _HI_DISABLE_LOCAL=1 leaves all of this alone on your own machine (On your own machine).
Contents
- At a glance
- Prompt programs
- Shell hooks of your own
- Header cells of your own
- The environment segment
- bat and eza
- Terminal multiplexers
- Debian chroots
- git
- readline
- Shell frameworks
- Which side is asked
- A tool with no variable and no flag
- Config sizes
At a glance
| tool | what hi does with it | on by default | switch |
|---|---|---|---|
| starship, oh-my-posh, powerline-go, powerlevel10k, oh-my-zsh themes, oh-my-bash themes, bash-it themes, tide | draws the prompt in hi’s place, with your config from home | yes, where installed here | _HI_PROMPT_TOOL (hi for hi’s own) |
| mise, asdf, pyenv, rbenv, nodenv, nix, guix, devbox, devenv, direnv, conda, venv | names the active ones in the prompt’s leading (myproj) segment | yes | _HI_DISABLE_ENV_STATUS |
| bat, eza | cat, bat, and ls/eza aliases with hi’s flags and your theme | no: opt-in, where installed | _HI_TOOL_ALIASES |
| tmux, zellij, screen | hi --keep runs the session inside one on the target; your tmux.conf rides | no: per connect | --keep, --no-keep, --end |
| vim/neovim, nano, emacs, micro, helix, kakoune | opens with your config through an alias (the files) | yes | hi --disable-plugin vim nvim nano emacs hx kak micro, or one by name |
| oh-my-zsh, powerlevel10k, bash-it, fzf | loads after them and leaves their hooks working | - | Shell frameworks |
Prompt programs
A prompt program you already use draws the prompt in hi’s place, here and on every target that has it. hi keeps the header, aliases, and editors, and hands over only the prompt line. With _HI_PROMPT_TOOL unset, hi tries every program installed here, in this order, and the first that fits the shell and that the target has wins:
| program | shells | counts as installed here | started on a target | your config from home |
|---|---|---|---|---|
| powerlevel10k | zsh | your zsh rc loads the theme and ${ZDOTDIR:-~}/.p10k.zsh (or $POWERLEVEL9K_CONFIG_FILE) exists | as the rc loaded it, else from the usual install paths | that file, sourced after powerlevel10k |
| oh-my-zsh | zsh | ZSH_THEME in ${ZDOTDIR:-~}/.zshrc names a theme file | as the rc loaded it, else only the libraries themes call | the theme file, so a custom theme works on a box without it |
| oh-my-bash | bash | OSH_THEME in ~/.bashrc names a theme file | as the rc loaded it, else without its plugins, aliases, or completions | the theme file |
| bash-it | bash | BASH_IT_THEME in ~/.bashrc names a theme file | as the rc loaded it, else with BASH_IT_THEME pointed at your theme | the theme file |
| tide | fish | its functions autoload in fish | fish loads it; hi leaves its prompt alone | the tide_* universal variables, never the rest of fish_variables |
| starship | bash, zsh, fish | on $PATH | starship init <shell> | $STARSHIP_CONFIG, else ~/.config/starship.toml |
| oh-my-posh | bash, zsh, fish | on $PATH | oh-my-posh init <shell> | $POSH_CONFIG (or $POSH_THEME), else the file your rc’s init --config names |
| powerline-go | bash, zsh, fish | on $PATH | once per prompt, with _HI_POWERLINE_GO_OPTS | the flags in _HI_POWERLINE_GO_OPTS |
The list is worked out on your machine and handed to the target, which never looks for programs of its own: a shared box with powerlevel10k installed does not change your prompt unless you use it too. A program whose plugin is off (hi --disable-plugin starship) is left off the list unless _HI_PROMPT_TOOL names it.
Choosing. _HI_PROMPT_TOOL takes a list:
"tide starship"is tide in fish and starship in bash and zsh."tide hi"is tide in fish and hi’s prompt elsewhere."bash:starship hi"is starship in bash and hi’s prompt in zsh and fish. A<shell>:<program>entry is tried first, by that shell only.hialone keeps hi’s prompt everywhere, and takes the prompt back from one a target’s own rc started._HI_DISABLE_PROMPT=1beats all of it: no prompt from hi at all.
Prompts hi leaves alone. A prompt hi cannot hand over stays yours: liquidprompt or bash-git-prompt in bash; spaceship, pure, or a promptinit theme in zsh; any custom fish_prompt in fish. At home, a PS1 or PROMPT you wrote also stays; hi replaces only the shell’s default and the stock distro ones. On a target, hi’s prompt draws whatever the box sets; to use your own there, put it in the overlay’s bashrc or zshrc with _HI_DISABLE_PROMPT=1.
Framework themes are sourced on a target only where that framework is installed, so a theme’s source "$ZSH/lib/..." works as written; elsewhere hi’s prompt draws. Under powerlevel10k’s instant prompt, hi calls p10k clear-instant-prompt before the header, so p10k does not warn.
Each config from home rides the overlay; a copy in ~/.config/say-hi/ rides instead, which is how targets get a different one. Why hi hands over only the prompt: HI.32.
Shell hooks of your own
zoxide’s and atuin’s init, direnv hook, and mise activate are plugins of the hooks group, off by default. hi --enable-plugin zoxide runs zoxide’s init on targets that have it, after the aliases and extensions (SETTINGS.md). They are off because each keeps state under the target’s $HOME (zoxide’s database, atuin’s history), which hi neither writes nor cleans up.
A tool of your own is one [hooks.<name>] table with an init in your plugins file (hi --edit plugins); shells = "zsh fish" limits where it runs. Anything else goes in the overlay’s per-shell files:
# ~/.config/say-hi/bashrc
command -v fzf >/dev/null && eval "$(fzf --bash)"
Header cells of your own
A header item hi does not have is a file under ~/.config/say-hi/header/, named for its word, defining _hi_cell_<word>. The function writes the cell’s text, a color first, into the variable named by its first argument. _HI_HEADER_ORDER places the word:
# ~/.config/say-hi/header/load
_hi_cell_load() {
local _load_l
read -r _load_l _ 2>/dev/null </proc/loadavg || _load_l="?"
printf -v "$1" '%s' "${YELLOW}Load: $_load_l"
}
# ~/.config/say-hi/settings.sh
export _HI_HEADER_ORDER="banner utc version localtime os load check greeting"
- The file is bash, whatever shell the session runs.
- The word is the file name up to its first
.; a built-in word’s file replaces that item. - Prefix the function’s locals: the variable it writes is its caller’s.
- Lead with one of hi’s colors (
$RED,$GREEN,$YELLOW,$BLUE,$PURPLE,$CYAN, or a$BRone); a cell that would repeat its neighbor’s color takes the next hue (HI.48). - It runs on every header, a local greeting included, so every command it starts costs a fork each time.
- A file bash cannot parse is skipped with a warning;
hi --doctorlists the cells and flags it.
The environment segment
The prompt’s leading (myproj) names every active environment manager, outermost first: (mise|direnv:proj|myproj) is mise, a direnv-loaded proj, and a venv inside it. It reads the variables the tools export ($MISE_SHELL, $VIRTUAL_ENV, $CONDA_DEFAULT_ENV, …), so it costs no fork. mise shows only where a project config overrides the global one. A .venv is named for the directory holding it. A prompt program replaces the segment with the rest of the prompt; _HI_DISABLE_ENV_STATUS=1 turns it off.
Tools that draw their own prefix
hi stands down for a tool that draws its own prefix: an activated venv keeps its own (myproj) in zsh and fish. bash rebuilds $PS1 on every draw, so there hi draws the segment itself.
For hi’s styling everywhere, silence the tool’s prefix as the tool documents: export VIRTUAL_ENV_DISABLE_PROMPT=1 before activating a venv, and conda config --set changeps1 false. hi never sets these for you, since every other shell reads them too (HI.54).
bat and eza
With _HI_TOOL_ALIASES=1, hi builds these aliases from what the target has:
catandcatnrun bat (or Debian’sbatcat) with_HI_BAT_OPTS: no pager, two-space tabs,changes,gridstyle, and your bat config’s theme.catnadds line numbers. Without bat,catisccator plaincat, and there is nocatn.lsandezaare one alias running eza if the target has it, with_HI_EZA_OPTS, elsels, with_HI_LS_OPTS. eza’s flags never reach a target’sls.
Off, the default, cat, ls, and bat are the plain commands. No alias names a tool the target lacks. Set an *_OPTS setting and it replaces hi’s flags; to keep them and add one, set _HI_EZA_ADD, _HI_LS_ADD or _HI_BAT_ADD in settings.sh:
export _HI_EZA_ADD='--icons'
export _HI_BAT_ADD='--italic-text always'
A tool set by its environment, such as TIME_STYLE for eza and GNU ls, takes a table of your plugins that names the variable (Variables that ride).
Shipping your bat theme
Every target gets the bat config you keep here ($BAT_CONFIG_PATH, else $BAT_CONFIG_DIR/config, else ~/.config/bat/config), or the overlay’s bat/config instead. The default _HI_BAT_OPTS sets no --theme, so the file’s theme is the one you see.
Shipping your eza theme
Every target gets the theme.yml eza reads here ($EZA_CONFIG_DIR/theme.yml, else ~/.config/eza/theme.yml), or the overlay’s eza/theme.yml instead. Like BAT_CONFIG_PATH, EZA_CONFIG_DIR is set on a target whatever _HI_TOOL_ALIASES says, so a bare command eza matches too.
Terminal multiplexers
hi --keep <target> runs the session in tmux, zellij, or screen on the target, the first it has. The session outlives the connection, your laptop sleeping, or a move to another machine, and every later hi <target> reattaches. --no-keep opens an ordinary session beside it. A colleague on the same account gets a session of their own. _HI_KEEP=1 makes every connect a kept one.
It needs a target with bash, on any backend, and a terminal on your side. Without a terminal the session is an ordinary one; a target without bash gets the usual notice, and --plain says it skips --keep.
Ending it, which removes the session’s directory:
exitin the first pane, which asks first; anything butydetaches and leaves a fresh shell in the pane;hi --end <target>, from your side;- nobody attached for
_HI_KEEP_TIMEOUT(24h).
Detach with the multiplexer’s own key. New panes and windows run hi’s shell too.
A dropped link. On an ssh host, hi retries for _HI_KEEP_RETRY (5m) and lands you back in the session, showing how long the target keeps it. Ctrl+C stops retrying; hi <target> reattaches later. ssh’s ~. counts as a drop, so ~. then Ctrl+C leaves. A silent link counts as dropped after 45 seconds unless your ssh config sets its own ServerAliveInterval.
No multiplexer on the target. The shell cannot outlive the connection, so --keep holds the session directory and your working directory instead. For _HI_HOLD_TIMEOUT (15m; 0 turns it off), a reconnect starts a new shell on the same files, where the last one stood; its header says Resumed. What was running is gone.
Inside a session. hi --keep with no target keeps the session you are in: a fresh shell in a multiplexer there, sharing its directory. Typing a bare tmux, zellij, or screen asks whether to make it the kept session; with arguments (tmux attach) it runs as typed.
Your configs. A tmux on a target reads your ~/.tmux.conf (or the overlay’s tmux/tmux.conf); screen reads your ~/.screenrc, and zellij your config directory’s config.kdl, layouts/, and themes/. A line that names a file the target does not have (source-file, TPM’s plugins, zellij’s file: plugins) goes out disabled, and hi --doctor names it.
_HI_DISABLE_KEEP=1 turns all of this off: --keep and --end are refused, and the multiplexers in a session are the plain tools. For --plain, use a multiplexer of your own: tmux new -A -s <name> hi <target>. How it works: HI.65.
Debian chroots
A chroot’s /etc/debian_chroot leads the prompt, as the distro’s own ~/.bashrc sets it up: (name) in bash and zsh, (chroot:name) in fish. hi sets no $LESSOPEN, $GCC_COLORS, $CLICOLOR, or $LSCOLORS; the env plugin sends your values of the color ones (SETTINGS.md).
git
The git plugin is off until hi --enable-plugin git. It carries your global config ($GIT_CONFIG_GLOBAL, else ~/.gitconfig, else $XDG_CONFIG_HOME/git/config): your aliases, name, email, and settings such as pull.rebase. It is read after the target’s own config and a repository’s, so yours wins. It needs git 2.31 or newer on the target.
No key and no path to one rides. These stay home:
- every key of
[credential],[gpg],[includeIf], and[sendemail]; - a
[url]’sinsteadOfandpushInsteadOf; - in any section:
signingKey,gpgSign,forceSignAnnotated,sshCommand,sslKey,sslCert,cookieFile,extraHeader,askPass,proxy, andpassword.
A # hi-allow comment on the line above one sends it anyway, and hi --plugins lists each. An [include] of a file under ~/.config/git/ rides; one elsewhere is dropped and hi --doctor names it (HI.57).
readline
Every target gets your inputrc ($INPUTRC, else ~/.inputrc), or the overlay’s inputrc instead. bash and every readline program in the session use it; zsh and fish have their own line editors. A set INPUTRC replaces /etc/inputrc, so an inputrc that relies on it says $include /etc/inputrc, which rides as written. Any other $include is dropped.
Shell frameworks
A framework on a target loads normally, and hi’s setup runs after the shell’s own rc. tests/targets/framework_test.sh installs twelve the way their READMEs say (oh-my-zsh, powerlevel10k, starship, bash-it, oh-my-bash, tide, powerline-go, fzf, zoxide, direnv, atuin, mise) plus a tmux with the target’s own config. It connects for real and checks for shell errors and that each one’s hook, key binding, or prompt still works.
On your own machine
A prompt program your rc loads keeps drawing here. _HI_DISABLE_LOCAL=1 goes further: everything on this page stays as your rc set it up on this machine, while targets still get hi’s. How hi tells home from a target: SETTINGS.md’s Others.
Which side is asked
- Your machine decides what rides. A config from home ships only when its tool is installed here:
vim/vimrcwith vim,nvim/init.luawith nvim,tmux/tmux.confwith tmux,bat/configwith bat,git/configwith git once its plugin is on, and so on;inputrcalways. A dotfile left by a tool you removed does not ship. - An overlay copy always rides. A file you put in
~/.config/say-hi/means “targets get this”, whatever is installed here. - A plugin that is off never rides, overlay copy included (SETTINGS.md).
- The target decides what is used. Each alias is made only for a tool the target has and a config that rode (HI.62), so there is never an alias to a missing binary or file.
A tool with no variable and no flag
A carried config reaches its tool through a variable ($RIPGREP_CONFIG_PATH, $KAKOUNE_CONFIG_DIR) or a flag the alias adds (tmux -f, hx -c). Some files have neither: helix reads languages.toml only from its config directory. For those, a plugin row’s wire is xdg:<command>, and the alias points $XDG_CONFIG_HOME at the overlay (SETTINGS.md).
Use it only as a last resort: everything the command starts (a language server under helix, git under lazygit) then reads its config from the overlay instead of the target’s ~/.config.
Config sizes
Estimates, not measurements: each row pairs a plausible setup with the size of similar public files after hi’s comment strip and
gzip -9n.hi --doctorand the size hi prints on connect are the numbers for yours.
Everything in the overlay rides every connect. hi strips comments and blank lines first (HI.35), so comment-heavy files shrink most.
| user | what rides the overlay | on disk | stripped | on the wire (gzip) |
|---|---|---|---|---|
| defaults, nothing configured | nothing | 0 | 0 | 0 |
| a few settings and aliases | settings.sh, aliases.sh | ~2 KB | ~1 KB | ~0.5 KB |
| starship with a preset | starship.toml (the nerd-font-symbols preset) | ~3.4 KB | ~3.4 KB | ~1.4 KB |
| oh-my-posh with a stock theme | oh-my-posh.json (jandedobbeleer) | ~7 KB | ~7 KB | ~1.4 KB |
| oh-my-zsh, robbyrussell | oh-my-zsh.zsh-theme | ~0.4 KB | ~0.4 KB | ~0.2 KB |
| oh-my-zsh, agnoster | oh-my-zsh.zsh-theme | ~13 KB | ~8 KB | ~2.5 KB |
| oh-my-bash, font or agnoster | oh-my-bash.theme.sh | 2-20 KB | 1-9 KB | 0.5-2.6 KB |
| tide, configured by its wizard | tide.vars (its ~160 variables) | ~6 KB | ~6 KB | ~1.5 KB |
| powerlevel10k from its wizard | p10k.zsh (lean or rainbow) | 90-95 KB | 24-28 KB | ~5.5 KB |
| a tuned vim | vim/vimrc (like amix/vimrc’s basic.vim) | ~9.5 KB | ~4 KB | ~1.8 KB |
| a neovim starter config | nvim/init.lua (like kickstart.nvim, single file) | ~44 KB | ~19 KB | ~6 KB |
| a long-lived bash setup | bashrc, aliases.sh, a few extensions | 10-30 KB | 5-15 KB | 2-6 KB |
| all of it: powerlevel10k, tide, neovim, vim, bash, starship | everything above that ships at once | ~200 KB | ~75 KB | ~20 KB |
A neovim config split under ~/.config/nvim/lua/ rides as init.lua plus the modules it requires by name; a plugin manager’s specs stay home with the plugins.