Arkstack CLI
The Arkstack CLI is exposed through the ark command and powered by @h3ravel/musket.
Use it from your app root:
sh
pnpm arksh
npx arkCommon command patterns
- Show help:
pnpm ark --help - Show command help:
pnpm ark <command> --help - Force overwrite generated files: add
--force
Core Arkstack commands
route:list
List registered routes.
sh
pnpm ark route:listOptional filters:
--p|pathfilter by route path
make:controller
Create a controller.
sh
pnpm ark make:controller UserUseful options:
--apigenerate API-style controller--m|model <name>attach and/or create model context--f|factorycreate linked factory (with model)--s|seedercreate linked seeder (with model)--x|migrationcreate linked migration (with model)--forceoverwrite existing file
make:resource
Create resources (from resora resource generator).
sh
pnpm ark make:resource resource User
pnpm ark make:resource collection UserCollection
pnpm ark make:resource all Usermake:full-resource
Create a full API set: resource, collection, and controller.
sh
pnpm ark make:full-resource User --m User --forceArkormˣ-powered commands
Arkstack also exposes Arkormˣ database/modeling commands via the same CLI:
make:modelmake:migrationmake:factorymake:seedermigratemodels:syncseed
Examples:
sh
pnpm ark make:model User --all
pnpm ark make:migration add_status_to_users
pnpm ark migrate --name add_status_to_users
pnpm ark models:sync
pnpm ark seedFor advanced database workflows and options, see Arkormˣ Documentation.
Custom app commands
You can add your own commands in:
src/app/console/commands
They will be discovered automatically by the console kernel.
For info on creating custom commands, see the Official H3ravel Musket documentation.
