Commands Overview

Complete reference for all PhpHive CLI commands.

πŸ“‹ Command Categories

PhpHive provides 30+ commands organized into 10 categories:

Common Options

All commands support these common options:

  • --workspace, -w=NAME - Target specific workspace

  • --force, -f - Force operation (skip cache)

  • --no-cache - Disable Turbo cache

  • --no-interaction, -n - Run in non-interactive mode

  • --all - Apply operation to all workspaces

  • --json - Output data in JSON format

  • --parallel - Enable parallel execution across workspaces

  • --dry-run - Preview what would happen without executing

  • --help, -h - Display help

  • --quiet, -q - Suppress output

  • --verbose, -v - Verbose output

β†’ See detailed common options documentationarrow-up-right


Workspace Management

hive make:workspace

Initialize a new monorepo workspace with interactive setup.

Aliases: init, new

Usage:

Options:

  • --name=NAME - Workspace name

  • --type=TYPE - Workspace type (monorepo, package, app)

  • --no-git - Skip Git initialization

  • --no-interaction, -n - Run without prompts

What it creates:

  • Root composer.json with workspace configuration

  • turbo.json for Turborepo configuration

  • pnpm-workspace.yaml for workspace management

  • package.json with scripts

  • .gitignore with sensible defaults

  • README.md with getting started guide

  • apps/ and packages/ directories


hive workspace:list

List all workspaces in the monorepo.

Aliases: list, ls, workspaces

Usage:

Options:

  • --type=TYPE - Filter by workspace type (app, package)

Output:


hive workspace:info

Show detailed information about a workspace.

Aliases: info, show, details

Usage:

Arguments:

  • workspace - Workspace name

Options:

  • --dependencies - Show dependency tree


Make Commands

hive make:app

Create a new application with full scaffolding.

Aliases: create:app, new:app

Usage:

Arguments:

  • name - Application name (required)

Options:

  • --type, -t=TYPE - Application type (laravel, symfony, magento, skeleton)

Supported App Types:

Laravel

  • Multiple versions (10, 11 LTS, 12 Latest)

  • Starter kits (Breeze, Jetstream)

  • Database configuration

  • Optional packages (Horizon, Telescope, Sanctum, Octane)

Symfony

  • Multiple versions (6.4 LTS, 7.1 LTS, 7.2 Latest)

  • Project types (webapp, skeleton)

  • Database configuration

  • Optional bundles (Maker, Security)

Magento

  • Versions (2.4.6, 2.4.7)

  • Database and admin configuration

  • Sample data installation

  • Elasticsearch and Redis setup

Skeleton

  • Minimal PHP application

  • Composer configuration

  • PHPUnit setup

  • Optional quality tools

Example:


hive make:package

Create a new reusable package.

Aliases: create:package, new:package

Usage:

Arguments:

  • name - Package name (required)

Options:

  • --description=TEXT - Package description

What it creates:

  • composer.json with PSR-4 autoloading

  • src/ directory with example class

  • tests/ directory with PHPUnit setup

  • phpunit.xml configuration

  • README.md with usage instructions

  • .gitignore for package-specific files


Composer Commands

hive composer:install

Install all dependencies across workspaces.

Aliases: install, i

Usage:

Options:

  • --no-dev - Skip dev dependencies

  • --update-lock - Update lock file

  • --optimize-autoloader, -o - Optimize autoloader


hive composer:require

Add a package dependency.

Aliases: require, req, add

Usage:

Arguments:

  • package - Package name (required)

Options:

  • --dev, -D - Add as dev dependency

  • --update-with-dependencies - Update dependencies

  • --workspace, -w=NAME - Target workspace


hive composer:update

Update dependencies.

Aliases: update, up, upgrade

Usage:

Arguments:

  • package - Package name (optional)

Options:

  • --with-dependencies - Update with dependencies

  • --prefer-stable - Prefer stable versions

  • --workspace, -w=NAME - Target workspace


hive composer:run

Run arbitrary Composer commands.

Aliases: composer, comp

Usage:

Arguments:

  • command - Composer command to run

  • args - Additional arguments (optional)


Quality Commands

hive quality:test

Run PHPUnit tests.

Aliases: test, t, phpunit

Usage:

Options:

  • --testsuite=SUITE - Test suite to run (Unit, Feature)

  • --coverage - Generate coverage report

  • --filter=PATTERN - Filter tests by pattern

  • --parallel - Run tests in parallel

  • --workspace, -w=NAME - Target workspace


hive quality:lint

Check code style with Laravel Pint.

Aliases: lint, pint

Usage:

Options:

  • --dirty - Only check uncommitted files

  • --workspace, -w=NAME - Target workspace


hive quality:format

Fix code style automatically.

Aliases: format, fmt, fix

Usage:

Options:

  • --dry-run - Preview changes without applying

  • --dirty - Only fix uncommitted files

  • --workspace, -w=NAME - Target workspace


hive quality:typecheck

Run PHPStan static analysis.

Aliases: typecheck, tc, phpstan, analyse, analyze

Usage:

Options:

  • --level=LEVEL - Analysis level (0-9)

  • --generate-baseline - Generate baseline file

  • --workspace, -w=NAME - Target workspace


hive quality:refactor

Run Rector refactoring.

Aliases: refactor, rector

Usage:

Options:

  • --fix - Apply refactoring changes

  • --dry-run - Preview changes only (default)

  • --clear-cache - Clear Rector cache

  • --workspace, -w=NAME - Target workspace


hive quality:mutate

Run Infection mutation testing.

Aliases: mutate, mutation, infection

Usage:

Options:

  • --min-msi=SCORE - Minimum MSI score

  • --min-covered-msi=SCORE - Minimum covered MSI score

  • --threads=N - Number of threads

  • --show-mutations - Show all mutations

  • --workspace, -w=NAME - Target workspace


Framework Commands

hive framework:artisan

Run Laravel Artisan command in a workspace.

Aliases: artisan, art

Usage:

Arguments:

  • command - Artisan command to run

  • args - Additional arguments (optional)

Options:

  • --workspace, -w=NAME - Target workspace


hive framework:console

Run Symfony Console command in a workspace.

Aliases: console, sf, symfony

Usage:

Arguments:

  • command - Console command to run

  • args - Additional arguments (optional)

Options:

  • --workspace, -w=NAME - Target workspace


hive framework:magento

Run Magento CLI command in a workspace.

Aliases: magento, mage, bin/magento

Usage:

Arguments:

  • command - Magento command to run

  • args - Additional arguments (optional)

Options:

  • --workspace, -w=NAME - Target workspace


Development Commands

hive dev:start

Start development server with hot reload.

Aliases: dev, serve

Usage:

Options:

  • --port=PORT - Server port (default: 8000)

  • --host=HOST - Server host (default: localhost)

  • --workspace, -w=NAME - Target workspace


hive dev:build

Build for production.

Aliases: build

Usage:

Options:

  • --production - Production build mode

  • --minify - Minify output

  • --workspace, -w=NAME - Target workspace


Deployment Commands

hive deploy:run

Run deployment pipeline.

Aliases: deploy

Usage:

Options:

  • --env=ENV - Target environment

  • --dry-run - Preview deployment steps

  • --workspace, -w=NAME - Target workspace


hive deploy:publish

Publish packages to registry.

Aliases: publish

Usage:

Options:

  • --tag=TAG - Version tag

  • --dry-run - Preview publish

  • --workspace, -w=NAME - Target workspace


Turbo Commands

hive turbo:exec

Direct access to Turborepo commands.

Aliases: turbo, tb

Usage:

Arguments:

  • command - Turbo command to run

  • args - Additional arguments (optional)


hive turbo:run

Run arbitrary Turbo tasks.

Aliases: run, exec, execute

Usage:

Arguments:

  • task - Task name to run

Options:

  • --filter=PATTERN - Filter workspaces

  • --parallel - Run in parallel

  • --no-cache - Skip cache

  • --workspace, -w=NAME - Target workspace


System Commands

hive system:doctor

System health check and diagnostics.

Aliases: doctor, check, health

Usage:

Options:

  • --check=COMPONENT - Check specific component

  • --verbose, -v - Verbose output

Checks:

  • PHP version and extensions

  • Composer installation

  • Turborepo availability

  • Workspace configuration

  • File permissions


hive system:version

Show version information.

Aliases: version, ver, v, --version, -V

Usage:

Options:

  • --all - Show all component versions

Output:


Maintenance Commands

hive clean:cache

Clean caches and temporary files.

Aliases: clean, clear

Usage:

Options:

  • --cache=TYPE - Specific cache to clean (phpstan, phpunit, turbo, pint)

  • --workspace, -w=NAME - Target workspace

What it cleans:

  • .phpstan.cache - PHPStan cache

  • .phpunit.cache - PHPUnit cache

  • .turbo - Turborepo cache

  • .pint.cache - Pint cache

  • var/cache - Application cache


hive clean:all

Deep clean (destructive operation).

Aliases: cleanup

Usage:

Options:

  • --force, -f - Skip confirmation

  • --workspace, -w=NAME - Target workspace

Warning: This removes:

  • vendor/ directories

  • composer.lock files

  • node_modules/ directories

  • All cache directories

  • Build artifacts


Command Cheat Sheet

Quick reference for common commands:


Need more help? Check the Getting Started Guide or open an issuearrow-up-right.

Last updated