Osumi Framework CLI Commands
Osumi Framework provides application CLI tasks and a dedicated framework migration binary.
Application CLI
Application tasks are executed from the project root through:
php of <task> [options]
add
Creates framework application elements.
php of add --option <type> --name <name>
Supported types include:
actionservicetaskmodelComponentcomponentmiddleware
Example:
php of add --option middleware --name Login
The old filter option has not been supported since 9.9.
backupAll
php of backupAll
Creates a complete application backup by using the corresponding framework backup/export tasks.
backupDB
php of backupDB
Creates a database backup using the configured database connection and system tooling.
extractor
php of extractor
Exports the application using the framework extractor.
generateModel
php of generateModel
Generates the SQL schema from application model classes.
generateModelFrom
php of generateModelFrom <file>
Generates models from a model definition file.
generateModelFromDB
php of generateModelFromDB
Generates model classes from the configured database.
reset
php of reset
Starts the protected reset workflow used to recreate a clean application structure. The generated structure includes src/Middleware/ and src/Middleware/Middlewares.php.
version
php of version
Displays framework version information.
Framework Migration CLI
The Composer package exposes:
php vendor/bin/ofw-migrate --help
Supported migration options include:
--from
--to
--dry-run
--force
--verbose
--no-interaction
--help
Since 9.12, authoritative migration state is stored in .ofw-migrations.json at the project root. This file must be versioned together with the application code.
For backward compatibility, the runner can still read the old ofw/tmp/state.json when .ofw-migrations.json does not yet exist.
The 9.8.5 → 9.9.0 migration guide documents the migration workflow and the automatic Composer integration in detail.
Notes
- Run application CLI commands from the project root.
- Run migration commands from the project root so the migration runner operates on the intended application.
- Database-related tasks require valid database configuration.