Skip to content

[feature request] Preview URL per run command and port visibility #479

Done

Description

@dxvxd5

Currently, a project has a single preview_url tied to its main run script. However, run_scripts can start multiple servers, each with its own URL. This is particularly useful in monorepos where we might run several web apps simultaneously.

Proposal

Allow an optional preview_url on each run_scripts entry, supporting existing variables like $TERMIC_PORT.

run_scripts:
  - label: Storybook
    command: yarn storybook dev --https --port $TERMIC_PORT
    preview_url: https://localhost:$TERMIC_PORT
  - label: Second app
    command: yarn workspace second-app dev -p $TERMIC_PORT
    preview_url: http://localhost:$TERMIC_PORT/some-page
  • Make a preview available for each running command that defines a preview_url.
  • Display the port next to each running command in the Run tab, so users can identify which server is using which port without checking the terminal output.
  • Have task_run and termic run return the port and resolved preview URL for each running command, allowing agents to open the correct page without parsing terminal output.

Activity

  1. added a commit that references this issue on Nov 30, 2026
  2. simion commented on Nov 30, 2026

    @simion
    Owner

    Shipped in v2.5.4.

    Each run_scripts entry takes an optional preview_url, with $TERMIC_PORT and your named ports filled in.
    You can also set it in the Run configuration dialog.

    • The globe button opens the running command's page, or lists the pages when several are running.
    • The port shows on the command's tab and next to it in the Run menu. It is read from the preview URL, so a command without one shows none.
    • termic run and task_run return preview_url and port.

    Two servers in one task need two ports. Your example uses $TERMIC_PORT for both, so give the second one its own name in extra_named_ports and use that.

    Thanks for the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions