kib-ev/laravel-ftp-deploy
Composer 安装命令:
composer require kib-ev/laravel-ftp-deploy
包简介
Deploy Laravel project files to shared hosting via FTP (Artisan command)
README 文档
README
Artisan command php artisan deploy for uploading project files to shared hosting via FTP.
Local development only: the command runs when APP_ENV=local. Credentials are stored in .ftp-deploy (not committed to git).
Repository: github.com/kib-ev/laravel-ftp-deploy
Requirements
- PHP 8.1+
- ext-ftp
Installation
composer require --dev kib-ev/laravel-ftp-deploy
On production with composer install --no-dev, the package is not installed.
Configuration
Copy the example file to your Laravel project root:
cp vendor/kib-ev/laravel-ftp-deploy/.ftp-deploy.example .ftp-deploy
.ftp-deploy:
host=ftp.example.com username=user password=secret port=21 root=/sites/example.com ssl=false passive=true
Add to your project .gitignore:
.ftp-deploy
Usage
php artisan deploy --file=public/index.php php artisan deploy --file=.env.production:.env php artisan deploy --dir=app/Http/Controllers
AI-assisted workflow (Cursor, etc.)
This package works well with AI-powered editors such as Cursor. After you change code locally, ask the agent to deploy only the modified files — no separate deployment pipeline required.
Example prompts:
- "Deploy the changed files to production via FTP"
- "Run
php artisan deployforroutes/web.phpandapp/Http/Controllers/OrderController.php" - "Upload
.env.productionas.envon the server"
The agent can run php artisan deploy --file=... for individual paths or --dir=... for whole directories. Credentials stay in your local .ftp-deploy file and are never committed to git.
Local development (path repository)
{
"repositories": [
{
"type": "path",
"url": "../laravel-ftp-deploy"
}
],
"require-dev": {
"kib-ev/laravel-ftp-deploy": "*"
}
}
License
MIT
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-13