- How do I install Laravel Forge CLI?
- Install it globally with composer global require laravel/forge-cli, or add it per project with composer require --dev laravel/forge-cli and run vendor/bin/forge. Because it is a standalone CLI rather than a library you embed, global installation on developer machines and CI images is the typical approach. Avoid adding it to a production composer.json dependency graph.
- How do I authenticate Laravel Forge CLI in CI without interactive prompts?
- Create a Forge API token and expose it as the FORGE_API_TOKEN environment variable. Explicit support for this arrived in v1.3.1, and non-interactive usage was hardened in v1.3.2. Treat the token as high-value: scope it to a dedicated machine user and rotate it regularly, since it can provision, destroy, and redeploy servers.
- Can I run Laravel Forge CLI in CI/CD pipelines like GitHub Actions?
- Yes. The tool was designed to be scriptable, not just interactive: set FORGE_API_TOKEN in the pipeline environment and commands run without prompts. Deploy polling became configurable in v2.0.3 with a poll interval and timeout, which is what makes a CI deploy step fail fast instead of hanging. Commands that rely on SSH still need a working key and remote user in the runner.
- What is the difference between laravel/forge-cli and laravel/forge-sdk?
- The CLI is a terminal and pipeline client that wraps the Forge v2 REST API and adds SSH plumbing, while the SDK is the HTTP client you call from application code. Use the CLI for humans and CI steps, and the SDK for custom dashboards or internal admin tools that need Forge operations inside PHP. The CLI is replaceable in a sprint; migrating off Forge itself is a platform migration.
- Which Laravel Forge CLI commands require SSH access?
- Commands such as ssh, database:shell, and log tailing depend on a working local SSH identity plus the correct remote user and port. Custom SSH ports have been honored since v1.8.1, and ssh:configure helps set things up. Key distribution to developer machines and CI runners remains a human and ops prerequisite.
- Do I need a Laravel application to use Laravel Forge CLI?
- No. It is a Laravel Zero standalone binary built on Symfony Console and Laravel components, so it runs independently of any app codebase. It can manage any PHP or WordPress site hosted on Forge, and it is not something you install into an application to embed functionality.
- How do I keep Laravel Forge CLI deploy polling from hanging my pipeline?
- Upgrade to at least v2.0.3, where deploy polling became configurable with a poll interval and a timeout. Setting a timeout turns a stuck deployment into a fast, visible CI failure instead of an indefinite hang. Pin the CLI version in your CI image so behavior does not shift under you.
- Is Laravel Forge CLI safe to use against production servers?
- It exposes destructive verbs: server and site operations plus env:push mutate production state, and there is no documented dry-run mode. Substitute process controls such as pull request review, branch protection, and manual approval gates before automation runs. Keep the API token scoped to a dedicated machine user rather than a personal admin account.
- Should I pin the Laravel Forge CLI version in CI?
- Yes, pinning is mandatory in practice. v2.0.0 was a hard cut to the Forge v2 API, so any breaking change on Forge's side surfaces here as a breaking CLI release with no abstraction layer you control. The rapid v2.0.0 to v2.0.4 churn also means you should avoid adopting .0 releases and let patch versions settle first.
- Is Laravel Forge CLI actively maintained despite its low star count?
- It is maintained by the official Laravel organization with a funded commercial product behind it, so abandonment risk is lower than roughly 246 stars would suggest. The tradeoff is shallow public troubleshooting knowledge and few third-party write-ups, since it is a globally installed CLI with zero Packagist dependents. Rely on the official Forge documentation and pin versions rather than expecting a large community support base.