pi-emacs-which-key
Emacs-style prefix keys and which-key hints for Pi's interactive editor.
Package details
Install pi-emacs-which-key from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-emacs-which-key- Package
pi-emacs-which-key- Version
0.1.1- Published
- May 21, 2026
- Downloads
- not available
- Author
- yongweiy
- License
- MIT
- Types
- extension
- Size
- 15.7 KB
- Dependencies
- 0 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"./extensions"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-emacs-which-key
Emacs-style editing and prefix-key discoverability for Pi's interactive editor.
Features
C-guniversal cancel / keyboard-quit for this editor extension.C-x,C-c,C-h, andM-xprefix maps.- Native Pi TUI which-key panel using
Container,Text, andDynamicBorder. - Emacs movement/editing keys such as
C-n,C-p,C-a,C-e,M-f,M-b,C-k,C-y,M-y.
Key map
C-x b→/resumeC-x k→/newC-x t→/treeC-x f→/forkC-x s→/sessionC-x m→/modelC-x p→/scoped-modelsC-x o→ toggle tool outputC-x C-e→ external editorC-x C-c→ quit PiC-c h→/handoffC-c r→/reloadC-h b→/hotkeysC-h k→ describe next keyC-h m→ extension statusM-x→ open Pi slash-command completion
Install
pi install npm:pi-emacs-which-key
Then in Pi:
/reload
Development install
pi install /path/to/pi-emacs-which-key
Or run for one session without installing:
pi -e /path/to/pi-emacs-which-key/extensions/emacs-which-key.ts
Optional selector keybindings
The extension handles C-n / C-p in Pi's editor and slash-command completion. For Pi's other built-in selection dialogs such as /model and /resume, add this to ~/.pi/agent/keybindings.json if you want Emacs navigation there too:
{
"tui.select.up": ["up", "ctrl+p"],
"tui.select.down": ["down", "ctrl+n"]
}
Then run /reload.
Notes
This package uses Pi extension APIs and native Pi TUI components. It is intentionally editor-local: it does not overwrite your global keybindings.json.