CLI Overview

Overview of the Exposr command-line interface.

The Exposr CLI is installed as the exposr command. It provides commands for exposing local services, configuring the client, and managing the relay server.

Commands

CommandDescription
exposr expose <port>Expose a local TCP service through the relay
exposr expose <port> to <public-port>Expose with a specific public port
exposr config set-server <ip>Configure the relay server address
exposr server init-token <token>Initialize the server with an agent token
exposr server startStart the relay server

Global options

OptionDefaultDescription
--server-hostSaved configOverride the server address for one run
--control-port9000Control channel port
--data-port9001Data channel port
--local-host127.0.0.1Local host address

Examples

bash
# Expose a local service on the default public port
exposr expose 3000

# Expose with a specific public port
exposr expose 3000 to 21342

# Use a different server for one run
exposr expose 3000 --server-host 10.0.0.5

# Expose a service on port 8080
exposr expose 8080