Skip to main content

Reference CLI Commands

Part: Appendices
Chapter: 92

The platform CLI is the operator and developer control surface for migrations, configuration validation, release planning, auth diagnostics, storage work, TLS maintenance, and local development. The examples below use coil as the canonical binary name. Customer apps may re-export the same command tree under an app-specific binary, but behavior should remain consistent.

Output Conventions​

Every command should support:

  • human-readable output by default
  • --json for automation
  • non-zero exit codes for validation or execution failure
  • --dry-run where the command changes data, routing, auth state, or release state

Long-running commands should emit progress records rather than silent waits. Commands that calculate change plans should distinguish “no-op,” “warning,” and “unsafe to continue.”

Core Command Groups​

Command groupPurpose
coil devLocal development server, background worker bootstrap, and fixture loading
coil configValidate, render, and diff effective configuration
coil migratePlan and apply core, module, and customer-app schema changes
coil authValidate auth packages, inspect bindings, run checks, and explain decisions
coil moduleInstall, enable, disable, and inspect official modules
coil cacheWarm, inspect, and invalidate cache scopes or tags
coil storageValidate storage policy, sync managed assets, and inspect object-store state
coil assetsPublish build artifacts and verify asset manifests
coil tlsCheck certificate status, renew, and validate challenge setup
coil jobsRun workers, inspect queue health, and retry failed jobs
coil importRun staged content or data imports
coil releaseProduce upgrade plans, run compatibility checks, and mark release state

Representative Commands​

coil config validate
coil migrate plan
coil migrate apply --dry-run
coil auth package validate auth/coil-default-auth
coil auth explain --subject user:42 --capability cms.page.publish --resource page:home
coil module list
coil cache warm --scope public --route /events
coil storage verify --policy
coil assets publish
coil tls renew
coil import run imports/wordpress-events.toml
coil release doctor

These examples are normative at the behavior level even if subcommand naming evolves slightly. Operators need a consistent mental model.

Release And Migration Behavior​

The CLI should treat upgrade planning as a first-class workflow. coil release doctor or its equivalent should check:

  • core and module compatibility
  • auth model package and capability registry compatibility
  • pending config migrations
  • pending schema migrations
  • incompatible WASM extension host requirements

coil migrate plan should present changes grouped by owner, for example core, module, customer app, or auth package. This mirrors the architectural split and makes rollback reasoning much clearer.

Auth Diagnostics​

The auth command group is especially important because the platform uses relationship-based authorization. Operators and developers should be able to:

  • validate an auth package before deployment
  • inspect capability bindings
  • run a batch of auth-model tests
  • explain why a check passed or failed

Direct tuple-table inspection is not an adequate operator workflow by itself.

Storage And TLS Operations​

The storage and TLS command groups expose operationally sensitive work and should therefore require explicit confirmation or --yes in destructive paths. Examples include:

  • revoking or replacing certificates
  • forcing asset-policy rewrites
  • reclassifying a managed asset from public to private
  • re-running an object-store sync that may overwrite metadata

The CLI exists to make critical operations legible and scriptable, not hidden behind ad hoc scripts.