Skip to content

Automatically forward ports using the CLI #14133

@code-asher

Description

@code-asher

Currently, if you want automatic port forwarding you have to use VS Code or JetBrains with our backend plugin installed.

However, not everyone uses these editors. It would be convenient if there was a way to automatically forward ports using the CLI, maybe as an extra flag to the port-forward command?

coder port-forward <workspace> --automatic

However, doing it automatically as part of ssh would be nice, because then you could just ssh <workspace> and everything is forwarded. coder config-ssh --with-port-forwarding could add something like this to the config :

Host coder.<workspace>
  coder ssh <workspace> --automatic --stdio

Or there could be a prompt when you ssh, or it could depend on a unique prefix in the host name (ssh fwd.<workspace>); I am not sure exactly the best way to surface this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cliArea: CLIcustomer-requestedFeatures requested by enterprise customers. Only humans may set this.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions