Non-blocking background shell jobs for Pi.
pi-bg provides a bg tool for long-running builds, tests, installs, local
dev servers, and other shell commands while the parent Pi session continues.
It does not create child Pi sessions; use pi-subagents for that.
pi install git:github.com/Bukutsu/pi-bg{ "command": "npm test", "timeoutSec": 300 }
{ "command": "npm run dev", "completion": "queue" }
{ "action": "status" }
{ "action": "stop", "pid": 1 }Results arrive automatically when a job finishes. Do not use sleep, polling
loops, or repeated status calls to wait.
| Name | Purpose |
|---|---|
action |
spawn, status, or stop |
command |
Shell command for spawn |
completion |
continue wakes the parent; queue does not start a new turn while idle |
pid |
Virtual job ID for stop |
timeoutSec |
Maximum run time in seconds; defaults to 600 |
Run /bg to list or stop active jobs. Use /bg kill <pid> or /bg kill all
for direct control.
The command runs with the current Pi working directory and session environment.
Output shown to Pi is bounded at 50 KB or 2,000 lines. Failed, stopped,
timed-out, non-zero, and truncated jobs retain a sanitized private temporary log
capped at 10 MB. The completion message includes its path; use Pi's built-in
read tool when the displayed result is not enough.
bun install
bun run check
bun testThis extension is intentionally shell-only. Child Pi sessions belong in the
separate pi-subagents extension.
MIT