Artisan Commands
netsons:install
Interactive setup wizard for configuring the deployment.
Usage
php artisan netsons:install [--strategy=ftp|git] [--force]Options
| Option | Description |
|---|---|
--strategy=ftp|git | Set the deployment strategy (skips interactive prompt) |
--force | Overwrite existing config and workflow files without asking |
--no-interaction | Run non-interactively (defaults to FTP if no strategy given) |
What it does
- Publishes
config/netsons-deploy.phpwith the selected strategy - Auto-detects env variables from
.env.example:- Secret-backed (DB_DATABASE, DB_PASSWORD, MAIL_, REDIS_PASSWORD, AWS_) — presented via multiselect
- Static (SESSION_DRIVER, LARAVEL_PDF_DRIVER, any project-specific key with a non-placeholder value) — presented via multiselect, then each value can be edited
- Prompts for build env vars, custom commands, Slack notifications, and envaudit
- Generates
.github/workflows/deploy.ymlwith all placeholders replaced - Displays required GitHub Secrets for the chosen strategy
- Displays required GitHub Variables
- Shows next steps
Workflow generation
The installer creates .github/workflows/deploy.yml from a stub template, replacing all placeholders with values derived from your config and netsons-deploy.json:
%%STRATEGY%%— the selected strategy (ftporgit)%%PHP_VERSION%%— derived from thephp_binaryconfig (e.g.,ea-php84becomes8.4)%%NODE_VERSION%%— defaults to22%%PACKAGE_MANAGER%%— defaults toyarn%%REMOTE_PHP%%— the remote PHP binary path from config%%RELEASES_KEEP%%— number of releases to keep from config%%FTP_SERVER_DIR%%— computed fromftp.root_pathconfig%%BUILD_ENV%%— build environment variables fromnetsons-deploy.json%%ENV_MAPPING_ENV_BLOCK%%— secret references fromnetsons-deploy.json%%ENV_MAPPING_SED_BLOCK%%— sed commands for env updates%%SEEDERS%%— first-deploy seeder commands from config%%CUSTOM_COMMANDS%%— custom artisan commands fromnetsons-deploy.json%%NOTIFICATIONS%%— Slack notification steps fromnetsons-deploy.json%%ENVAUDIT%%— envaudit validation step fromnetsons-deploy.json
If .github/workflows/deploy.yml already exists, it is preserved unless --force is used.
Switching strategies
To switch from FTP to Git:
php artisan netsons:install --strategy=git --forceThis overwrites the config file, regenerates the workflow, and updates the strategy default.
Re-running safely
Without --force, the installer will:
- Interactive mode — ask before overwriting an existing config
- Non-interactive mode — skip the config overwrite but still generate the workflow if missing
When reconfiguring netsons-deploy.json, the file is reset to defaults before collecting new values — this prevents stale entries from a previous configuration.
netsons:check
Shows your local configuration and deployment readiness.
Usage
php artisan netsons:checkOutput
The command displays:
- Configuration — local settings (strategy, SSH port, PHP binary, deploy path, releases keep)
- Workflow status — whether
.github/workflows/deploy.ymlexists - Required Secrets — GitHub secrets needed for the configured strategy
- Required Variables — GitHub variables needed
- Local validation — checks local config values (deploy path)
- Credentials reminder — note that SSH, FTP, and Git credentials are configured via GitHub Secrets/Variables, not locally
What it does NOT check
The check command does not validate SSH, FTP, or Git credentials. These values are stored as GitHub Secrets/Variables and are only available at deploy time in GitHub Actions. See GitHub Secrets for setup instructions.
netsons:env
Manage custom environment variables for deployment without editing the workflow manually.
Usage
php artisan netsons:env [action]Actions
| Action | Description |
|---|---|
list (default) | Show all configured variables |
add | Add a new variable (interactive) |
remove | Remove a variable (interactive) |
List variables
php artisan netsons:env# orphp artisan netsons:env listShows all configured variables grouped by type: secret-backed, static, build, custom commands, and notifications.
Add a variable
php artisan netsons:env addInteractive prompts guide you through:
- Variable type — Secret-backed (from GitHub Secrets), Static (fixed value), or Build (for asset build)
- Variable name — The
.envkey (e.g.,DB_PASSWORD) - Value or secret name — Depending on the type
If the variable already exists, you’ll be asked whether to update it.
Remove an item
php artisan netsons:env removeShows a list of all configured items — env variables (secret-backed, static, build), custom commands, and Slack notifications — and lets you pick which to remove. Select Cancel to abort.
After changes
After adding or removing variables, regenerate the workflow:
php artisan netsons:install --forceExamples
# Add a database password from GitHub Secretsphp artisan netsons:env add# → Secret-backed → DB_PASSWORD → DB_PASSWORD
# Add a static config valuephp artisan netsons:env add# → Static → SESSION_DRIVER → database
# Add a Vite build variablephp artisan netsons:env add# → Build → VITE_APP_NAME → My Application
# View all configured variablesphp artisan netsons:env list
# Remove a variablephp artisan netsons:env remove