laravel/cloud-cli
Laravel Cloud CLI is a Laravel Zero command-line tool for deploying and managing applications on Laravel Cloud. It handles OAuth login, apps, environments, databases, caches, object storage, domains, and more, with CI-friendly API token authentication.
Architecture fit. The most important framing correction for a TPM: laravel/cloud-cli is not a library you composer require. It is a Laravel Zero application — a standalone console binary distributed as a repo/phar — which is exactly why "0 dependents" appears in the metadata. That number is not a red flag; it is the expected shape for a CLI. The correct consumption model is pin a version, install it in developer environments and CI runners, and call it as a process boundary. It gives you no in-process API, no service container bindings, no extension points. Treat it as an operational tool, not an integration surface.
Integration feasibility. High, but strictly conditional on hosting on Laravel Cloud. If the estate is on Forge, Ploi, Vapor, or raw AWS, the package has no applicable scope and should be rejected at triage. Where applicable, the fit is genuinely strong: OAuth for humans (cloud auth) and LARAVEL_CLOUD_TOKEN for machines, with documented precedence (env over file) and no disk writes when the env var is used. repo:config persists per-repo app/environment defaults, which removes the usual --application/--environment flag noise from pipeline steps. The hard external dependencies are PHP 8.3+, Composer, Git, and an authenticated GitHub CLI — that last one is a non-obvious coupling that will break repo-linking flows in non-GitHub or locked-down CI.
Technical risk.
--json is offered on "many commands," not all. Any pipeline that parses human-formatted tables is coupled to cosmetic output and will break silently.~/.config/cloud/config.json on developer machines; org scope is baked into the token, so multi-org users juggle multiple tokens.Key questions.
--json output schema-stable and guaranteed on every resource command we intend to automate, or best-effort?composer global, or repo clone — and does it work behind a corporate proxy or air-gapped runner?*:delete, database-restore:create, environment:variables in replace mode) support dry-run or confirmation bypass auditing?Stack fit. Best-in-class only inside the Laravel + Laravel Cloud perimeter. Two distinct consumption paths: (a) human/developer — shell alias to the entrypoint, cloud ship for guided first deploys, cloud completions for tab completion, cloud database:open for local tunnelling; (b) machine/CI — export LARAVEL_CLOUD_TOKEN=... plus -n on every command, with all context passed explicitly rather than prompted. The repository also ships an agent skill (skills/deploying-to-cloud/SKILL.md) that instructs coding agents to prefer the CLI over guessing dashboard or API workflows — worth adopting if the org uses agentic development, since it materially reduces the chance of an agent improvising against the Cloud API.
Migration path. Do not cut over blindly. Run a read-only inventory first: cloud application:list --json, environment:list --json, instance:list, usage --detailed to capture the pre-migration baseline and cost shape. Then configure each repo with repo:config <app> --organization=<slug> -n. Then run cloud deploy in shadow mode alongside the incumbent process for a sprint, comparing deployment:get --json outcomes before retiring the old path. Decommission the dashboard workflow only after two clean cycles.
Compatibility. PHP 8.3+ is a real gate — audit CI runner images and developer machines before committing; on older base images this becomes an upgrade project, not an install step. GitHub CLI must be installed and authenticated wherever repo:config or repo linking runs; on non-GitHub source hosting, plan to skip those flows and pass application/environment explicitly. Shell completion targets zsh/bash; Windows is effectively untested. Multi-org users must either export a per-job token or maintain multiple entries via auth:token --add.
Sequencing.
auth:token --add via pipe over --token= on the command line, which leaks into the process list).--json commands.repo:config per repository to pin app/environment defaults.deploy + deploy:monitor as the pipeline gate, with explicit timeouts and retries.environment:variables management — sequenced last among common tasks because replace-mode writes are high blast-radius.cloud usage --period=previous) wired into a recurring cost review.Maintenance. Pin an exact version and upgrade deliberately — self-update is a convenience for laptops and a hazard in CI. The changelog is a list of PR links with no deprecation or breaking-change annotations, so every bump requires reading the release diff. Ownership should be a single named engineer with a monthly review cadence; the upgrade itself is small, but the review is not optional at v0.x. Positive signal: active maintenance by known Laravel maintainers with visible Dependabot hygiene.
Support. Vendor is Laravel; support for the CLI itself is community/issue-tracker grade, not an SLA'd product — the commercial support relationship attaches to Laravel Cloud, not to this binary. Expect to be self-sufficient on failures. Budget an internal runbook covering token rotation, version rollback, and "what to do when deploy:monitor hangs."
Scaling. The CLI is stateless per invocation apart from the config file, so horizontal scale across many pipelines is architecturally fine. The unknown is the Cloud API's per-token rate limiting under parallel jobs; plan to shard tokens per pipeline if contending. Interactive prompting is the scaling anti-pattern — every automated call must be -n with fully qualified arguments, or jobs will hang waiting on stdin until timeout. Long-running deploy:monitor gates consume a runner for the deploy duration; size runner concurrency accordingly.
Failure modes.
LARAVEL_CLOUD_TOKEN= is documented as "unset," meaning a deliberately blanked variable silently falls back to a saved file token and can target the wrong organization. Mitigate by always passing --organization, which the CLI validates rather than trusts when an env token is present.--json output is a latent failure on patch upgrades.*:delete, database-restore:create, database-snapshot:delete, and environment:variables replace-mode have no documented dry-run. Restrict these to human operators or a gated manual job, never to autonomous pipelines.Ramp-up. Very low for Laravel developers — the UX is Artisan-shaped with sensible prompts, so a competent team is productive in an afternoon. The steeper curve is the automation path: converting interactive flows into deterministic -n invocations, and learning which commands expose --json. Recommend pairing one engineer on pipeline hardening while the rest adopt interactively; expect the first fully automated deploy to take a week including shadow-mode validation, not a day.
How can I help you explore Laravel packages today?