Run deployment tasks and automation with a simple Blade-like syntax.
A simple demo using Laravel Envoy.
Laravel Envoy provides a clean, minimal syntax for defining common tasks you run on your remote servers.
It uses a Blade-like Envoy.blade.php
file to define servers and tasks, and can
be used for deployment pipelines or any repeatable automation.
Click the button below to run an actual Envoy task on this server. Output is captured and streamed live to your browser via WebSockets.
A quick walkthrough of how this works.
Install Envoy globally via Composer:
composer global require laravel/envoy
The demo on this page uses the following Envoy.blade.php
file, which runs a safe, simulated deploy with small random delays between steps:
@servers(['local' => '127.0.0.1'])
@task('demo', ['on' => 'local'])
echo "🚀 Starting simulated deployment..."
sleep 1
echo "📥 Pulling latest changes from git..."
sleep $(php -r 'echo random_int(1,2);')
echo "📦 Installing composer dependencies..."
sleep $(php -r 'echo random_int(2,4);')
echo "🗄️ Running database migrations..."
sleep $(php -r 'echo random_int(1,2);')
echo "🧹 Clearing and optimizing configuration..."
php artisan optimize:clear
sleep 1
echo "🖥️ System info:"
uname -srm
echo "✅ Deployment finished successfully!"
echo "-----------------------------------"
echo "User: $(whoami)"
echo "Time: $(date +'%Y-%m-%d %H:%M:%S %Z')"
@endtask
From the project root, you can run the task using the envoy run
command:
envoy run demo
# or
vendor/bin/envoy run demo
@setup
can be used to prepare variables and PHP logic.@story
to chain tasks into pipelines.on
option.A few links to supporting resources.