Zsh plugin

Your prompt,
always oriented.

Adds your current lane, save count, storage size, and version tag to your zsh prompt. Tab-completes every Koh command and flag. No framework required.

Install in one line

01
Install the plugin
$ curl -fsSL https://koh.asha.software/shell | sh

Downloads koh.plugin.zsh to ~/.zsh/plugins/koh/ and appends the source line to ~/.zshrc.

02
Reload your shell
$ source ~/.zshrc

That's it. Open any project with a Koh repo and your prompt updates automatically.

Manual install (Antidote or bare zsh)
mkdir -p ~/.zsh/plugins/koh && cp koh.plugin.zsh ~/.zsh/plugins/koh/
echo 'source ~/.zsh/plugins/koh/koh.plugin.zsh' >> ~/.zshrc

Requires sqlite3 in PATH (present by default on macOS; apt install sqlite3 on Linux).

What the prompt shows

SegmentWhen shown
peach Directory name (shortened to last 2 segments on deep paths)
on dev Current lane — amber for dev, green for main
[!] Working tree modified since last save. [+] if unsaved new files, [!+] for both
v0.9.2 Version tag on HEAD — only shown when working tree is clean
· 6 saves Save count for the current lane
· 4.2 MB Total repository storage — green below 50 GB, red above

Configuration

Set any of these in your ~/.zshrc before sourcing the plugin.

VariableDefaultWhat it controls
KOH_COLOR_DEVyellowDev lane color
KOH_COLOR_MAINgreenMain lane color
KOH_COLOR_DIRTYredDirty indicator color
KOH_COLOR_DIRcyanDirectory name color
KOH_SHOW_SAVEStrueShow save count segment
KOH_SHOW_SIZEtrueShow storage size segment
KOH_SHOW_TAGtrueShow version tag on clean HEAD
KOH_PROMPT_CHARPrompt character

Tab completion

The plugin registers a compdef for koh. All commands complete out of the box. For commands that take save IDs (load, peek, pluck, diff), completions are pulled live from the local .koh/koh.db — you get the last 20 saves with their messages.

Tags complete for untag, flag, and changelog. The unbundle command completes *.koh.bundle files and apply completes *.koh.face files.