stolt/lean-package-validator
CLI tool to validate a project or micro-package for “leanness” by ensuring common repo artifacts are excluded from release archives. Also creates, updates, and reformats .gitattributes export-ignore entries for lean distribution packages.
.gitignore, .idea/, vendor/) to reduce package size and improve maintainability.Adopt if:
.gitattributes.composer validate or scripts.Look elsewhere if:
For Executives: "This tool automates the enforcement of 'lean' package releases—reducing artifact bloat by 30–50% in our PHP/Laravel projects. It integrates seamlessly with CI/CD (e.g., GitHub Actions) and prevents dev files from leaking into production releases, cutting maintenance overhead and improving security. Think of it as a 'lint' for your package structure—catching issues before they hit users."
For Engineering:
*"The lean-package-validator (LPV) is a CLI/library that:
.gitattributes against a preset of dev artifacts (e.g., .idea/, vendor/) or custom glob patterns..gitattributes if missing (with --create).composer validate-gitattributes) or GitHub Actions.composer.json to block bloated releases:{
"scripts": {
"validate-gitattributes": "lean-package-validator validate"
}
}
Key benefit: Zero false positives—it’s deterministic and configurable for any language."*
How can I help you explore Laravel packages today?