Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Chisel Laravel Package

laravel/chisel

Laravel Chisel provides primitives for starter-kit post-install scripts, letting users opt into features and automatically remove unwanted code. Define a chisel.php with questions and file/PHP mutations to prune sections, imports, interfaces, and config.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Modular Laravel Starter Kits: Enables the creation of feature-optional Laravel applications (e.g., Jetstream/Breeze) where users can disable unused components (auth, queues, notifications) during installation, reducing technical debt and improving maintainability.
  • Developer Experience (DX) Optimization: Supports interactive, guided onboarding by allowing teams to build self-service Laravel templates where users select only the features they need, aligning with the "less is more" principle.
  • Roadmap for Laravel Installer: Provides the foundation for a next-gen laravel new command with built-in feature pruning (e.g., laravel new my-app --features=auth,api). This could become a standard part of Laravel’s ecosystem.
  • Build vs. Buy Decision: Avoids reinventing file/dependency cleanup logic (e.g., custom shell scripts, regex-based solutions). Chisel’s AST-based PHP edits and npm integration are more robust and maintainable than ad-hoc approaches.
  • Use Cases:
    • SaaS Platforms: Offer customizable Laravel templates where users opt into only the features they need (e.g., queues, notifications, passkeys).
    • Internal Tooling: Standardize project templates (e.g., git clone --template) with Chisel-driven cleanup to ensure consistency across teams.
    • Education: Teach intentional code removal best practices (e.g., disabling debug tools in production) by demonstrating how to use Chisel in tutorials.
    • Open-Source Projects: Allow contributors to prune unused dependencies from monorepos or large-scale applications without manual intervention.

When to Consider This Package

  • Adopt if:

    • Your team maintains Laravel starter kits (e.g., Jetstream, Breeze, Forge) and wants to automate feature removal during composer create-project or a custom installer.
    • You need safe, AST-based PHP edits (e.g., removing traits, interfaces, or imports) or section-based JSX cleanup (e.g., conditional UI blocks).
    • Your workflow involves npm/yarn/pnpm/bun and requires conditional dependency removal (e.g., uninstalling unused packages like laravel-notification-channels-slack).
    • You prioritize developer experience and want to reduce cognitive load by eliminating unused code/files during setup.
    • You’re building a Laravel-based scaffold tool (e.g., a CLI or GUI installer) and need a reliable way to handle feature toggling.
  • Look elsewhere if:

    • Your project uses non-PHP/Laravel stacks (Chisel is Laravel-centric and relies on Laravel’s ecosystem).
    • You need GUI-based feature toggling (e.g., Laravel Nova’s UI). Chisel is CLI/interactive-prompt driven and designed for one-time setup, not runtime toggles.
    • Your cleanup logic is trivial (e.g., rm -rf unused_dir). For simple cases, a shell script or basic sed/awk commands may suffice.
    • You require versioned feature flags (e.g., "Remove this in v2"). Chisel is optimized for one-time pruning during installation, not dynamic feature management.
    • Your team lacks PHP/Laravel expertise to maintain or extend Chisel’s functionality (e.g., custom question types, new mutation methods).

How to Pitch It (Stakeholders)

For Executives:

*"Chisel is a game-changer for how we ship Laravel applications. Right now, when developers install a starter kit like Jetstream, they’re forced to deal with unused code, dependencies, and config—adding noise, complexity, and even security risks. With Chisel, we can automatically remove what they don’t need during setup, so they start with a lean, focused codebase.

Why this matters:

  • Faster onboarding: Developers spend less time cleaning up and more time building.
  • Lower costs: Smaller deployments mean reduced cloud bills and fewer security scans.
  • Happier customers: No more confusion from irrelevant features or config options.

Example: If a user doesn’t need email verification, Chisel can delete the MustVerifyEmail interface, related test files, and even UI components—all in one step. This isn’t just about cleanup; it’s about delivering the right tool for the job from day one.

Ask: Should we integrate Chisel into our Laravel installer or starter kit workflows to give our users a best-in-class experience?"*


For Engineering:

*"Chisel solves a painful problem in Laravel development: starter kit bloat. Right now, if you install Jetstream or Breeze, you get everything—even features you’ll never use. Chisel lets us flip that model by making features optional during setup.

How it works:

  1. Define questions in chisel.php (e.g., ‘Enable queues?’, ‘Use passkeys?’).
  2. Branch logic based on answers (e.g., if email-verification is disabled, remove the interface, tests, and UI).
  3. Leverage AST-based edits for safe PHP refactoring (no more broken imports).
  4. Integrate with npm/yarn/pnpm to remove unused dependencies automatically.

Key advantages over alternatives:

  • Safer than shell scripts: Uses PHP’s AST parser to modify code without breaking imports or syntax.
  • More flexible than regex: Supports section-based removal (e.g., /* @chisel-passkeys */ blocks in JSX).
  • Interactive by default: Works with Laravel Prompts for a user-friendly CLI experience.

Use cases we’re targeting:

  • Custom installers: Build a laravel new command with feature pruning.
  • Internal templates: Standardize project setups with Chisel-driven cleanup.
  • Open-source contributions: Let users opt out of heavy features (e.g., Horizon, Telescope) during install.

Ask: Should we adopt Chisel for [Project X], and if so, how can we extend it to support our specific needs (e.g., custom question types, new mutation methods)?"*


For Product Managers:

*"Chisel aligns with our ‘developer-first’ strategy by reducing friction in the Laravel onboarding process. Here’s how it fits into our roadmap:

  1. Short-term: Use Chisel to clean up our starter kits (e.g., Jetstream, Forge) so users get only what they need out of the box.
  2. Mid-term: Integrate Chisel into a new laravel new command with interactive feature selection (e.g., ‘Do you need auth? Queues? API resources?’).
  3. Long-term: Explore Chisel as a standard tool in the Laravel ecosystem, potentially partnering with Taylor Otwell’s team to include it in core Laravel tools.

Metrics to track:

  • Developer satisfaction: Fewer support requests about ‘unused code’ or ‘broken imports’.
  • Onboarding time: Faster time-to-first-deployment for new Laravel projects.
  • Codebase health: Smaller, leaner repos with fewer unused dependencies.

Next steps:

  • Evaluate Chisel’s fit for our current workflows (e.g., Jetstream, Breeze).
  • Prototype a custom installer using Chisel to test its impact on DX.
  • Assess maintenance overhead: Will we need to extend Chisel, or does it cover 80% of our needs out of the box?"*
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
sentix/ai-chatbot
terminal42/code-quality-tools
codifyo/ts-generator-bundle
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky