Skip to content

amknight/pi-cmux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-cmux

A pi extension package for integrating pi with cmux.

Features

  • Shows cmux status while pi is working:
    • Working when a turn/tool starts
    • Ready when an agent turn completes
  • Sends a cmux notification when pi finishes a task.
  • Clears cmux status/progress/log state on session start and shutdown.
  • Adds commands for forking the current pi session into a new cmux tab:
    • /fork-cmux
    • /cmux-fork

Install

From GitHub:

pi install git:github.com/amknight/pi-cmux

For local development:

pi install /path/to/pi-cmux

Then reload pi:

/reload

Commands

/fork-cmux

Open an interactive picker of the current pi session tree and choose a human message or text agent reply to fork from. Tool messages and tool-only assistant turns are intentionally hidden in the picker.

The extension creates a new session JSONL file, opens a new cmux terminal tab, and runs:

cd <current-cwd> && pi --session <new-session-file>

/fork-cmux current

Fork from the current leaf without opening the picker.

/fork-cmux last

Alias for current, falling back to the last visible human/agent message if needed.

/fork-cmux <entry-id-prefix>

Fork from a specific human/agent message by exact id or unique id prefix.

/cmux-fork

Alias for /fork-cmux.

Notes

  • The fork picker shows only human messages and assistant replies with real text. It does not display tool-result messages or assistant turns that only contain tool calls.
  • Selecting a user message matches /tree semantics: the new session starts before that message and restores the selected prompt into the editor in the new cmux tab.
  • Selecting an assistant message creates the new session through that assistant reply, ready to continue from there.
  • The extension is safe to load outside cmux: status hooks silently no-op if cmux is unavailable. Fork commands require cmux to be installed and reachable.

Development

npm install
npm run check
pi --no-extensions -e ./extensions/cmux.ts --list-models

License

MIT

About

Pi extension for cmux status updates, completion notifications, and forking sessions into new cmux tabs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors