Skip to content

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 ​

CommandDescription
noerd:installInstall noerd: publish the setup app configs, config and assets, then migrate and create the first admin
noerd:updateRefresh the published setup app configs, config/noerd.php, frontend scaffold and public assets — no migration, no prompts for tenant or admin
noerd:update-allRun noerd:update and every installed module's noerd:update-{module} command
noerd:demoInstall demo data (models, migrations, views, configs, routes)
noerd:publish-homePublish the noerd-apps view for customization
noerd:infoDisplay the current Noerd version

Users, Tenants & Apps ​

CommandDescription
noerd:make-admin-userCreate a new user and make them an admin
noerd:promote-adminGive an existing user the admin profile on all their tenants
noerd:super-adminGrant or revoke the installation-wide super admin flag of a user
noerd:make-tenantCreate a new tenant
noerd:make-appCreate a new app (TenantApp) with its own dashboard that can be assigned to tenants
noerd:assign-apps-to-tenantAssign apps to a tenant with interactive selection

Scaffolding ​

CommandDescription
noerd:make-moduleCreate a new module with complete directory structure
noerd:make-resourceGenerate list + detail Blade and YAML files from an existing Eloquent model
noerd:make-listGenerate a list Blade file from an existing Eloquent model
noerd:make-detailGenerate a detail Blade file with YAML from model columns
noerd:make-pageGenerate a standalone page Blade file (no model required)
noerd:make-dashboardGenerate a dashboard Blade file for an app
noerd:make-collectionCreate a new collection YML file interactively
noerd:make-themeScaffold a new form theme by copying the default theme folder

Setup Collections ​

CommandDescription
noerd:setup-collections:import-yamlImport setup collection definitions from YAML into the database
noerd:setup-collections:export-yamlExport 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).

bash
php artisan noerd:install
# non-interactive (CI / deploy)
php artisan noerd:install --force --migrate --build --demo --no-interaction
OptionDescription
--forceOverwrite existing files without asking
--migrateRun the migrations without asking — required to migrate in non-interactive runs; forwarded to noerd:demo as --migrate --seed
--buildRun npm run build without asking — required to build in non-interactive runs
--demoInstall 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).

bash
php artisan noerd:update
OptionDescription
--forceOverwrite existing files without asking
--buildRun 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.

bash
php artisan noerd:update-all --force
OptionDescription
--forceOverwrite existing files without asking (forwarded to every sub-command)
--buildRun 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 --force does more than copy YAML: it also overwrites config/noerd.php, scaffolds the missing frontend files (see Installation), runs npm install for any dependency it added. Use --except=noerd:update to 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.

bash
php artisan noerd:demo
OptionDescription
--forceOverwrite existing files
--migrateRun the migrations — required to migrate in non-interactive runs (interactive runs ask)
--seedSeed 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).

bash
php artisan noerd:publish-home
OptionDescription
--forceOverwrite existing file

noerd:info ​

Displays the currently installed Noerd version.

bash
php artisan noerd:info

noerd: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.

bash
php artisan noerd:make-admin-user
OptionDescription
--name=The name of the user
--email=The email of the user
--password=The password of the user
--super-adminMark 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.

bash
php artisan noerd:promote-admin {user_id}
ArgumentDescription
user_idThe 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.

bash
php artisan noerd:super-admin {user}            # grant — {user} is an ID or an email
php artisan noerd:super-admin {user} --revoke   # withdraw
OptionDescription
--revokeWithdraw the super admin flag instead of granting it
--forceRevoke 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).

bash
php artisan noerd:make-tenant
OptionDescription
--name=The name of the tenant
--defaultUse "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.

bash
php artisan noerd:make-app
OptionDescription
--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=1Whether the app is active (1 or 0; project only)
--moduleScaffold 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.

bash
php artisan noerd:assign-apps-to-tenant
OptionDescription
--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.

bash
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 / OptionDescription
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-hintsDo 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.

bash
# 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 / OptionDescription
modelThe 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:

FileLocation
List Bladeresources/views/components/{entities}-list.blade.php
Detail Bladeresources/views/components/{entity}-detail.blade.php
List YAMLapp-configs/{app}/lists/{entities}-list.yml
Detail YAMLapp-configs/{app}/details/{entity}-detail.yml

Additional actions ​

  • Routes — Appends list and detail routes to routes/web.php, wrapped in Route::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 typeDetail field typeList column type
varchar, string, chartexttext
text, longtext, mediumtexttextareatext
tinyint, booleancheckboxbool
integer, bigint, smallint, decimal, float, doublenumbernumber
datedatedate
datetime, timestampdatetimedatetime
jsontextarea—

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.

bash
php artisan noerd:make-list "App\Models\Invoice"
OptionDescription
--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.

bash
php artisan noerd:make-detail "App\Models\Invoice"
OptionDescription
--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.

bash
php artisan noerd:make-page sent-mails --app=inventory
Argument / OptionDescription
namePage 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).

bash
php artisan noerd:make-dashboard --app=inventory
OptionDescription
--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.

bash
php artisan noerd:make-collection
# or non-interactive
php artisan noerd:make-collection customers --app=setup
Argument / OptionDescription
name(optional) The collection name (kebab-case, e.g. customers); asked interactively when omitted
--app=setupThe target app folder in app-configs (default setup)

noerd:make-theme ​

Scaffolds a new form theme by copying the default theme folder. See Themes.

bash
php artisan noerd:make-theme mytheme
# inside a module
php artisan noerd:make-theme mytheme --module=mymodule
Argument / OptionDescription
nameThe 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.

bash
php artisan noerd:setup-collections:import-yaml --all-tenants
OptionDescription
--tenant-id=Import definitions for a specific tenant ID
--all-tenantsImport definitions for every tenant
--deleteDelete source YAML files after a successful import
--dry-runShow 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.

bash
php artisan noerd:setup-collections:export-yaml --tenant-id=1
OptionDescription
--tenant-id=Export definitions for a specific tenant ID
--deleteDelete the database rows after a successful export
--forceOverwrite existing YAML files