Skip to content

(feat) added --port-forward and --background flags#4

Open
zeylos wants to merge 1 commit intosylvinus:mainfrom
zeylos:feat/portforward
Open

(feat) added --port-forward and --background flags#4
zeylos wants to merge 1 commit intosylvinus:mainfrom
zeylos:feat/portforward

Conversation

@zeylos
Copy link

@zeylos zeylos commented Mar 10, 2026

Hi,

What

This PR adds

  • the --port-forward flag (mimicking the limactl --port-forward flag) to forward additional ports to the host
  • the --background flag, which allows to run opencode/claude/codex or arbitrary commands with nohup and disown.

Why

This allows the user to do stuff like that to access the session from a Web browser, a Desktop app or an IDE on the host

agent-vm --port-forward '3000:3000' --background opencode serve --port 3000
Screenshots image image image

?

  • We may need to think if we want --background and --rm to be exclusive or not, for now it's explicitely exclusive because I don't see any usecase where we'd want both + it's probably tricky to get the exit event from the disowned process to trigger the destroy.
  • Probably need some testing, I used it with success for 2 hours :-)

@zeylos zeylos marked this pull request as ready for review March 10, 2026 01:00
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