Skip to content

Add background app management - #333

Open
bjesuiter wants to merge 2 commits into
vercel-labs:mainfrom
bjesuiter:portless-process-control
Open

Add background app management#333
bjesuiter wants to merge 2 commits into
vercel-labs:mainfrom
bjesuiter:portless-process-control

Conversation

@bjesuiter

@bjesuiter bjesuiter commented Jun 16, 2026

Copy link
Copy Markdown

Human Note

Hey there, Benjamin here!
Basic reason for this pr:
I code heavily with agents and was surprised that i cannot run a portless frontend process in background right now.
So I ported a background process management cli subcommand, called bg, into the protless cli, inspired by bgproc: https://github.com/ascorbic/bgproc.

This change wouuld allow me to go from this:

bgproc start -n web -- portless run -- pnpm dev

to this

# reading it's settings from package json and having stop, restart and logs commands available
portless bg start

I'm open to any changes to better fit this into portless philosophies if i missed one. I tried to be as close to the shape of the existing portless cli as possible.

Disclaimer: This PR is heavily Coding Agent assisted, but the structure and product decisions where made by me.

Summary

Clanker text from here on

Adds first-party background app process management under portless bg.

  • adds bg start, stop, restart, status, list, logs, and clean
  • backgrounds portless run so existing route, proxy, TLS, sharing, and app command behavior is reused
  • stores bg registry and capped stdout, stderr, and lifecycle logs in the active Portless state dir
  • adds docs, CLI help, clean integration, and bg help tests

Design notes: bjesuiter#1

Validation

  • pnpm --filter portless type-check
  • pnpm --filter portless lint
  • pnpm --filter portless build
  • pnpm --filter portless test
  • manual bg start, status, logs, stop smoke test

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown

@bjesuiter is attempting to deploy a commit to the Vercel Labs Team on Vercel.

A member of the Team first needs to authorize it.

Comment thread packages/portless/src/bg.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant