GoLaravel
You're reading the docs for v1.6.0, an older release. Go to v1.17.2 (latest).

Docs v1.6.0 Guides

Artisan CLI Reference

The Artisan CLI is the command-line companion for GoLaravel applications, providing code generators, project scaffolding, and lifecycle management.


1. Project Management#

artisan new <name>#

Starts the interactive project creation wizard. Prompts for:

  • Presentation stack: Templ (Blade SSR), Inertia.js (React/Vue), Flutter, or Hybrid (Flutter + Templ).
  • Flutter target platforms (Web, Windows, macOS, Linux, iOS, Android).
  • Database driver (SQLite, PostgreSQL, MySQL).
artisan new my-billing-system

2. Generator Commands#

artisan make:crud <Name> [--api | --web] [--force] (PRD §8.2)#

Scaffolds a complete full-stack CRUD resource end-to-end in seconds:

  • Ent Database Schema: app/schema/<name>.go
  • Form Requests with Validation: app/requests/<name>_request.go
  • RESTful & Web Controller: app/handlers/<name>_controller.go (Index, Show, Create, Store, Edit, Update, Destroy)
  • Templ UI Views: app/views/<name>.templ (Index Table, Show Detail, and Create/Edit Form with CSRF & method spoofing)
  • Database Seeder: database/seeders/<name>_seeder.go
  • Route Mounting Helper: ctrl.RegisterRoutes(router, "/<names>")
# Scaffold full-stack CRUD with Templ views
artisan make:crud Product

# Scaffold API-only CRUD (skip Templ views, JSON responses)
artisan make:crud Order --api

# Overwrite existing files
artisan make:crud Customer --force

Individual Component Generators#

All generators place files in deterministic directories:

CommandOutput PathDescription
artisan make:crud <Name>Full StackScaffolds Schema, Requests, Controller, Views, and Seeder
artisan make:schema <Name>app/schema/<name>.goCreates an Ent ORM schema definition
artisan make:controller <Name>app/handlers/<name>_controller.goCreates an HTTP controller
artisan make:view <name>app/views/<name>.templCreates a Templ component view
artisan make:job <Name>app/jobs/<name>_job.goCreates an async background queue job
artisan make:notification <Name>app/notifications/<name>_notification.goCreates a multi-channel notification class
artisan make:authapp/handlers/auth_workflow_controller.goScaffolds turnkey auth workflows & TOTP 2FA controller
artisan make:mail <Name> [--view]app/mail/<name>_mail.goCreates a Mailable struct with optional companion Templ view
artisan make:policy <Name>app/policies/<name>_policy.goCreates an authorization policy
artisan make:scope <Name>app/scopes/<name>_scope.goCreates a global Ent query scope
artisan make:middleware <Name>app/middleware/<name>.goCreates custom HTTP middleware
artisan make:limiter <Name>app/limiters/<name>_limiter.goCreates a named sliding-window rate limiter
artisan make:migration <Name>database/migrations/<timestamp>_<name>.sqlCreates a new Atlas versioned migration
artisan make:factory <Name>database/factories/<name>_factory.goCreates an Ent model factory
artisan make:seeder <Name>database/seeders/<name>_seeder.goCreates a new database seeder class
artisan make:lang <locale>lang/<locale>/Scaffolds language translation dictionaries

3. Database Migration & Seeding Commands#

CommandDescription
artisan migrateExecutes pending database migrations via Atlas
artisan migrate:diff <name>Computes schema diff between Ent schemas and DB and creates a versioned SQL migration
artisan migrate:statusInspects migration status and pending files
artisan migrate:rollbackReverts the last migration batch
artisan db:seedSeeds database records via database/seeders

4. Build & Generation Commands#

artisan generate#

Runs both templ generate and go generate ./... to compile:

  • Ent ORM query builders, mutations, predicates, and edge traversals.
  • Templ view components into pure Go functions.
artisan generate

artisan flutter:build#

Compiles the Flutter client application into client/build/web for direct hosting by GoLaravel:

artisan flutter:build

5. Server, Worker & Scheduler Commands#

artisan serve#

Starts the HTTP development server on port 8080 (or custom port):

artisan serve
artisan serve 3000

artisan queue:work#

Launches concurrent background worker goroutines to process enqueued jobs:

artisan queue:work

artisan schedule:list#

Displays a formatted ASCII table of all registered scheduled tasks, cron expressions, next due times, timezones, and concurrency locks:

artisan schedule:list

artisan schedule:run#

Executes all tasks due at the current minute. Ideal for invoking from your server crontab (* * * * *):

artisan schedule:run

artisan schedule:work#

Runs an in-process schedule daemon that executes schedule:run every minute without needing external crond:

artisan schedule:work

Generated from docs/artisan-cli.md at v1.6.0 · released Nov 16, 2026