#326·portless

Add --no-worktree support when running apps with explicit names

Author: husseinraooufCreated Jun 10, 2026Updated Sep 2, 2026

Summary

It would be helpful if portless run and named app launches supported a --no-worktree option, similar to portless get --no-worktree.

Today, --name overrides the inferred base app name, but Portless still applies the Git worktree prefix. That is useful for the default workflow, but it makes it hard for external tooling to pass a fully computed app name.

Use case

Some dev environments compute their own stable namespace outside Portless, then pass a complete service name to Portless.

For example:

bash
portless run --name "api.feature-a.example" pnpm dev

In a linked worktree, Portless can still prepend its own worktree prefix, producing a double-scoped hostname such as:

feature-a.api.feature-a.example.localhost

The desired behavior is to allow callers to opt out of Portless worktree prefixing when they already supplied the complete name.

Proposed behavior

Support --no-worktree for app-running commands, for example:

bash
portless run --no-worktree --name "api.feature-a.example" pnpm dev
portless --no-worktree --name "api.feature-a.example" pnpm dev

Expected result:

https://api.feature-a.example.localhost

This would align app launch behavior with portless get --no-worktree.

Why this helps

  • Keeps Portless's automatic worktree behavior as the default.
  • Lets advanced callers provide a fully qualified, externally computed name.
  • Avoids double namespace prefixes in monorepo/worktree setups.
  • Makes portless get --no-worktree and portless run --no-worktree consistent.

Alternatives considered

A wrapper can avoid portless run and use portless alias with fixed ports, but that loses the process-wrapping behavior that makes Portless convenient for app dev servers.