Getting started
Running LaraBeacon
The command discovers applicable analyzers, executes them in the current Laravel application, prints category totals, and exits with a status your release process can use.
Run every applicable check
php artisan larabeaconThe summary separates performance, security, and reliability. A failed or errored analyzer returns exit code 1 unless it has been excluded from reporting; a clean run returns 0.
Show finding details
php artisan larabeacon --detailsDetailed output includes paths, line numbers, and analyzer messages where the check can identify them. Add --show-exceptions when diagnosing an analyzer error itself.
Run selected analyzers
Pass one or more fully qualified analyzer class names after the command.
php artisan larabeacon \
'BaerSoftware\LaraBeacon\Analyzers\Security\CSRFAnalyzer'This is useful while remediating one finding. A full scan should still run before release.
CI mode
php artisan larabeacon --ci --detailsCI mode skips analyzers listed in ci_mode_exclude_analyzers. Use it for deterministic pipeline checks, then run environment-dependent analyzers against a representative release candidate.
Create a baseline
After reviewing the current findings, write them to the published configuration:
php artisan larabeacon:baseline --ciThe command resets existing ignored errors before rebuilding the baseline. Review and commit the resulting config/larabeacon.php change so accepted risk has an owner and history.
Local reports and repair guidance
These workflows require LaraBeacon Core 3.1.0 or newer.
php artisan larabeacon --profile=local --details
php artisan larabeacon --profile=ci --format=markdown --output=larabeacon.md
php artisan larabeacon --format=json --fix-preview --output=larabeacon.jsonDetailed findings include risk, confidence, recommended changes and verification. Markdown reports can give a coding agent a scoped repair task; always review the result. JSON and SARIF support other tools without a Cloud account. Source snippets and stack traces are excluded from local reports.
Fix previews show diffs for supported deterministic cases and never edit files. The initial rules cover literal production debug configuration and environment lookups with one unambiguous configuration mapping.
Use --profile=production --preflight to inspect the booted environment before a full runtime scan. The profile requires an actual production-like configuration and does not change APP_ENV. Preflight does not contact or verify runtime services.
Command options
| Option | Purpose |
|---|---|
--profile=local|ci|production | Select checks for the actual environment. |
--preflight | Describe scan prerequisites without running analyzers. |
--format=json|markdown|sarif | Export local findings and remediation guidance. |
--output=<file> | Write a structured report to a file instead of stdout. |
--baseline=<file> --only-new | Gate findings not covered by a current acceptance entry. |
--fail-on=major | Block major and critical findings; execution errors still block. |
--fix-preview | Show reviewable diffs for supported deterministic fixes. |
--branch=<name> | Separate Cloud report history by supplied branch. |
--details | Print detailed output for failed checks. |
--ci | Apply the CI analyzer filter and retain deterministic exit behavior. |
--show-exceptions | Print analyzer exception stack traces in the local terminal. |
--report | Submit this run to a configured LaraBeacon Cloud endpoint. |
--hash=<sha> | Attach an explicit commit identifier to a Cloud report. |
--issue=<number> | Attach a pull-request or issue number to a Cloud report. |
--review | Mark the submitted report as requesting a repository review. |