Pilot is Sitepilot's command-line toolkit for day-to-day DNS, Cloudflare and Openprovider operations. It is distributed as a single self-contained PHAR binary and built on Laravel Zero.
Download the latest pilot binary from the releases page,
make it executable and put it on your PATH:
curl -L -o pilot https://github.com/sitepilot/pilot/releases/latest/download/pilot
chmod +x pilot
sudo mv pilot /usr/local/bin/pilotVerify the install:
pilot --versionThe DNS commands shell out to
dig, so make surebind/dnsutilsis installed (apt install dnsutils,brew install bind, …).
Once installed, update to the latest release in place:
pilot self-updateAll configuration lives in a pilot.yml file. Commands read it from the directory
you run pilot in, or from the directory passed with --config. Copy the bundled
template to get started:
cp pilot.example.yml pilot.ymlpilot.yml holds credentials, so it is gitignored — keep it out of version control.
Each command validates only the section it needs, so you only have to fill in the
services you actually use.
cloudflare:
token: cf-xxxxxxxx # required for cf:* commands
default_zone: sitepilot.cloud # optional; used by cf:hostname when --zone is omitted
openprovider:
username: your-username # required for op:* commands
password: your-password
default_ns_group: sitepilot-net # optional; used by op:reset-ns when --group is omitted
sites: # used by the site:* commands
example:
url: https://example.com
host: web123.sitepilot.net
user: app1234
path: ~/httpdocs
source:
host: 1.2.3.4
user: root
path: /opt/sitepilot/users/example/sites/example/public| Key | Description | Default |
|---|---|---|
cloudflare.token |
Cloudflare API token | — |
cloudflare.default_zone |
Zone used when --zone is omitted |
sitepilot.cloud |
openprovider.username |
Openprovider account username | — |
openprovider.password |
Openprovider account password | — |
openprovider.default_ns_group |
Nameserver group used when --group is omitted |
sitepilot-net |
sites |
Sites managed by site:migrate / site:ssh (see template) |
— |
Run pilot list to see everything. The available commands are:
# Show a domain's NS, MX, apex and www records (traces the authoritative delegation by default)
pilot dns:view example.com
# Query a specific recursive resolver instead of tracing
pilot dns:view example.com --resolver=1.1.1.1
# Keep watching and report when records change
pilot dns:view example.com --watch --interval=5# Export a zone's DNS records as a BIND-format zone file
pilot cf:export example.com --output=example.com.zone
# List custom hostnames and their origin server for a zone
pilot cf:hostname --zone=example.com
# Filter to a single custom hostname
pilot cf:hostname shop.example.com# Reset a domain's nameservers to an Openprovider nameserver group
pilot op:reset-ns example.com --group=sitepilot-net
# Skip the confirmation prompt
pilot op:reset-ns example.com --forceRequires PHP 8.2+ and Composer.
composer install
./vendor/bin/pest # run the test suitePushes and pull requests against the 1.x branch are tested automatically via GitHub Actions.
php -d phar.readonly=0 pilot app:build pilot --build-version=dev
./builds/pilot --versionPublishing a GitHub release (tagged vX.Y.Z) triggers the
release workflow, which builds the PHAR and attaches it to the
release as the pilot asset. For pilot self-update to resolve new versions, the repository must
be registered on Packagist (with the GitHub auto-update webhook enabled),
and releases must be tagged with semantic versions so they are seen as stable.
Pilot is open-source software licensed under the MIT license.