rwx sandbox tunnel
Forward a port for an already-running sandbox background process to your local machine.
Usage
rwx sandbox tunnel [config-file] --key <key> --port <port> [flags]
Description
Open a local tunnel without syncing files or restarting the process. An active sandbox and a running background process with the specified key are required. The process can be started with rwx sandbox background or declared in the sandbox task's background-processes.
The CLI waits for the sandbox port to accept connections, then prints a local preview URL and returns. The tunnel continues running locally.
Running the command again for the same sandbox and key reuses the local port if available, or allocates a new one. Use --local-port to choose a specific local port. Each key has one local tunnel; specifying a different sandbox port replaces the existing tunnel.
rwx sandbox background stop stops the process and closes its tunnel. Stopping or resetting the sandbox closes its tunnels too.
Arguments
[config-file]
The path to the sandbox configuration file used to select an existing sandbox. Defaults to .rwx/sandbox.yml. --id takes precedence.
Options
--key <key>
(required) The key of the running background process to expose.
--port <port>
(required) The sandbox port to forward to your local machine.
--local-port <port>
The local port for the forwarded connection. By default, the CLI allocates a port or reuses the existing one for this sandbox and key.
--scheme <scheme>
The URL scheme to print for the forwarded port: http or https. Defaults to http. This option does not add TLS to the application.
--id <run-id>
Use a specific sandbox session.
Global options
--format <format>
Output format: text or json. Defaults to text.
--json
Output JSON data to stdout. Equivalent to --format json.
--access-token <token>
The access token for RWX. Defaults to the value of the $RWX_ACCESS_TOKEN environment variable.