lumen-pi-extension
v0.3.0
Published
Pi extension that opens lumen on the diff after each agent turn and feeds annotations back as the next user message
Maintainers
Readme
lumen-pi-extension
A Pi coding agent extension that hooks lumen into the review loop:
agent finishes turn → lumen opens on the diff → annotate inline
→ press `s` → annotations injected as next user message → agent fixes themThe agent never invokes lumen. Pi runs it from the agent_end event,
suspends its own TUI while lumen owns the terminal, then injects the
annotations via pi.sendUserMessage() so they appear as if the user
typed them.
Install
Requires lumen ≥ 2.25 on $PATH (or set LUMEN_BIN).
From source (recommended while iterating):
git clone https://github.com/jnsahaj/lumen.git
mkdir -p ~/.pi/agent/extensions
ln -s "$(pwd)/lumen/integrations/pi/extension" ~/.pi/agent/extensions/lumenOnce-off try without installing:
pi -e $(pwd)/lumen/integrations/pi/extension/index.tsFrom npm (post-publish):
pi install npm:lumen-pi-extensionUsage
Run /lumen-diff whenever you want to review the working-tree diff.
Annotate, press s → Enter. The agent gets your feedback as its next
prompt.
/lumen-diff
/lumen-diff HEAD~1
/lumen-diff main..-
/lumen-diff --file src/auth.rsTo also pop lumen up automatically after every agent turn, set
LUMEN_AUTO_REVIEW=1.
Config
| Env var | Default | Meaning |
|----------------------|----------|------------------------------------------------------------------|
| LUMEN_BIN | lumen | Path to the lumen binary (use absolute if not on $PATH). |
| LUMEN_AUTO_REVIEW | 0 | Set to 1 to pop lumen up after every agent_end. |
