Artisan Commands
The Noerd Framework provides the following Artisan commands.
In addition, every installed app module ships its own noerd:install-{module} and noerd:update-{module} commands — both generated by the noerd:make-module scaffolder, see Creating Modules. noerd:update-all runs all of them at once.
Overview
Installation & Maintenance
| Command | Description |
|---|---|
noerd:install | Install noerd: publish the setup app configs, config and assets, then migrate and create the first admin |
noerd:update | Refresh the published setup app configs, config/noerd.php, frontend scaffold and public assets — no migration, no prompts for tenant or admin |
noerd:update-all | Run noerd:update and every installed module's noerd:update-{module} command |
noerd:demo | Install demo data (models, migrations, views, configs, routes) |
noerd:publish-home | Publish the noerd-apps view for customization |
noerd:info | Display the current Noerd version |
Users, Tenants & Apps
| Command | Description |
|---|---|
noerd:make-admin-user | Create a new user and make them an admin |
noerd:promote-admin | Give an existing user the admin profile on all their tenants |
noerd:super-admin | Grant or revoke the installation-wide super admin flag of a user |
noerd:make-tenant | Create a new tenant |
noerd:make-app | Create a new app (TenantApp) with its own dashboard that can be assigned to tenants |
noerd:assign-apps-to-tenant | Assign apps to a tenant with interactive selection |
Scaffolding
| Command | Description |
|---|---|
noerd:make-module | Create a new module with complete directory structure |
noerd:make-resource | Generate list + detail Blade and YAML files from an existing Eloquent model |
noerd:make-list | Generate a list Blade file from an existing Eloquent model |
noerd:make-detail | Generate a detail Blade file with YAML from model columns |
noerd:make-page | Generate a standalone page Blade file (no model required) |
noerd:make-dashboard | Generate a dashboard Blade file for an app |
noerd:make-collection | Create a new collection YML file interactively |
noerd:make-theme | Scaffold a new form theme by copying the default theme folder |
Setup Collections
| Command | Description |
|---|---|
noerd:setup-collections:import-yaml | Import setup collection definitions from YAML into the database |
noerd:setup-collections:export-yaml | Export setup collection definitions from the database as YAML |
noerd:install
Installs the Noerd Framework and performs basic configuration: publishes the setup app configs, config/noerd.php and the frontend files, patches config/livewire.php, publishes the public assets, runs the migrations, creates the default tenant and the first admin user and optionally installs the demo app (see Installation).
php artisan noerd:install
# non-interactive (CI / deploy)
php artisan noerd:install --force --migrate --build --demo --no-interaction| Option | Description |
|---|---|
--force | Overwrite existing files without asking |
--migrate | Run the migrations without asking — required to migrate in non-interactive runs; forwarded to noerd:demo as --migrate --seed |
--build | Run npm run build without asking — required to build in non-interactive runs |
--demo | Install the demo app without asking — required to install it in non-interactive runs |
Run by a module install command on a fresh project (noerd:install-cms), the base installation skips the demo app question, hands npm install / npm run build to that command and prints no closing callout — see Creating Modules.
The public assets (fonts + built Vite bundle) can also be republished on their own with php artisan vendor:publish --tag=noerd-assets.
noerd:update
Updates noerd content files without running the full installation setup: republishes the setup app configs, config/noerd.php, the frontend scaffold and the public assets (public/vendor/noerd). Run it after every package upgrade (or noerd:update-all to include the modules).
php artisan noerd:update| Option | Description |
|---|---|
--force | Overwrite existing files without asking |
--build | Run npm build after update |
noerd:update-all
Refreshes a project after pulling new module versions: runs noerd:update and the noerd:update-{module} command of every installed module in one go.
php artisan noerd:update-all --force| Option | Description |
|---|---|
--force | Overwrite existing files without asking (forwarded to every sub-command) |
--build | Run npm build — applies to noerd:update only, no module command defines it |
--except= | Skip a command; module key or full name (--except=inventory, --except=noerd:update). Repeatable |
Run order: noerd:update → the module updates alphabetically → commands implementing Noerd\Contracts\RunsAfterModuleUpdates last — the marker interface for a module update that touches what the core publishes (e.g. re-adding its entries to app-configs/setup/navigation.yml, which noerd:update --force rewrites from the core template).
Discovery is dynamic: every command named noerd:update-{module} that is registered by a loaded service provider takes part — nothing is hardcoded, so a newly installed module is picked up automatically and a module that is not installed is simply absent.
Without --force every sub-command asks per existing file (default: skip), so the command warns and asks once up front whether to proceed. Combined with --no-interaction all existing files are skipped and only missing files are copied — a useful "top up a fresh checkout" mode.
noerd:update --forcedoes more than copy YAML: it also overwritesconfig/noerd.php, scaffolds the missing frontend files (see Installation), runsnpm installfor any dependency it added. Use--except=noerd:updateto leave the core step out.
Failures do not abort the run. Every command is executed, a summary table lists each one as updated, failed or skipped, and the exit code is non-zero if any of them failed.
noerd:demo
Installs demo data into your project. This publishes a fully working Demo Customers app with model, migration, Blade components, YAML configuration, navigation, and routes. The demo app is automatically registered as a TenantApp and assigned to all tenants.
php artisan noerd:demo| Option | Description |
|---|---|
--force | Overwrite existing files |
--migrate | Run the migrations — required to migrate in non-interactive runs (interactive runs ask) |
--seed | Seed the demo data — required to seed in non-interactive runs (interactive runs ask) |
This command is also offered during noerd:install (which forwards its own --migrate as --migrate --seed). It can be run independently at any time.
noerd:publish-home
Publishes the noerd-apps dashboard view into the project so it can be customized (e.g. to embed dashboard widgets).
php artisan noerd:publish-home| Option | Description |
|---|---|
--force | Overwrite existing file |
noerd:info
Displays the currently installed Noerd version.
php artisan noerd:infonoerd:make-admin-user
Creates a new user and makes them an administrator. Use noerd:promote-admin to give an account that already exists the admin profile.
php artisan noerd:make-admin-user| Option | Description |
|---|---|
--name= | The name of the user |
--email= | The email of the user |
--password= | The password of the user |
--super-admin | Mark this user as super admin |
noerd:promote-admin
Promotes an existing user to administrator by giving them the admin profile on all their tenants. It creates nothing — noerd:make-admin-user is the command that creates an account.
php artisan noerd:promote-admin {user_id}| Argument | Description |
|---|---|
user_id | The ID of the user to promote |
noerd:super-admin
Grants or revokes the installation-wide super admin flag (see Permissions → Super admin). The flag is $guarded on the model and not editable from any screen, so the console is the only way in — and out.
php artisan noerd:super-admin {user} # grant — {user} is an ID or an email
php artisan noerd:super-admin {user} --revoke # withdraw| Option | Description |
|---|---|
--revoke | Withdraw the super admin flag instead of granting it |
--force | Revoke even when the user is the last super admin of the installation (refused otherwise) |
noerd:make-tenant
Creates a new tenant (a single tenants row; profiles are hardcoded, see Permissions).
php artisan noerd:make-tenant| Option | Description |
|---|---|
--name= | The name of the tenant |
--default | Use "Default" as the tenant name |
noerd:make-app
Creates a new app (TenantApp) with its own dashboard, in the project or as a module under app-modules/{app}. Without options it runs as an interactive wizard — see Create an App for the flow.
php artisan noerd:make-app| Option | Description |
|---|---|
--title= | The display title of the app |
--name= | The unique name identifier of the app (uppercase) |
--icon= | The heroicon of the app, in the stored form heroicon:outline:{name} (e.g. heroicon:outline:users); the wizard offers a searchable Heroicon picker. In --module mode a bare name (users) is accepted too and normalized |
--route= | Open an existing route (e.g. inventory.index) instead of generating a dashboard (project only) |
--active=1 | Whether the app is active (1 or 0; project only) |
--module | Scaffold the app as a module in app-modules/{app} instead of the project root |
noerd:assign-apps-to-tenant
Assigns apps to a tenant with interactive selection.
php artisan noerd:assign-apps-to-tenant| Option | Description |
|---|---|
--tenant-id= | The ID of the tenant to assign apps to |
noerd:make-module
Scaffolds a module under app-modules/{module} (dashboard, routes, navigation, install/update commands, ServiceProvider — no model). noerd:make-app uses it for the module mode. See Creating Modules for the generated structure and the install flow.
php artisan noerd:make-module
# or with module name
php artisan noerd:make-module inventory
# fully scripted
php artisan noerd:make-module inventory --title="Inventory" --icon=cube| Argument / Option | Description |
|---|---|
name | (optional) The name of the module in kebab-case (e.g. inventory); asked interactively when omitted |
--title= | The display title of the tenant app (default: the module name as a headline) |
--icon= | The heroicon of the tenant app, as a bare name (cube) or in the stored form heroicon:outline:cube; the wizard offers a searchable Heroicon picker. Required in non-interactive runs |
--no-hints | Do not print the next steps (noerd:make-app runs them itself) |
The generated noerd:install-{module} command accepts --force, --migrate, --build and --scaffold (the silent run noerd:make-app uses: only the tenant assignment is asked).
noerd:make-resource
Generates list and detail Blade components along with their YAML configuration files from an existing Eloquent model. The command reads the model's database columns and automatically maps them to appropriate YAML field types.
# With full namespace
php artisan noerd:make-resource "App\Models\Invoice"
# Short name (resolves via the configured module search, see noerd.generators)
php artisan noerd:make-resource Invoice
# Module model, app preselected
php artisan noerd:make-resource "Modules\Inventory\Models\Item" --app=inventory| Argument / Option | Description |
|---|---|
model | The model class name (short name or FQCN) |
--app= | App name (e.g. inventory) — skips the interactive app selection |
What it generates
The command creates four files:
| File | Location |
|---|---|
| List Blade | resources/views/components/{entities}-list.blade.php |
| Detail Blade | resources/views/components/{entity}-detail.blade.php |
| List YAML | app-configs/{app}/lists/{entities}-list.yml |
| Detail YAML | app-configs/{app}/details/{entity}-detail.yml |
Additional actions
- Routes — Appends list and detail routes to
routes/web.php, wrapped inRoute::middleware(['noerd', 'app-access:{app}']); the list is annotated with the detail route so rows open as route modals - Navigation — Adds a navigation entry to
app-configs/{app}/navigation.yml
Module apps
When the app is a module (app-modules/{app}/composer.json exists), every noerd:make-* generator writes into the module instead of the project root — see Creating Modules.
Interactive app selection
Without --app=, the command prompts you to select which app the resource belongs to from all active entries in tenant_apps. The module name is auto-detected from the model's namespace via composer.json autoload mappings. Short model names are resolved through noerd.generators.search_modules / noerd.generators.modules_path.
Database column type mapping
Columns id, tenant_id, created_at, updated_at, and deleted_at are excluded. The remaining columns are mapped by their database type:
| Database type | Detail field type | List column type |
|---|---|---|
varchar, string, char | text | text |
text, longtext, mediumtext | textarea | text |
tinyint, boolean | checkbox | bool |
integer, bigint, smallint, decimal, float, double | number | number |
date | date | date |
datetime, timestamp | datetime | datetime |
json | textarea | — |
The generated list YAML contains at most 8 columns.
noerd:make-list
Generates only the list Blade file (plus YAML) from an existing Eloquent model, appends the list route to routes/web.php and adds the navigation entry to app-configs/{app}/navigation.yml.
php artisan noerd:make-list "App\Models\Invoice"| Option | Description |
|---|---|
--app= | App name (e.g. inventory) — skips the interactive app selection |
noerd:make-detail
Generates only the detail Blade file with YAML from the model columns and appends the detail route to routes/web.php.
php artisan noerd:make-detail "App\Models\Invoice"| Option | Description |
|---|---|
--app= | App name (e.g. inventory) — skips the interactive app selection |
noerd:make-page
Generates a standalone page Blade file plus its page YAML (app-configs/{app}/pages/{name}-page.yml), appends the page route to routes/web.php (inside Route::middleware(['noerd', 'app-access:{app}'])) and adds a navigation entry. No model is required — use this for settings screens or custom pages.
php artisan noerd:make-page sent-mails --app=inventory| Argument / Option | Description |
|---|---|
name | Page name in kebab-case (e.g. sent-mails) |
--app= | App name (e.g. inventory) — skips the interactive app selection |
noerd:make-dashboard
Generates a dashboard Blade file for an app (resources/views/components/{app}-dashboard.blade.php), adds the {app}.dashboard route to routes/web.php (inside the noerd + app-access:{app} middleware group) and links it from the app's navigation.yml — creating the navigation file when the app has none yet. noerd:make-app runs this command automatically for every new app in the project (a module gets its dashboard from noerd:make-module).
php artisan noerd:make-dashboard --app=inventory| Option | Description |
|---|---|
--app= | App name (e.g. inventory) — skips the interactive app selection |
noerd:make-collection
Creates a new collection YML file interactively (block-style YAML). See Setup Collections. Has no effect while noerd.collections.mode is database — the written file is not read there (the command warns); create the collection in Setup → Collection Definitions or import the file afterwards.
php artisan noerd:make-collection
# or non-interactive
php artisan noerd:make-collection customers --app=setup| Argument / Option | Description |
|---|---|
name | (optional) The collection name (kebab-case, e.g. customers); asked interactively when omitted |
--app=setup | The target app folder in app-configs (default setup) |
noerd:make-theme
Scaffolds a new form theme by copying the default theme folder. See Themes.
php artisan noerd:make-theme mytheme
# inside a module
php artisan noerd:make-theme mytheme --module=mymodule| Argument / Option | Description |
|---|---|
name | The theme name (folder name, kebab-case) |
--module= | Create the theme inside app-modules/{module} instead of the project |
noerd:setup-collections:import-yaml
Imports setup collection definitions from YAML files into the setup_collection_definitions table. Used when switching noerd.collections.mode to database, and again whenever a module update ships a new collection YAML — newly published YAMLs are not picked up on their own. Idempotent: existing definitions are updated in place. Newly created tenants are seeded automatically. See Setup Collections.
php artisan noerd:setup-collections:import-yaml --all-tenants| Option | Description |
|---|---|
--tenant-id= | Import definitions for a specific tenant ID |
--all-tenants | Import definitions for every tenant |
--delete | Delete source YAML files after a successful import |
--dry-run | Show what would happen without writing anything |
noerd:setup-collections:export-yaml
Exports setup collection definitions from the database as YAML files. Used when switching noerd.collections.mode back to yaml.
php artisan noerd:setup-collections:export-yaml --tenant-id=1| Option | Description |
|---|---|
--tenant-id= | Export definitions for a specific tenant ID |
--delete | Delete the database rows after a successful export |
--force | Overwrite existing YAML files |