Documentation Index
Fetch the complete documentation index at: https://kawax.biz/llms.txt
Use this file to discover all available pages before exploring further.
This article is based on source code research. Laravel Chisel is in early development with its v0.1 tag released in May 2026.
What is Laravel Chisel?
Laravel Chisel provides primitives for building post-install scripts that remove unwanted features from Laravel starter kits. Compatible starter kits include achisel.php script that defines the optional features and the file mutations needed to remove them.
Starter kits come bundled with many features, but not every project needs all of them. Chisel solves this by providing a way to interactively configure your project after installation — keeping only the features you need.
Why Is It Needed?
Laravel starter kits bundle many features together, but not all features are needed in every project. For example:- Projects that don’t need email verification
- Projects that don’t use passkey authentication
- Configurations that don’t need certain Livewire components
Defining a chisel.php Script
Starter kits that use Chisel place achisel.php file at the project root. This file defines which features are optional.
Script Definition Methods
| Method | Purpose |
|---|---|
Chisel::script($directory) | Create a script definition |
Question::multiselect(...) | Define a multiselect question |
questions([...]) | Set the script’s questions |
questions() | Retrieve the registered questions |
collectAnswers() | Begin collecting answers for registered questions |
apply($callback) | Register an unconditional mutation step |
selected($key, $value, then:, else:) | Branch on a multiselect answer |
selectedAny($key, $values, then:, else:) | Branch when any of the given values are selected |
selectedAll($key, $values, then:, else:) | Branch when all of the given values are selected |
chisel($answers) | Execute the registered mutations |
Collecting Answers
collectAnswers() returns a pending answer collector. All methods are fluent and can be called in any order. When non-interactive, defaults are used automatically.
An external Artisan command uses Laravel Prompts to display the prompts and pass the answers to Chisel.
| Method | Purpose |
|---|---|
onQuestion($callback) | Handle question prompts |
interactive($interactive) | Configure whether missing answers are prompted interactively |
withAnswers($answers) | Provide pre-collected answers to skip prompting |
File Mutations
file($path) targets a single file. files(...$paths) targets multiple files.
| Method | Purpose |
|---|---|
replace($search, $replace) | Replace a string |
removeLinesContaining($content) | Remove lines containing a string |
removeSectionMarkers($tag) | Strip section markers, keep the content |
removeSection($tag) | Remove section markers and the content inside them |
delete() | Delete the targeted files |
PHP AST-Based Mutations
php($path) provides AST-based edits. Changes are saved automatically when the object is destroyed.
| Method | Purpose |
|---|---|
removeImport($class) | Remove a use statement |
removeTrait($trait) | Remove a trait usage from the class |
removeInterface($interface) | Remove an implemented interface |
Section Markers
Wrap optional code in comment pairs:removeSectionMarkers('passkeys')— removes the markers, keeps the coderemoveSection('passkeys')— removes both the markers and the content
chisel- marker prefix is added automatically.
npm Support
| Method | Purpose |
|---|---|
npm()->install() | Install dependencies using the detected package manager |
npm()->run($script, ...$arguments) | Run a package manager script |
npm()->remove(...$packages) | Remove packages using the detected package manager |
npm() method detects npm, yarn, pnpm, and bun automatically.
Current Status
- GitHub Repository: laravel/chisel
- Release: v0.1 (published May 2026)
- Development history: 3 months of private development before public release
laravel/chisel Repository
Source code and the latest API reference.
Laravel Starter Kits Official Documentation
For how to use the starter kits themselves, refer to the official documentation.