- textstem:post-install
- textstem:refresh-assets
- textstem:publish-jetstream-views
- textstem:dbseed
- textstem:make:pagecomponent {name}
- textstem:make:tool {name}
- textstem:make:module {name}
- textstem:make:collection {name} [--wc]
- textstem:make:dashboardwidget {name}
- textstem:make:templatecommand {name}
- textstem:export-component [name] [--all] [--output=]
- textstem:export-tool {name} [--output=]
- textstem:health-check [--notify]
- textstem:sitemap:generate
- textstem:prune-reports [--dry-run]
- textstem:normalize-asset-paths [--dry-run] [--force]
- textstem:clear-snapshot-throttles [--type=] [--id=]
- textstem:maintenance-schedule
Artisan Commands
This package registers the following Artisan commands. All commands are available after the package is installed.
Setup & Installation
textstem:post-install
Interactive wizard to run after first installing the package. Prompts to select an installation type (vanilla, Jetstream with Livewire, or Jetstream with Inertia) and then publishes config, components, JS/CSS assets, and Jetstream views.
php artisan textstem:post-install
textstem:refresh-assets
Clears the published JS/CSS files from public/vendor/medialight/textstem/ and republishes them from the package. Also ensures required resources/views/wrangler/ subdirectories exist and that the default page view and Prose component views are in place.
Run this after upgrading the package.
php artisan textstem:refresh-assets
textstem:publish-jetstream-views
Force-publishes Jetstream views to the host application. Useful when Jetstream views need to be refreshed separately from a full post-install.
php artisan textstem:publish-jetstream-views
textstem:dbseed
Seeds the database with sample data using the package's DatabaseSeeder.
php artisan textstem:dbseed
Code Generators
textstem:make:pagecomponent {name}
Scaffolds a new Wrangler page component. Creates the component class in app/Wrangler/Components/ and copies the sample view templates into resources/views/wrangler/components/{name}/.
php artisan textstem:make:pagecomponent HeroBlock
php artisan textstem:make:pagecomponent ImageGallery
Files created:
app/Wrangler/Components/HeroBlock.phpresources/views/wrangler/components/hero-block/(sample views)
textstem:make:tool {name}
Scaffolds a new admin panel tool. Creates the tool class in app/Tools/ and a default view in resources/views/wrangler/tools/{name}/.
php artisan textstem:make:tool MyCustomTool
Files created:
app/Tools/MyCustomTool.phpresources/views/wrangler/tools/my-custom-tool/default.blade.php
The new tool will automatically appear at /textstem/tools/{name}.
textstem:make:module {name}
Scaffolds a full CRUD module including a model, controller, policy, store/update form requests, views, a Livewire data table, and domain action/filter config builders.
php artisan textstem:make:module Products
Files created:
app/Models/Product.phpapp/Http/Controllers/ProductController.phpapp/Policies/ProductPolicy.phpapp/Http/Requests/ProductStoreRequest.phpapp/Http/Requests/ProductUpdateRequest.phpapp/Livewire/Tables/ProductTable.phpapp/Domain/Products/Config/ProductActionBuilder.phpapp/Domain/Products/Config/ProductFilterBuilder.phpresources/views/admin/products/(index, create, edit, form-inputs views)
The command will prompt before overwriting any file that already exists.
textstem:make:collection {name} [--wc]
Scaffolds a new content collection. With the --wc flag, also creates an associated Wrangler component and view templates.
php artisan textstem:make:collection Events
php artisan textstem:make:collection Events --wc
textstem:make:dashboardwidget {name}
Scaffolds a new Livewire dashboard widget. Creates the component class under app/Livewire/DashboardWidgets/ and a default view under resources/views/livewire/dashboard-widgets/{name}/.
php artisan textstem:make:dashboardwidget RecentActivity
textstem:make:templatecommand {name}
Scaffolds a new Wrangler template command (a Blade directive usable within Wrangler page templates). Creates the class under app/Wrangler/TemplateCommands/ and copies the sample view into resources/views/wrangler/template-commands/{name}/.
php artisan textstem:make:templatecommand LatestPosts
Export
textstem:export-component [name] [--all] [--output=]
Exports a Wrangler page component to a ZIP file. The ZIP contains the component class and its view directory, suitable for importing via the Component Manager tool.
If name is omitted, an interactive list of available components is shown.
# Interactive selection
php artisan textstem:export-component
# Export a specific component
php artisan textstem:export-component HeroBlock
# Export all app components as individual ZIPs
php artisan textstem:export-component --all
# Custom output directory
php artisan textstem:export-component HeroBlock --output=/tmp/exports
Only components in app/Wrangler/Components/ are listed and exported (not package-bundled components).
Output defaults to storage/app/exports/{ComponentName}.zip.
textstem:export-tool {name} [--output=]
Exports an admin tool to a ZIP file suitable for importing via the Install Tool page at /textstem/tools/install.
The name is normalised â my-tool, MyTool, and my_tool all resolve to MyTool.
php artisan textstem:export-tool MyCustomTool
php artisan textstem:export-tool my-custom-tool
php artisan textstem:export-tool MyCustomTool --output=/tmp
ZIP structure produced:
MyCustomTool.php â tool class (placed at app/Tools/ on import)
view/
default.blade.php â views (placed at resources/views/wrangler/tools/my-custom-tool/ on import)
Only tools in app/Tools/ can be exported. If the tool has associated Livewire components or other app files, add them manually under an install/ directory in the ZIP before distributing (e.g. install/app/Livewire/MyComponent.php). These will be copied to the matching project path on import.
Output defaults to storage/app/exports/{ToolName}.zip.
Maintenance
textstem:health-check [--notify]
Checks the health of the application and displays a status table. Checks performed:
| Check | What is verified |
|---|---|
| Database | Connection can be established |
| Cache | Write and read a test value |
| Storage | Write, read, and delete a test file |
| Disk space | Warns if storage partition is >90% full |
| PHP version | PHP ⥠8.1 is installed |
With --notify, logs failure details (email notification requires ERROR_NOTIFICATION_EMAIL to be set in .env).
php artisan textstem:health-check
php artisan textstem:health-check --notify
textstem:sitemap:generate
Crawls the site (up to depth 2, ignoring robots.txt) and writes a sitemap to public/sitemap.xml. Uses the spatie/laravel-sitemap package.
php artisan textstem:sitemap:generate
textstem:prune-reports [--dry-run]
Deletes old accessibility and SEO reports from the database according to the retention period configured in each service. Use --dry-run to preview what would be deleted without making any changes.
php artisan textstem:prune-reports
php artisan textstem:prune-reports --dry-run
textstem:normalize-asset-paths [--dry-run] [--force]
Scans the assets table for records storing full server paths (e.g. /var/www/..., /home/..., or paths containing storage/app/) and normalises them to relative paths. Use --dry-run to preview changes. Without --force, the command will ask for confirmation before applying updates.
php artisan textstem:normalize-asset-paths
php artisan textstem:normalize-asset-paths --dry-run
php artisan textstem:normalize-asset-paths --force
textstem:clear-snapshot-throttles [--type=] [--id=]
Clears version snapshot throttles so that a new snapshot can be created immediately, bypassing the normal throttle window.
# Clear all throttles
php artisan textstem:clear-snapshot-throttles
# Clear throttle for a specific page or component
php artisan textstem:clear-snapshot-throttles --type=page --id=42
php artisan textstem:clear-snapshot-throttles --type=component --id=7
Note: this command exists in the package but is not registered by default. Add it to your
app/Console/Kernel.phpcommands array if needed.
textstem:maintenance-schedule
Displays the recommended maintenance schedule for the package with ready-to-paste code for app/Console/Kernel.php. Does not execute any tasks itself.
php artisan textstem:maintenance-schedule
The output includes recommended daily, weekly, and monthly tasks covering health checks, sitemap generation, report pruning, cache management, and queue maintenance.
Scheduling
The following commands are well suited for scheduling. A suggested configuration for app/Console/Kernel.php:
// Daily
$schedule->command('textstem:health-check --notify')->daily()->at('01:00');
$schedule->command('textstem:sitemap:generate')->daily()->at('02:00');
$schedule->command('textstem:prune-reports')->daily()->at('03:00');
// Weekly
$schedule->command('queue:flush')->weekly()->sundays()->at('00:30');
// On demand / after deploy
// php artisan textstem:refresh-assets
Run php artisan textstem:maintenance-schedule for the full recommended schedule.