Configuration Flags

Customize PortPilot commands with these options.

portpilot init

Initialize PortPilot:

FlagAliasDescription
--tld-Set the TLD (e.g., test, dev, local). Default: test
bash
# Examples
portpilot init # Initialize with default .test TLD
portpilot init --tld dev # Initialize with .dev TLD
portpilot init --tld local # Initialize with .local TLD

portpilot add

Register a new project:

FlagAliasDescription
--path-pPath to the project directory (default: current directory)
--port-Specific port to use (default: auto-assigned from 3001)
--command-cCustom dev command (use {port} placeholder)
bash
# Examples
portpilot add my-app
portpilot add my-app -p ~/projects/my-app
portpilot add my-app --port 4000
portpilot add my-app -c "npm run serve -- --port {port}"

portpilot config

Update configuration settings:

FlagDescription
--tld <value>Set the TLD (requires portpilot sync afterward)
--allow-dotsAllow dots in project names
--no-allow-dotsDisallow dots in project names (default)
bash
# Examples
portpilot config # View current configuration
portpilot config --tld dev # Change TLD to .dev
portpilot config --allow-dots # Allow dots in project names

portpilot start

Start a dev server:

FlagAliasDescription
--detach-dRun in background (daemon mode)
--all-Start all registered projects
bash
# Examples
portpilot start my-app # Foreground (shows logs)
portpilot start my-app -d # Background
portpilot start --all -d # Start all projects

portpilot stop

FlagDescription
--allStop all running projects

portpilot logs

View logs for a project:

FlagAliasDescription
--follow-fFollow logs in real-time (like tail -f)
--lines-nNumber of lines to show (default: 50)
--clear-Clear the log file
bash
# Examples
portpilot logs my-app
portpilot logs my-app -f # Follow live
portpilot logs my-app -n 100 # Last 100 lines
portpilot logs my-app --clear # Clear logs

portpilot proxy

Control the reverse proxy:

FlagAliasDescription
--detach-dRun in background (daemon mode)
--https-redirect-Redirect HTTP to HTTPS

portpilot open

Open project in browser:

FlagAliasDescription
--secure-sForce HTTPS URL

Global Options

Available on all commands:

FlagAliasDescription
--help-Show help for a command
--version-vShow PortPilot version
bash
portpilot --help
portpilot add --help
portpilot --version