Skip to content

Completions and Pi integration

Terminal window
mkdir -p ~/.zfunc
shirei completions zsh > ~/.zfunc/_shirei
fpath=(~/.zfunc $fpath)

Ensure compinit runs after adding the directory to fpath.

Terminal window
mkdir -p ~/.config/fish/completions
shirei completions fish > ~/.config/fish/completions/shirei.fish

Source generated completions from your shell configuration:

Terminal window
source <(shirei completions bash)

Elvish and PowerShell are also accepted by shirei completions.

The Shirei source repository includes:

  • integrations/pi/shirei.ts: a /shirei command extension.
  • integrations/pi/skills/shirei/SKILL.md: operational guidance for agents.

Install both:

Terminal window
mkdir -p ~/.pi/agent/extensions ~/.agents/skills/shirei
cp integrations/pi/shirei.ts ~/.pi/agent/extensions/shirei.ts
cp integrations/pi/skills/shirei/SKILL.md ~/.agents/skills/shirei/SKILL.md

Run /reload in Pi, then use:

/shirei branch feature/name
/shirei branch feature/name --base main
/shirei recent
/shirei sessions
/shirei worktrees
/shirei worktrees unfinished
/shirei worktrees scan

Command reports use pi.appendEntry() and do not enter LLM context. The extension blocks /shirei worktrees prune because pruning requires an interactive terminal. Branch commands also require Pi to run inside tmux or Herdr.

bind-key -r f run-shell "tmux neww shirei"
[[keys.command]]
key = "prefix+f"
type = "pane"
command = "shirei"

Shell completion scripts cover commands, subcommands, and options. They do not dynamically complete Git branches; use shirei branch without a name for the interactive branch picker.