core php¶
Laravel/PHP development tools with FrankenPHP.
Commands¶
Development¶
| Command | Description |
|---|---|
dev |
Start development environment |
logs |
View service logs |
stop |
Stop all services |
status |
Show service status |
ssl |
Setup SSL certificates with mkcert |
Build & Production¶
| Command | Description |
|---|---|
build |
Build Docker or LinuxKit image |
serve |
Run production container |
shell |
Open shell in running container |
Code Quality¶
| Command | Description |
|---|---|
test |
Run PHP tests (PHPUnit/Pest) |
fmt |
Format code with Laravel Pint |
analyse |
Run PHPStan static analysis |
Package Management¶
| Command | Description |
|---|---|
packages link |
Link local packages by path |
packages unlink |
Unlink packages by name |
packages update |
Update linked packages |
packages list |
List linked packages |
Deployment (Coolify)¶
| Command | Description |
|---|---|
deploy |
Deploy to Coolify |
deploy:status |
Show deployment status |
deploy:rollback |
Rollback to previous deployment |
deploy:list |
List recent deployments |
php dev¶
Start the Laravel development environment with all detected services.
Services Orchestrated¶
- FrankenPHP/Octane - HTTP server (port 8000, HTTPS on 443)
- Vite - Frontend dev server (port 5173)
- Laravel Horizon - Queue workers
- Laravel Reverb - WebSocket server (port 8080)
- Redis - Cache and queue backend (port 6379)
Flags¶
| Flag | Description |
|---|---|
--no-vite |
Skip Vite dev server |
--no-horizon |
Skip Laravel Horizon |
--no-reverb |
Skip Laravel Reverb |
--no-redis |
Skip Redis server |
--https |
Enable HTTPS with mkcert |
--domain |
Domain for SSL certificate (default: from APP_URL) |
--port |
FrankenPHP port (default: 8000) |
Examples¶
# Start all detected services
core php dev
# With HTTPS
core php dev --https
# Skip optional services
core php dev --no-horizon --no-reverb
php logs¶
Stream unified logs from all running services.
Flags¶
| Flag | Description |
|---|---|
--follow |
Follow log output |
--service |
Specific service (frankenphp, vite, horizon, reverb, redis) |
php stop¶
Stop all running Laravel services.
php status¶
Show the status of all Laravel services and project configuration.
php ssl¶
Setup local SSL certificates using mkcert.
Flags¶
| Flag | Description |
|---|---|
--domain |
Domain for certificate (default: from APP_URL or localhost) |
php build¶
Build a production-ready container image.
Flags¶
| Flag | Description |
|---|---|
--type |
Build type: docker (default) or linuxkit |
--name |
Image name (default: project directory name) |
--tag |
Image tag (default: latest) |
--platform |
Target platform (e.g., linux/amd64, linux/arm64) |
--dockerfile |
Path to custom Dockerfile |
--output |
Output path for LinuxKit image |
--format |
LinuxKit format: qcow2 (default), iso, raw, vmdk |
--template |
LinuxKit template name (default: server-php) |
--no-cache |
Build without cache |
Examples¶
# Build Docker image
core php build
# With custom name and tag
core php build --name myapp --tag v1.0
# Build LinuxKit image
core php build --type linuxkit
php serve¶
Run a production container.
Flags¶
| Flag | Description |
|---|---|
--name |
Docker image name (required) |
--tag |
Image tag (default: latest) |
--container |
Container name |
--port |
HTTP port (default: 80) |
--https-port |
HTTPS port (default: 443) |
-d |
Run in detached mode |
--env-file |
Path to environment file |
Examples¶
php shell¶
Open an interactive shell in a running container.
php test¶
Run PHP tests using PHPUnit or Pest.
Auto-detects Pest if tests/Pest.php exists.
Flags¶
| Flag | Description |
|---|---|
--parallel |
Run tests in parallel |
--coverage |
Generate code coverage |
--filter |
Filter tests by name pattern |
--group |
Run only tests in specified group |
Examples¶
php fmt¶
Format PHP code using Laravel Pint.
Flags¶
| Flag | Description |
|---|---|
--fix |
Auto-fix formatting issues |
--diff |
Show diff of changes |
php analyse¶
Run PHPStan or Larastan static analysis.
Flags¶
| Flag | Description |
|---|---|
--level |
PHPStan analysis level (0-9) |
--memory |
Memory limit (e.g., 2G) |
php packages link¶
Link local PHP packages for development.
Adds path repositories to composer.json with symlink enabled.
php packages unlink¶
Remove linked packages from composer.json.
php packages update¶
Update linked packages via Composer.
php packages list¶
List all locally linked packages.
php deploy¶
Deploy the PHP application to Coolify.
Configuration¶
Requires environment variables in .env:
COOLIFY_URL=https://coolify.example.com
COOLIFY_TOKEN=your-api-token
COOLIFY_APP_ID=production-app-id
COOLIFY_STAGING_APP_ID=staging-app-id
Flags¶
| Flag | Description |
|---|---|
--staging |
Deploy to staging environment |
--force |
Force deployment even if no changes detected |
--wait |
Wait for deployment to complete |
php deploy:status¶
Show the status of a deployment.
Flags¶
| Flag | Description |
|---|---|
--staging |
Check staging environment |
--id |
Specific deployment ID |
php deploy:rollback¶
Rollback to a previous deployment.
Flags¶
| Flag | Description |
|---|---|
--staging |
Rollback staging environment |
--id |
Specific deployment ID to rollback to |
--wait |
Wait for rollback to complete |
php deploy:list¶
List recent deployments.
Flags¶
| Flag | Description |
|---|---|
--staging |
List staging deployments |
--limit |
Number of deployments (default: 10) |
Configuration¶
Optional .core/php.yaml - see Configuration for examples.