CLI Commands
Complete reference for all PortPilot commands.
Tip: Use pp as a shorthand for portpilot — e.g., pp ls, pp start myapp -d
Setup & Status
bash
portpilot init # Download mkcert, install CA, generate SSL certsportpilot init --tld dev # Initialize with custom TLD (e.g., .dev instead of .test)portpilot status # Show config, SSL status, proxy statusportpilot sync # Sync hosts file with registered projectsConfiguration
bash
portpilot config # View current configurationportpilot config --tld dev # Change TLD to .dev (run sync afterward)portpilot config --allow-dots # Allow dots in project names (e.g., emojicopy.com)portpilot config --no-allow-dots # Disallow dots in project names (default)Project Management
bash
portpilot add [name] # Register current directoryportpilot add myapp -p /path/to/project # Register specific pathportpilot add myapp --port 4000 # Use a specific portportpilot add myapp -c "custom command" # Use custom dev commandportpilot remove <name|id> # Unregister project (alias: rm)portpilot list # Show all projects with ID and status (alias: ls)Server Control
All server commands accept either the project name or its ID (shown in portpilot list):
bash
portpilot start [name|id] # Run dev server (foreground, shows logs)portpilot start [name|id] -d # Run in background (detached)portpilot start --all -d # Start all projects in backgroundportpilot stop [name|id] # Stop serverportpilot stop --all # Stop all serversportpilot restart [name|id] # Restart serverportpilot restart [name|id] -d # Restart in backgroundExamples
bash
portpilot start 4 # Start project with ID 4portpilot stop triton # Stop project named "triton"Logs
bash
portpilot logs [name|id] # View logs (background processes)portpilot logs [name|id] -f # Follow logs live (like tail -f)portpilot logs [name|id] -n 100 # Show last 100 linesportpilot logs [name|id] --clear # Clear log fileProxy Control
bash
portpilot proxy # Run proxy in foregroundportpilot proxy -d # Run proxy in background (daemon)portpilot proxy stop # Stop background proxyportpilot proxy status # Check if proxy is runningportpilot proxy logs # View proxy logsportpilot proxy --https-redirect # Force HTTP to HTTPS redirectUtilities
bash
portpilot open [name|id] # Open in browser (uses HTTPS if available)portpilot open [name|id] -s # Force HTTPSQuick Commands
When inside a registered project directory, you can omit the project name:
bash
cd ~/projects/my-appportpilot start # Starts my-appportpilot stop # Stops my-appportpilot restart # Restarts my-appportpilot logs # Shows my-app logsportpilot open # Opens my-app in browser