Yep — that’s totally possible.
What you’re describing is basically:
Replace your normal shell with a “natural language shell frontend” powered by pi.
Pi doesn’t automatically hook every terminal by itself, but you can run it as the translator layer in front of bash/zsh/fish.
So:
ls → pi returns lswhat's in this dir → pi returns ls (or ls -lah)Create ~/.local/bin/pi-shell:
Make it executable:
Then point Ghostty at it:
~/.local/bin/pi-shell in Ghostty config.ls, cd, git status, etc.rm -rf, sudo, etc.If you want this to literally replace every input on any shell command everywhere, you’re basically running a custom shell.
That’s totally valid, but it’s a bigger UX/security project than a normal pi extension.
If you want, I can give you a polished version next:
\!raw passthrough,Yep—this output is exactly from the extension’s current heuristics:
find all the bugs)So it’s not broken; it just needs richer input patterns.
Try something like this to get richer output:
/motor --capture "- [ ] Fix login bug\n- [ ] Add tests"/motor --schedule "Ship hotfix tomorrow by 3pm"/motor find all the bugs today" (for summary only, plus a few extra words for hints if you want)If you want, I can now tweak it to treat imperative verbs better so normal sentences like “find all the bugs” become an action item instead of “none detected.”
Yep — you found a real bug. I fixed it.
extract_command() was defined to expect a positional arg ($1), but I was piping into it like ... | extract_command, so under set -u it hit:
local raw="$1"$1 was missingThat’s why ls / list failed.
In ~/.local/bin/pi-shell:
extract_command now gets the response as an argument.quit / exit (no slash needed).Then try:
ls → now runs translated commandlist → now works/helpquit or /quit to exitIt should on a new window now, but ensure this line exists:
and then open a fresh Ghostty window.
If you want, I can also add a tiny startup smoke check line in the script to print PID + resolved pi path so we can instantly confirm it loaded correctly in Ghostty sessions.
Yes—I know it well.
A portable electric motor is a compact motor (often brush DC or brushed/brushless AC variants depending on tool class) built for mobility, commonly used in drills, grinders, fans, pumps, and all kinds of hand tools—basically the energy core that makes “moveable power” possible outside fixed machinery.
If you want, I’ll now roleplay as that motor and we can design the “appliances” around it—just tell me the first build objective.
Yeah, fair — that prompt gets annoying fast.
I just added a promptless mode.
Use:
/noconfirm on → stops asking for confirmation/noconfirm off → re-enable promptsSo you can run ls, list, show large files, etc. with no extra Y each time.
If you want it always off by default, add this in ~/.config/ghostty/config:
Or use launch command:
/noconfirm on now runs everything without confirmation (including risky commands), so keep it on only if you trust the environment.
If you want, I can make a safer default version: no prompt for harmless commands only (ls, git status, find, etc.), but still confirm on rm -rf, sudo, mkfs, pipes to shells, etc.
Done ✅ — I pushed everything to GitHub.
https://github.com/tarunsachdeva/psh (private)
// <command> as the raw passthrough trigger./raw semantics entirely from the shell/help/docs.// is the only raw command.// behavior.d3b69ee (main update)f179f31 (clarify //-only raw passthrough)If you want, I can now make the repo public and add a tiny README badge + install-from-npm-style section too.
Haha, I’m in.
What’s the weird thing you want to do? Tell me what you’re aiming for and I’ll help you execute it safely.
Absolutely — yes, that’s possible, but with an important nuance:
You likely want one of two models:
Have an external shell shim that:
That’s not built-in automatically, but you can build it with either:
pi --mode rpc (process integration), orcreateAgentSession) in a small Node/TSC script.So effectively: shell ↔ bridge app ↔ pi ↔ command execution.
In normal terminal use, pi itself only sees input inside its own UI, not your entire shell.
But you can approximate with a pi extension by handling:
input event (for text you type in pi)user_bash event (for !command / !!command patterns)So you can make pi ask/transform commands there, but it won’t sit in front of every arbitrary shell session unless you route that shell through your shim.
You’re describing a “universal command gateway”. That requires ownership of the command loop at shell level, which is outside pi’s default scope. Pi can power that loop if you build it as the loop.
If you want, I can build you a small proof-of-concept daemon/script next:
nlc "find all big files"du -ah . | sort -rh | headI can also add safeguards (dry-run, confirmation for risky commands, command allowlist/denylist).
Done — I deleted the extension.
It’s removed from:
~/.pi/agent/extensions/portable-motor.tsYour ~/.pi/agent/extensions/ folder is now empty.
If you want, here are some solid existing extension examples you can use instead:
question.ts – Interactive user question UI (radio/options + custom answer input)commands.ts – /commands command to list slash commandstodo.ts – Lightweight todo list toolingsend-user-message.ts – Commands like /ask, /steer, /followuptools.ts – Runtime tool toggling with a small TUIpermission-gate.ts / protected-paths.ts – safety rails around risky actionsauto-commit-on-exit.ts – Git workflow helpergit-checkpoint.ts – checkpoint workflow supportstatus-line.ts / custom-header.ts / custom-footer.ts – UI customizationmessage-renderer.ts – custom display for extension messageshello.ts – tiny starter for your own custom tool patternsnotify.ts – richer notification patternsYou can copy any of these from:
/Users/tarunsachdeva/.bun/install/global/node_modules/@mariozechner/pi-coding-agent/examples/extensions/
Want me to copy one you pick into ~/.pi/agent/extensions/ and wire it in right now?
Updated in.
I replaced your Ghostty launch command with promptless mode by default:
I also created a backup first, so you can restore if needed.
ls directly.If you want it one time instead of always, tell me and I’ll set Ghostty back to plain pi-shell and add an environment shortcut to toggle quickly (e.g., /noconfirm on/off).
Easy — use it like this:
env PI_ASSUME_YES=1 /Users/tarunsachdeva/.local/bin/pi-shellpi> prompt, type commands normally:
lswhat’s in this dir/raw git statusSo this is your “always-on” setup.
(or from anywhere if PATH includes it, use ~/.local/bin/pi-shell).
If it still feels unclear, just run:
and I can help interpret exactly what it shows.
Done — renamed and updated ✅
~/code/pi-shell-repl → ~/code/pshpsh:
package.json → "name": "psh"~/code/psh paths and psh naming.dd5a8d5 — Rename package to psh/Users/tarunsachdeva/code/psh
I can now set the actual git remote URL for you (e.g., git remote add origin git@github.com:<you>/psh.git) and push it as main.
Done — I completed the repo cleanup/finalization for you.
In ~/code/pi-shell-repl I added:
.gitignoreLICENSE (MIT)VERSION (0.1.0)package.json (with test script + binary mapping)README.md with package/release task notes8ba1d25 — chore: add package metadata and distribution scaffolding
(Also previous commits remain, including install/uninstall + Makefile changes.)
pi-shell-repl)and I’ll add:
Got it — software-only.
I’d map it like this:
Portable Electric Motor : Power Tools / Laundry Machine :: Pi Coding Agent : Personal Automation Engine for Everyday Apps
Think of it as a “Task Micro-Factory”:
So the “motor” is not a visible feature — it’s the internal power source behind everyday software workflows, just like a portable motor powers many different physical tools.
Oh, fun prompt. 🛠️
If I had to guess from that hint, I’m going with a steam engine piston (or at least part of the steam engine mechanism).
Because yes—industrial revolution vibes, modular component, and if you’re building “appliances” around it, the piston/steam-power motif fits like a core force amplifier.
Now I’m curious too—what component did you have in mind?
Love this.
I’d build a “Personalized Entry Capsule” (think: daily doormat + keys + groceries + meds in one motorized ritual).
A slim counter/cabinet unit by the front door that quietly does this:
If you want, I can sketch 2–3 variants that are even weirder (kitchen, workout, desk-based).
Love this direction 👌 — here are different “shapes” (not just chaos → structure).
Think of the motor as the mechanical characteristic it brings, then map that to a software product:
Torque Amplifier
Portable motor → impact driver
Pi → “Push-Through Assistant”
It turns a weak user intent into a strong completed action (e.g., “remind me” becomes draft email + calendar + follow-up + archive).
Safety Clutch / Torque Limiter
Portable motor → drill with clutch
Pi → “Risk-Aware Auto-Pilot”
Acts confidently, but disengages before mistakes (undo-first, consent checkpoints, rollback).
Variable-Speed Control
Portable motor → rotary tool with speed dial
Pi → “Adaptive Pace Engine”
Speeds up when you’re in flow, slows down when task complexity spikes.
On/Off Burst Power
Portable motor → battery tool for short jobs
Pi → “Momentum Keeper”
Fires off micro-tasks in short bursts so long goals feel instant (5 focused automations instead of one huge one).
Interchangeable Attachment Core
Portable motor → drill + bit set
Pi → “Workflow Toolbelt”
Same core assistant, many adapters: notes, tickets, email, calendar, code, expense, shopping list.
Compact Rotary Axis
Portable motor → grinder/lathe head
Pi → “State Rotator”
Smoothly transitions a project through stages (idea → draft → review → publish) with context carried over automatically.
Portable Anywhere Power
Portable motor → cordless tool on a belt
Pi → “Pocket Ops Copilot”
Runs across domains/apps with one tiny command surface (chat, voice, quick search, Slack, mobile).
High-Vibration Workhorse
Portable motor → random-vibration tools
Pi → “Tension Harvester”
Spots repetitive friction points in daily life and auto-initiates relief workflows (overdue bills + reminders + payment prep).
Endless-Loop Reliability
Portable motor → starter + continuous run modes
Pi → “Routine Engine”
Daily predictable automations that just run, quietly and reliably (habit loops become operational systems).
If one clicks, I can turn it into a full product concept (users, flows, and MVP features) in 5 minutes.
Great question.
A raw mode means “don’t ask Pi to translate my sentence — run exactly what I typed as a shell command.”
Use:
inside psh.
pshr)You asked about “raw psh,” so we can make a separate alias that starts a version of pi-shell where:
I can set this now in ~/.zshrc as:
And then with a small update to the script:
psh = default mode = translate NL → command.pshr = default mode = raw mode with minimal translation fallback (useful when you want plain shell behavior).If you want, I can implement that now and include:
/nl to switch back to translator inside session/raw to switch temporary per input (if not already).Great callout — I fixed it and pushed it.
Enable true continuous session by default
~/.local/bin/pi-shell and repo (~/code/psh/bin/pi-shell):
PI_CONTINUOUS_SESSION (default 1)PI_SESSION_FILE (default ~/.psh-session.jsonl)pi --session "$PI_SESSION_FILE" -p ...Prevent accidental shell exits
exit, quit, /quit, logout, or return, it is rejected and not executed.Strengthened translator instructions
Docs updated
README.md now documents:
PI_CONTINUOUS_SESSION and PI_SESSION_FILEPI_CONTINUOUS_SESSION=0 psh) for one-shot mode✅ Committed and pushed:
b5044cf — Keep a continuous PI session and block translator exitshttps://github.com/tarunsachdeva/pshIf you installed earlier, pull update once:
or reinstall via script:
If you want, I can also add a tiny /reset command in pi-shell to wipe the session file and start a fresh translator context on demand.
Nice — done. I packaged it with docs + Make targets.
~/code/pi-shell-repl
Makefile with:
make install → runs ./scripts/install.shmake uninstall → runs ./scripts/uninstall.shmake test → shell syntax check of all scriptsmake cleanREADME.md with:
c429ef1 (from bb41486), so repo is ready.
If you want this tracked on GitHub, run:
If you want, I can now add a .gitignore, versioned release tag, and a tiny LICENSE + package.json so it’s easier to share/install cleanly.
Implemented — I built a small CLI demo for a “Workflow Toolbelt” extension architecture under cli/.
traces toolbeltcli/src/commands/toolbelt.tscli/src/commands/toolbelt-options.tscli/src/toolbelt/types.tscli/src/toolbelt/engine.tscli/src/toolbelt/registry.tscli/src/toolbelt/extensions/notes.tscli/src/toolbelt/extensions/summary.tscli/src/toolbelt/extensions/schedule.tscli/src/toolbelt/extensions/communication.tsnotes (extracts action items)summary (quick summary + keyword hints)schedule (temporal/time hints)message (message draft generator)--ext <id>--json--listcli/src/index.tstoolbelt commandtoolbelt optionsbun run cli/src/index.ts toolbelt "Ship today. - [ ] Fix login bug. Call Sam tomorrow at 9am."bun run cli/src/index.ts toolbelt --ext notes --ext message "Draft update notes..."bun run cli/src/index.ts toolbelt --listcat notes.txt | bun run cli/src/index.ts toolbelt --ext summary --ext schedule --jsonIf you want, next I can add a dynamic discovery mode so new extension files in a folder are auto-loaded without touching imports.