Available commands

Developing

Command Description
php Runs PHP commands (phpctl php -v or phpctl php -m).
composer Runs Composer commands (phpctl composer install or pctl composer validate).
server [port] [directory] Runs PHP’s built-in web-server (default port is 80 and default directory is current .).
sh [commands] Starts an interactive Shell session or runs sh commands.
repl Starts a PHP REPL session (powered by PsySH).
bundle Bundles a project into an image and ships it as a single binary file.

Tools

Command Description
box Box: fast, zero config application bundler with PHARs.
co-phpunit co-phpunit is a Coroutine-aware PHPUnit for testing Hyperf projects.
composer-require-checker ComposerRequireChecker: A CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package.
couscous Couscous: Couscous generates a GitHub pages website from your markdown documentation.
deptrac Deptrac: Deptrac is a static code analysis tool for PHP that helps you communicate, visualize and enforce architectural decisions in your projects.
exakat Exakat is a real time customizable static analyzer engine that analyse and fix code.
frankenphp FrankenPHP: the Modern PHP App Server, written in Go.
infection Infection is a Mutation Testing Framework.
pest Pest is a testing framework with a focus on simplicity.
php-cs-fixer PHP Coding Standards Fixer (PHP CS Fixer) fixes your code to follow standards.
phpcbf PHP CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
phpcs PHP CodeSniffer is an essential development tool that ensures your code remains clean and consistent.
phpmd PHP Mess Detector looks for several potential problems within your source code.
phpstan PHPStan finds bugs in your code without writing tests. It’s open-source and free.
phpunit PHPUnit is a programmer-oriented testing framework for PHP.
pint Pint is an opinionated PHP code style fixer for minimalists.
rector Rector is a tool that you can run on any project to get an instant upgrade or automated refactoring.
watchr watchr: command-line utility to explore and validate domain names and certificates.

Scaffolders

Command Description
create [framework] [dir] Creates a new project using the given framework (or package).
init [skeleton] Initializes a skeleton configuration.

Skeletons

  • phpunit
  • php-cs-fixer
  • phpstan
  • infection
  • box

Helpers

Command Description
help or man Displays a help message.
self-update Updates phpctl iself.
doctor Inspects the current PHP_VERSION and PHPCTL_IMAGE.
build Builds the current Dockerfile (useful for custom images).
images Shows local phpctl images.