Configuration Flags
Customize PortPilot commands with these options.
portpilot init
Initialize PortPilot:
| Flag | Alias | Description |
|---|---|---|
--tld | - | Set the TLD (e.g., test, dev, local). Default: test |
bash
# Examplesportpilot init # Initialize with default .test TLDportpilot init --tld dev # Initialize with .dev TLDportpilot init --tld local # Initialize with .local TLDportpilot add
Register a new project:
| Flag | Alias | Description |
|---|---|---|
--path | -p | Path to the project directory (default: current directory) |
--port | - | Specific port to use (default: auto-assigned from 3001) |
--command | -c | Custom dev command (use {port} placeholder) |
bash
# Examplesportpilot add my-appportpilot add my-app -p ~/projects/my-appportpilot add my-app --port 4000portpilot add my-app -c "npm run serve -- --port {port}"portpilot config
Update configuration settings:
| Flag | Description |
|---|---|
--tld <value> | Set the TLD (requires portpilot sync afterward) |
--allow-dots | Allow dots in project names |
--no-allow-dots | Disallow dots in project names (default) |
bash
# Examplesportpilot config # View current configurationportpilot config --tld dev # Change TLD to .devportpilot config --allow-dots # Allow dots in project namesportpilot start
Start a dev server:
| Flag | Alias | Description |
|---|---|---|
--detach | -d | Run in background (daemon mode) |
--all | - | Start all registered projects |
bash
# Examplesportpilot start my-app # Foreground (shows logs)portpilot start my-app -d # Backgroundportpilot start --all -d # Start all projectsportpilot stop
| Flag | Description |
|---|---|
--all | Stop all running projects |
portpilot logs
View logs for a project:
| Flag | Alias | Description |
|---|---|---|
--follow | -f | Follow logs in real-time (like tail -f) |
--lines | -n | Number of lines to show (default: 50) |
--clear | - | Clear the log file |
bash
# Examplesportpilot logs my-appportpilot logs my-app -f # Follow liveportpilot logs my-app -n 100 # Last 100 linesportpilot logs my-app --clear # Clear logsportpilot proxy
Control the reverse proxy:
| Flag | Alias | Description |
|---|---|---|
--detach | -d | Run in background (daemon mode) |
--https-redirect | - | Redirect HTTP to HTTPS |
portpilot open
Open project in browser:
| Flag | Alias | Description |
|---|---|---|
--secure | -s | Force HTTPS URL |
Global Options
Available on all commands:
| Flag | Alias | Description |
|---|---|---|
--help | - | Show help for a command |
--version | -v | Show PortPilot version |
bash
portpilot --helpportpilot add --helpportpilot --version