CLI Command Reference

The Portex CLI is designed to be intuitive and minimal. Here is a breakdown of the available commands and their options.

portex start

Creates a secure tunnel to a local port. This is the most used command for web development.

Basic Usage
portex start --port 3000
Options
  • --port, -p (Required): The local port you want to expose.
  • --subdomain, -s: Specify a custom subdomain.
  • --pin: Secure your tunnel with a 4-digit PIN.
  • --allow-ip, -a: Restrict access to specific IP addresses (comma-separated).
  • Complex Example
    portex start -p 8080 --subdomain staging-api --pin 9988 --allow-ip 1.2.3.4

    portex share

    Turns any local directory into a live HTTPS website. Portex starts a temporary web server for the directory and tunnels it automatically.

    Usage
    portex share ./public_html --allow-ip 85.99.12.34

    Useful for sharing static builds (React, Vue, Vite) without needing to configure a local server. Supports all security flags like --pin and --allow-ip.

    portex login

    Connects your active agent to your Portex account. This unlocks premium features and persistent dashboard logging.

    portex login

    This will open your default browser to complete the authentication securely.

    Shortcuts Most flags have shorthand versions. Use -p for port and -s for subdomain to save time.