CLI Reference

Reference for every core Glueful CLI command, plus the commands extensions add

This reference lists every command the core framework (glueful/framework 1.91) registers. Core commands are discovered automatically from the framework's Console/Commands directory; extensions add their own (see Commands from extensions). Run php glueful help <command> for the full option list of any command.

Basics

php glueful                    # list commands
php glueful list
php glueful help serve
php glueful version            # --system, --json

Setup & Environment

php glueful install                    # setup wizard: --skip-database (--skip-db), --skip-keys, --skip-cache, --force, --unattended
php glueful generate:key               # APP_KEY + JWT_KEY: --jwt-only, --app-only, --force, --show
php glueful doctor                     # quick local health checks
php glueful system:check               # validate installation: --details, --fix, --production
php glueful system:env:validate        # required env vars present (--keys=A,B to check specific ones)
php glueful system:production --check # production config audit: --score, --fix, --template, --audit, --dry-run
php glueful system:memory              # memory monitoring: --watch, --interval, --threshold, --format
php glueful env:sync                   # rewrite .env.example from config env() usage; --apply also adds missing keys to .env
php glueful config:dsn:validate --from-env   # validate DB/Redis DSNs (or --db=... / --redis=...)

system:check --production also requires APP_DEBUG=false, a durable log sink (LOG_TO_FILE or LOG_TO_DB), and a JWT_KEY of at least 32 characters. (Before 1.91 it checked JWT_SECRET, which nothing reads.)

There are no config:cache / config:clear commands.

Development Server

php glueful serve                              # --host, --port, --watch, --queue, --open, --poll-interval
php glueful serve --host=0.0.0.0 --port=9000
php glueful dev:server                         # serve with dev defaults: --port, --host, --queue, --open, --no-watch
php glueful test:watch                         # re-run tests on change: --command, --interval, --once

Database & Migrations

php glueful migrate:create CreateUsersTable
php glueful migrate:run                # --force, --dry-run, --pretend, --batch, --path
php glueful migrate:rollback           # --steps=N, --force, --dry-run
php glueful migrate:status
php glueful migrate:verify             # classify schema state (ready/adoptable/divergent); --json
php glueful migrate:verify --adopt=glueful/users   # write verified receipts for an adoptable source

php glueful db:status                  # --details, --format
php glueful db:profile "SELECT ..."    # --explain, --patterns, --benchmark, --compare, --params, --file, --output
php glueful db:reset                   # drops all tables: --force, --dry-run
php glueful db:seed [Class]            # --force

Scaffolding

php glueful scaffold:controller UserController   # --resource, --api, --force
php glueful scaffold:model User                  # --migration, --soft-deletes, --timestamps, --fillable, --table
php glueful scaffold:request CreateUserRequest
php glueful scaffold:dto CreateUserData          # --response for a response DTO
php glueful scaffold:middleware EnsureAdmin
php glueful scaffold:job SendWelcomeEmail        # --queue, --tries
php glueful scaffold:test UserControllerTest     # --unit, --feature, --class, --methods
php glueful scaffold:factory UserFactory         # --model
php glueful scaffold:seeder UserSeeder           # --model
php glueful scaffold:resource UserResource       # --model, --collection
php glueful scaffold:rule StrongPassword         # --params, --implicit
php glueful scaffold:filter UserFilter           # --filterable, --sortable, --searchable, --model

php glueful event:create OrderShipped            # --type
php glueful event:listener SendShippedEmail      # --event, --method
php glueful create:extension Billing             # scaffold a local extension

The scaffold commands also accept --force (overwrite), and most accept --path for a custom output directory. scaffold:controller writes to app/Controllers under the App\Controllers namespace (the skeleton's autoloaded layout; an app without app/ keeps api/Controllers), then prints the next steps, including the line to add to your app provider's services() so the router can resolve it:

\App\Controllers\UserController::class => ['autowire' => true, 'shared' => true],

create:extension scaffolds a package that extensions:enable can run: it declares extra.glueful.migrations for a flat migrations/ folder. See Extensions.

Cache

php glueful cache:get some:key
php glueful cache:set some:key "value" --ttl=3600   # --json to store decoded JSON
php glueful cache:delete some:key                   # --pattern, --force
php glueful cache:expire some:key 120               # --human-time, --verify
php glueful cache:ttl some:key
php glueful cache:inspect                           # driver + PHP extension status
php glueful cache:status
php glueful cache:clear                             # alias cache:flush; --tag, --force
php glueful cache:maintenance                       # --operation=clearExpiredKeys, --queue

cache:purge (edge/CDN purge) is not core: it ships with glueful/cdn.

Queue

php glueful queue:work                       # lean single worker
php glueful queue:work --once                # process one job then exit
php glueful queue:work --connection=redis --queue=default,emails
php glueful queue:work --max-jobs=500 --max-runtime=3600 --stop-when-empty
php glueful queue:restart                    # ask running workers to exit after their current job

php glueful queue:failed                     # --queue, --limit, --json
php glueful queue:retry <uuid>               # or --all [--queue=...]
php glueful queue:forget <uuid>
php glueful queue:flush                      # delete all failed jobs (--queue to scope)

php glueful queue:scheduler                  # action: run (default), work, list, status, health

queue:scheduler options: --interval/-i, --max-runs/-m, --dry-run, --force/-f, --output-format/-o, --watch/-w, --filter. Scheduled jobs are defined in config/schedule.php; there are no CLI actions to add, remove, enable or disable them (the add/remove/enable/disable/history stubs and the ignored --parallel/-p option were removed in 1.91, and an unknown action now fails). See Scheduling.

queue:work flags: --connection, --queue (comma-separated, default default), --once, --sleep (3), --memory/-m in MB (128), --timeout/-t in seconds (60), --max-jobs (0 = unlimited), --max-runtime in seconds (0 = unlimited), --tries (3), --stop-when-empty.

Supervised worker fleets and autoscaling (queue:supervise, queue:autoscale) live in the glueful/queue-ops extension.

OpenAPI / SDKs

php glueful generate:openapi                  # --force, --clean/-c, --ui
php glueful generate:client typescript        # SDK via an off-the-shelf OpenAPI generator: --spec, --output, --execute

--clean removes only the generated routes/ and extensions/ definition folders before generating; hand-authored fragments are kept. Tags are taken from the path after the API prefix (e.g. /api/v1/users → "Users").

Routing / Container / Console

php glueful route:debug                # --method, --path, --name
php glueful route:cache:status         # --files
php glueful route:cache:clear          # run on every deploy

php glueful di:container:debug [id]
php glueful di:container:validate
php glueful di:container:compile
php glueful di:container:map
php glueful di:lazy:status

php glueful commands:cache             # prebuild the production command manifest; --clear, --status

Run route:cache:clear as part of each deploy. Since 1.91 the route cache (format v3) also keeps each route's rate limits, #[Fields] config and #[RequireScope] groups; files from older releases are invalidated automatically on the next boot, but clearing them explicitly is the safe step. di:container:debug takes --services, --aliases, --tags, --parameters, --graph, --format; di:container:validate takes --strict, --fix and the --check-* switches.

Field Selection

php glueful fields:analyze            # field-selection usage across routes: --detailed, --format, --routes
php glueful fields:validate           # validate route field configurations: --route, --fix, --strict, --format
php glueful fields:performance        # projection performance analysis: --watch, --interval, --threshold, --reset
php glueful fields:whitelist-check [pattern]   # whitelist compliance: --route, --strict, --security, --export

Both fields:analyze and fields:validate count routes with a #[Fields] attribute, whose field_selection middleware is attached automatically.

Extensions

php glueful extensions:list
php glueful extensions:info billing
php glueful extensions:enable billing      # migrates its schema first; --dry-run, --backup
php glueful extensions:disable billing     # schema and data are preserved; --dry-run, --backup
php glueful extensions:cache
php glueful extensions:clear               # --all, --reset
php glueful extensions:summary
php glueful extensions:diagnose

extensions:enable / extensions:disable accept a package name, provider FQCN, or slug (case-insensitive) and are allowed in production. enable runs the extension's declared migrations before it adds the provider to config/extensions.php, then recompiles the cache. extensions:list shows each extension's state (enabled ✓ / available ○ / enabled-but-missing ⚠). See Extensions.

Security / Auth / API keys

php glueful security:check            # --fix, --production
php glueful security:scan             # --deep, --fix, --format, --output
php glueful security:report           # --format=html|json|text, --output
php glueful security:vulnerabilities  # --severity, --format, --update, --fix
php glueful security:lockdown --status   # --enable / --disable, --reason, --force, --cleanup
php glueful security:revoke-tokens    # --user, --all, --type, --older-than, --reason, --force

php glueful apikey:create --user=<uuid> --name="CI" --scopes=read:posts,write:posts --expires=+1year  # --ips
php glueful apikey:list --user=<uuid>
php glueful apikey:rotate <uuid> --grace=24     # grace period in hours
php glueful apikey:revoke <uuid>

php glueful encryption:test
php glueful encryption:file encrypt /path/to/file [destination]   # --force, --delete-source
php glueful encryption:rotate --table=users --columns=ssn,api_key # --primary-key, --batch-size, --dry-run

Key scopes, IP allowlists and rotation grace are covered in API Keys.

Permissions

php glueful permissions:list          # declared catalog by category
php glueful permissions:diff          # drift: declared vs enforced vs persisted
php glueful permissions:sync          # persist the catalog into the active provider; --prune

Storage & Uploads

php glueful storage:test [disk]       # registration, adapter, liveness; --write adds a write probe
php glueful blobs:purge               # remove deleted uploads past the grace period: --days, --limit

Webhooks, API versions, notifications

php glueful webhook:list              # alias webhooks; --active, --inactive, --stats, --json
php glueful webhook:test <url>        # --event, --secret, --subscription, --json
php glueful webhook:retry [uuid]      # --failed, --since, --limit, --dry-run, --json
php glueful webhook:cleanup           # delete deliveries past retention

php glueful api:version:list          # alias api:versions
php glueful api:version:deprecate v1  # --sunset, --message, --alternative, --dry-run

php glueful notifications:process-retries   # --limit, --channel, --priority, --dry-run

See Webhooks for the delivery model behind the webhook:* commands.

Commands from extensions

These are registered only when the package is installed and enabled.

PackageCommands
glueful/aegisaegis:bootstrap-admin
glueful/archivearchive:manage
glueful/auditaudit:prune
glueful/cdncache:purge
glueful/commercecommerce:* (carts, orders, stock, downloads, customers, diagnose, commerce:marketplace:*, tenancy adopt)
glueful/flagsflags:list, flags:get, flags:enable, flags:disable, flags:evaluate, flags:archive
glueful/i18ni18n:locales, i18n:missing, i18n:validate, i18n:import, i18n:export, i18n:sync-catalogs
glueful/import-exportimport:run, import:list, export:run, export:list, import-export:*
glueful/meilisearchmeilisearch:index, meilisearch:sync, meilisearch:search, meilisearch:status, meilisearch:flush
glueful/payviapayvia:* (diagnose, relay-events, intents sweep, sandbox proof, tenancy adopt)
glueful/queue-opsqueue:supervise, queue:autoscale
glueful/runivaruniva:serve
glueful/subscriptionssubscriptions:* (plans, set-plan, show, reconcile)
glueful/tenancytenant:create, tenant:list, tenant:activate, tenant:suspend, tenant:diagnose
glueful/users2fa:enable, 2fa:disable, 2fa:status, security:reset-password

Notes

  • Older command names such as generate:controller, generate:api-definitions, and generate:api-docs no longer exist; use the scaffold:* commands.
  • In production the command list is cached in storage/cache/glueful_commands_manifest.php. The manifest is stamped with the framework version and is rediscovered automatically when it's stale (a listed command is gone, or an upgrade added one), so no manual step is needed on deploy. commands:cache prebuilds it.