Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Global Laravel Remote

Global Laravel Remote Laravel Package

spatie/global-laravel-remote

Run Laravel artisan commands on a remote server from your terminal. Install globally via Composer and execute with global-laravel-remote "{cmd}" to trigger remote artisan tasks without SSHing into the machine each time.

View on GitHub
Deep Wiki
Context7

Execute artisan commands on your server

Frequently asked questions about Global Laravel Remote
How do I install spatie/global-laravel-remote globally for Laravel projects?
Run `composer global require spatie/global-laravel-remote` to install it globally. Ensure your Composer global bin directory is in your system PATH so you can execute `global-laravel-remote` from any terminal.
Can I use this package to run Artisan commands on Laravel 7 or older?
No, this package is officially supported for Laravel 8+ (PHP 7.4+). Older versions may require adjustments to Facade syntax or dependency versions, but it’s not guaranteed to work without modifications.
How do I configure remote server credentials securely?
Store sensitive credentials like SSH keys or passwords in environment variables (e.g., `REMOTE_USER`, `SSH_KEY_PATH`) and reference them in your `config/remote.php` file. Avoid hardcoding credentials in configuration files.
What happens if the remote server is unreachable or the command fails?
The package doesn’t include built-in retry logic, so failures will throw exceptions. Handle errors with try-catch blocks or wrap commands in Laravel’s retry helper for resilience. Log failures for debugging.
Does this package support running non-Artisan commands like `composer` or `npm`?
No, it’s designed exclusively for Artisan commands. To run other CLI tools, wrap them in custom Artisan commands or use alternative tools like SSH directly for broader functionality.
How do I log or audit remote command executions for security compliance?
The package doesn’t include built-in logging. Use Laravel’s logging system or middleware to log commands before execution. For audit trails, consider integrating with tools like AWS CloudTrail or custom database logs.
Will this work in Docker or Kubernetes environments where SSH isn’t available?
No, it requires SSH access to the remote server. For containerized environments, use Kubernetes Jobs, CronJobs, or direct container execution instead of remote SSH-based solutions.
Can I use this for high-frequency tasks like real-time queue processing?
It’s not ideal for high-frequency tasks due to added latency from remote execution. For real-time processing, run queue workers directly on the target server or use serverless functions with local queue listeners.
Are there alternatives to this package for remote Laravel command execution?
Yes, alternatives include Laravel Forge’s CLI tools, Deployer (for PHP projects), or custom SSH scripts. However, this package is lightweight and Laravel-specific, focusing solely on Artisan commands without extra deployment complexity.
How do I test remote command execution in a CI/CD pipeline?
Mock the `Remote` facade in tests using Laravel’s mocking tools (e.g., `Mockery`). Test edge cases like failed connections or invalid commands by simulating exceptions in your test environment.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport