Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

122 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pi-bg

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.

Install

pi install git:github.com/Bukutsu/pi-bg

Use 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.

Parameters

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.

Development

bun install
bun run check
bun test

This extension is intentionally shell-only. Child Pi sessions belong in the separate pi-subagents extension.

License

MIT

About

Minimal background execution and subagent delegation extension for Pi coding agent

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages