Console Commands
Patrol includes console commands you can run from your Craft project’s directory.
Access Tokens
Prints a new random 32-character token for maintenance mode access. Add it to maintenanceModeAccessTokens and send the link to the person who needs access. The command only prints the token, so nothing changes until you add it to your configuration. This is also the default action, so php craft patrol/access-token runs it. Access Tokens explains how the link works.
php craft patrol/access-token/generateAuthorized IPs
These commands manage the IP addresses that visitors authorized with an access token. They don't affect the addresses in maintenanceModeAuthorizedIps. Because the addresses are stored in the database, the commands work on environments where allowAdminChanges is false.
Lists each IP address authorized through an access token, oldest first. This is also the default action, so php craft patrol/authorized-ips runs it.
php craft patrol/authorized-ips/listRemoves a single IP address, so that visitor sees the maintenance page again until they use a valid access token.
php craft patrol/authorized-ips/remove 203.0.113.10Removes every IP address authorized through an access token. Run it after replacing a token that was shared too widely, or once maintenance is over. Patrol asks for confirmation first, unless you pass --interactive=0.
php craft patrol/authorized-ips/clear