beyondcode/forge-cli
A command-line interface for Laravel Forge. Manage servers, sites, databases, and deployments right from your terminal using your API token, with simple commands for provisioning resources, triggering deployments, and monitoring your infrastructure. Handy for scripting routine tasks.
Architecture fit
beyondcode/forge-cli is a Laravel Zero console application that wraps the Laravel Forge HTTP API. It is an operator tool, not an application dependency — it does not belong in an application's composer.json, has zero Composer dependents, and introduces no runtime surface into production services. Fit should be judged as "does a terminal-first Forge workflow reduce toil," not "does this library integrate with our codebase."Integration feasibility
composer global require beyondcode/forge-cli:1.2.0, set the Forge API token, confirm forge --help resolves, then run a read-only command (forge servers, forge sites) to validate the token and detect API drift. This is an afternoon-scale spike, not a project.--help text and the src/ command classes are the contract, which means feasibility assessment requires reading source for every command we intend to rely on and noting which Forge endpoint each hits.forge env:pull <server> <site> to sync environment variables without a browser round-trip. Lowest-risk, immediately measurable, and it establishes the credential-handling discipline the rest of the integration depends on.Technical risk
Key questions
Stack fit
deploy-staging, env-sync-staging, sites-on-staging. This keeps team habits stable when the underlying command changes or breaks, and makes the eventual swap to the official CLI or direct API a one-file change.Migration path
Compatibility
1.2.0); this is not a moving target and should never float.Sequencing
umask 077, redirect to a file, treat output as secrets.set -euo pipefail, explicit failure messaging, non-production site first. Test the hook-exists scenario against a sandbox before trusting the deploy-script write path.--apply / APPLY=1 gate.Maintenance
curl call — not a crisis. That is the argument for permitting the pilot and the argument against standardizing on it.Support
Scaling
Failure modes
set -euo pipefail and our own failure messaging.umask, file redirection, history suppression, minimal token scope.Ramp-up
Bottom line for the portfolio: fund a two-week, single-engineer, time-boxed spike using this package as a throwaway prototype to quantify hours saved on inventory, env sync, and guarded staging deploys. Keep SSH key management out of the pilot. If the hypothesis holds, build the durable version on the official Forge CLI or direct Forge API calls. Do not adopt as a production dependency, and do not let it become the team's default path to Forge.
How can I help you explore Laravel packages today?