Docs LATEST

Command Reference

Complete list of CLI commands.

CLI

Run ./velvet list to see available commands. Commands are grouped by category.

General #

Command Description
list List all commands
help <cmd> Show help for a command
version Display VelvetCMS version

Setup #

Command Description
install Bootstrap directories and sample content
optimize Validate environment for production
diagnose Check system requirements and configuration

Cache #

Command Description
cache:clear Clear all cached data

Configuration #

Command Description
config:cache Cache config files for production
config:clear Clear cached configuration
config:list List all configuration values
config:get <key> Get a configuration value
config:set <key> <value> Set a configuration value
config:publish Publish default config to user/config

Routes #

Command Description
route:cache Cache routes for production
route:clear Clear cached routes
route:list List all registered routes

Modules #

Command Description
module:list List all discovered modules
module:discover Rebuild module manifest

Database #

Command Description
migrate Run pending migrations
migrate --force Run in production without prompt

Scheduling #

Command Description
schedule:run Run due scheduled tasks
schedule:list List all scheduled tasks

Content (Pages) #

Command Description
page:list List all pages
page:make <slug> Create a new page
page:publish <slug> Publish a draft page
page:delete <slug> Delete a page
content:migrate <target> Migrate content between drivers

Content Migration #

# Migrate to hybrid driver
./velvet content:migrate hybrid

# Migrate to database with dry-run preview
./velvet content:migrate db --dry-run

# Specify source driver explicitly
./velvet content:migrate hybrid --from=file

# Skip confirmation prompt
./velvet content:migrate db --force

Generators #

Generate scaffolds for common components:

Command Description
make:controller <Name> Create a controller class
make:middleware <Name> Create a middleware class
make:model <Name> Create a model class
make:command <Name> Create a CLI command class
make:module <Name> Create a module scaffold

Generator Options #

./velvet make:controller PostController
./velvet make:module Blog --vendor=MyCompany

Development #

Command Description
serve Start PHP development server
serve --host=0.0.0.0 Bind to all interfaces
serve --port=8080 Use custom port