Create a new session on a remote resource
The pw session create command creates a new session on a remote resource.
Supported session types:
After the session is running, the command prints instructions for connecting. Use --open to open the session in the browser automatically, or --connect to start port forwarding automatically (desktop and tunnel only).
Resource names can be specified in the following formats:
pw session create --type TYPE <resource> [flags]
# Create a desktop session on your user workspace
pw session create --type desktop workspace
# Create a desktop session on a resource
pw session create --type desktop my-cluster
# Create a VS Code session
pw session create --type vscode my-cluster
# Create a tunnel session forwarding a remote port
pw session create --type tunnel --remote-port 8080 my-cluster
# Create and immediately open in the browser
pw session create --type desktop --open my-cluster
# Create and immediately connect (port forward)
pw session create --type tunnel --connect --port 8080 --remote-port 3000 my-cluster
--connect Connect (port forward) after creation (desktop and tunnel only)
-h, --help help for create
--open Open the session in the browser after creation
--port int Local port for --connect (0 = auto-select)
--remote-host string Remote host for tunnel type (default "localhost")
--remote-port int Remote port (required for tunnel type)
--type string Session type: desktop, vscode, tunnel (required)
--context string The context to use. Overrides PW_CONTEXT environment variable and current context from config.
--platform-host string The Parallel Works ACTIVATE platform host to use. Will override any other platform host settings.
-v, --verbose Enable verbose logging