Debug and manage Laravel applications in production via Laravel Forge CLI and direct SSH. Activates when the user mentions production logs, debug production, forge, check production, run on server, production database, deploy, SSH to production, server logs, remote artisan, production error, or tinker production.
View on GitHubplugins/forge-cli/skills/forge/SKILL.md
February 1, 2026
Select agents to install to:
npx add-skill https://github.com/thecrazybob/claude-code-plugins/blob/main/plugins/forge-cli/skills/forge/SKILL.md -a claude-code --skill forge-cliInstallation paths:
.claude/skills/forge-cli/# Laravel Forge CLI
## Overview
Laravel Forge CLI allows managing Forge-provisioned servers from the command line. Use it for debugging production issues, checking logs, and running safe read-only commands.
## Setup
```bash
# Install globally
composer global require laravel/forge-cli
# Authenticate (opens browser)
forge login
# List available servers/sites
forge server:list
forge site:list
```
### PHP 8.4 Deprecation Warnings
Forge CLI triggers deprecation warnings with PHP 8.4. Create an alias to suppress them:
```bash
# Add to ~/.zshrc or ~/.bashrc
alias forge='php -d error_reporting="E_ALL & ~E_DEPRECATED" $(which forge)'
```
## Safe Read-Only Commands
These commands are safe to run without confirmation:
### View Logs
```bash
# Application logs (Laravel logs)
forge site:logs <site>
# Deployment logs
forge deploy:logs <site>
# PHP-FPM logs
forge php:logs
# Nginx logs
forge nginx:logs
```
### Status Checks
```bash
forge php:status
forge nginx:status
forge database:status
forge server:list
forge site:list
```
### Site Information
```bash
forge site:info <site>
```
## Direct SSH (Recommended for Complex Tasks)
The `forge command` subcommand has a known bug ("Event unresolvable"). Use direct SSH instead:
### Get Server IP
```bash
forge server:list
# Note the IP address for your server
```
### Run Remote Commands
```bash
# Basic structure
ssh forge@<server-ip> "cd /home/forge/<site>/current && <command>"
# Examples:
# Check PHP version
ssh forge@<ip> "php -v"
# Run artisan commands (read-only)
ssh forge@<ip> "cd /home/forge/<site>/current && php artisan --version"
ssh forge@<ip> "cd /home/forge/<site>/current && php artisan route:list"
ssh forge@<ip> "cd /home/forge/<site>/current && php artisan config:show app"
# Check queue status
ssh forge@<ip> "cd /home/forge/<site>/current && php artisan queue:monitor"
# View recent logs
ssh forge@<ip> "tail -100 /home/forge/<site>/current/storage/logs/laravel.log"
```
### Tinker (Read-Only Queries)
Issues Found: