joserick/filament-devtool

A development tool for FilamentPHP

Maintainers

Package info

github.com/joserick/filament-devtool

pkg:composer/joserick/filament-devtool

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-06-13 10:38 UTC

This package is auto-updated.

Last update: 2026-06-14 02:30:20 UTC


README

Latest Version on Packagist License

Filament DevTool is an agile tool that enables the creation of FilamentPHP v5 components within Laravel packages under development. It replaces Filament's original make: commands with versions that generate code directly in the package's src/ structure instead of the Laravel application skeleton.

Features

  • ๐Ÿš€ All Filament make: commands rewritten for package development
  • ๐Ÿ“ฆ File generation in src/ using Orchestra Canvas
  • ๐Ÿณ Docker/Sail development environment included
  • ๐Ÿงช Integration with Orchestra Testbench for package testing
  • โšก No need for a full Laravel application to develop components

Requirements

  • PHP 8.3 or higher
  • Composer 2.2+
  • Docker (for the Sail development environment)

Installation

As a development dependency in your package

composer require --dev joserick/filament-devtool

The package will be automatically registered thanks to Laravel's package discovery.

Using the Sail/Docker development environment

Run the installation script directly with curl:

curl -s https://filament-devtool.joserick.com/install | bash

The install.sh script:

  1. Clones the joserick/filament-devtool repository
  2. Copies stubs/compose.stub to compose.yml
  3. Installs Composer dependencies using Docker
  4. Builds the Sail image for PHP 8.5
  5. Sets up permissions for the vendor/ directory

Once finished, start the containers:

cd filament-devtool && vendor/bin/sail up -d

Usage

Available commands

All Filament make: commands are available through Canvas. Run them using the canvas alias:

vendor/bin/sail php vendor/bin/canvas

Included commands

Command Description
make:filament-resource Creates a panel Resource
make:filament-page Creates a panel Page
make:filament-widget Creates a Widget
make:filament-cluster Creates a panel Cluster
make:filament-relation-manager Creates a Relation Manager
make:form-field Creates a form field
make:form Creates a form component
make:livewire-form Creates a Livewire form
make:rich-content-custom-block Creates a custom block for Rich Content
make:table-column Creates a table column
make:table Creates a table component
make:livewire-table Creates a Livewire table
make:infolist-entry Creates an Infolist entry
make:schema-component Creates a Schema component
make:schema Creates a Schema
make:livewire-schema Creates a Livewire Schema
make:filament-importer Creates an Importer
make:filament-exporter Creates an Exporter
make:filament-issue Creates an Issue

Examples

# Create a resource
vendor/bin/sail php vendor/bin/canvas make:filament-resource User

# Create a form field
vendor/bin/sail php vendor/bin/canvas make:form-field ColorPicker

# Create a page
vendor/bin/sail php vendor/bin/canvas make:filament-page Settings

Generated files are automatically placed in src/ following the package structure (canvas.yaml).

Recommended terminal aliases

Add these aliases to your ~/.bashrc or ~/.zshrc:

alias sail='vendor/bin/sail'
alias canvas='vendor/bin/sail php vendor/bin/canvas'
alias testbench='vendor/bin/sail php vendor/bin/testbench'

Testing

Run tests with Pest:

vendor/bin/sail php vendor/bin/pest

To run a specific test file:

vendor/bin/sail php vendor/bin/pest tests/Feature/MakeResourceCommandTest.php

Testbench

Use Testbench as an Artisan alias to interact with the Laravel skeleton application:

vendor/bin/sail php vendor/bin/testbench make:model User
vendor/bin/sail php vendor/bin/testbench migrate
vendor/bin/sail php vendor/bin/testbench route:list

Project structure

โ”œโ”€โ”€ src/                          # Package source code
โ”‚   โ”œโ”€โ”€ DevToolServiceProvider.php
โ”‚   โ””โ”€โ”€ Commands/                 # Rewritten make: commands
โ”‚       โ”œโ”€โ”€ MakeResourceCommand.php
โ”‚       โ”œโ”€โ”€ MakeFieldCommand.php
โ”‚       โ”œโ”€โ”€ MakeTableCommand.php
โ”‚       โ””โ”€โ”€ ...
โ”œโ”€โ”€ workbench/                    # Laravel skeleton app for testing
โ”‚   โ”œโ”€โ”€ app/
โ”‚   โ”œโ”€โ”€ database/
โ”‚   โ””โ”€โ”€ routes/
โ”œโ”€โ”€ vendor/                       # Dependencies
โ”œโ”€โ”€ canvas.yaml                   # Orchestra Canvas configuration
โ”œโ”€โ”€ testbench.yaml                # Orchestra Testbench configuration
โ”œโ”€โ”€ compose.yml                   # Docker Compose for Sail
โ””โ”€โ”€ install.sh                    # Installation script

License

MIT License ยฉ Joserick