Search by

hamforge / laravel-defaults

hamforge

Interactive development defaults for Laravel applications.

Package info

github.com/hamforge/laravel-defaults

Homepage

pkg:composer/hamforge/laravel-defaults

Fund package maintenance!

hamforge

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.2 2026-12-02 02:39 UTC

README

Laravel Defaults

Packagist PHP from Packagist Laravel versions GitHub Workflow Status (main) Total Downloads

An interactive Artisan command for applying Hamforge's development defaults in new and existing Laravel apps.

Built and maintained independently by hamforge in Australia.

Installation

Laravel Defaults requires Laravel 13 and PHP 8.5 or later in the PHP 8 series.

composer require --dev hamforge/laravel-defaults

Usage

Run php artisan hamforge:defaults from a Laravel application.

The command previews .gitignore defaults for local and sensitive files, dependencies and generated output, editors and operating systems, and AI tooling. It appends the proposed rules by category after confirmation and preserves existing lines and explicit exceptions. It compares literal patterns, so an existing broader wildcard may already cover a proposed rule. The baseline leaves .ai, .agents, and .github/skills available for project-owned instructions.

The package review shows which Composer and npm dependencies are declared directly, resolved through the lockfile, or missing. Select the packages to add, then confirm. The AWS SDK is a Composer application dependency. Development tools go into Composer's development requirements or npm's development dependencies. Selecting Filament adds the dependency. Panel setup is a separate step. When installing Tailwind Typography, Laravel Defaults adds a scoped npm override for postcss-selector-parser 6.1.5 to address GHSA-rj75-hqrm-r3gf. An existing scoped parser override is preserved.

When the corresponding tools are installed, the command offers their missing configuration files and scripts. Customized configs are shown for review, and alternate filenames and Prettier settings in package.json are recognized.

Tool Config Scripts
Pint pint.json —
Larastan phpstan.neon —
Rector rector.php —
ESLint eslint.config.mjs npm test:scripts
Prettier .prettierrc, .prettierignore npm lint, test:web

The shared Forge Composer workflow offers lint, test:type-coverage, test:lint, test:unit, test:types, test:types:max, and test. Each script is offered once its tools and any npm scripts it calls are available. The workflow also offers test:browser when tests/Browser exists. Blade linting requires a Pint version that supports --blade and the Prettier, Blade, and Tailwind CSS npm packages.

Existing script definitions, including aggregate test commands, are preserved. When a script conflicts, the preview shows its current and proposed definitions.

Use php artisan hamforge:defaults --no-interaction to preview without writing files.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Thank you for considering contributing to Laravel Defaults! Please review our contributing guide to get started.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

Laravel Defaults is open-sourced software licensed under the MIT license.