CLI
Antares ships with a small CLI for scaffolding, migrations, and cache management. Run it from your project root: every command reads and writes paths relative to the current directory, and the project’s .env is loaded from there. Real environment variables win over .env, so DB_HOST=db.prod php vendor/bin/antares migrate works.
php vendor/bin/antares # lists all commandsGenerator Commands
Section titled “Generator Commands”php vendor/bin/antares make:controller UserControllerphp vendor/bin/antares make:dto CreateUserRequestphp vendor/bin/antares make:response UserResponsephp vendor/bin/antares make:middleware AuthMiddlewarephp vendor/bin/antares make:guard JwtGuardphp vendor/bin/antares make:migration create_users_table| Command | Creates | Namespace |
|---|---|---|
make:controller | app/Controllers/{Name}.php | App\Controllers |
make:dto | app/DTOs/{Name}.php, with #[Dto] | App\DTOs |
make:response | app/Responses/{Name}.php, with #[ResponseDto(case: CaseStyle::SnakeCase)] | App\Responses |
make:middleware | app/Middleware/{Name}.php | App\Middleware |
make:guard | app/Guards/{Name}.php | App\Guards |
make:migration | database/migrations/{Y_m_d_His}_{name}.php | none |
Existing files are never overwritten. Pass --path= to write somewhere else (relative to the project root); the namespace in the file stays the same, so adjust it if needed:
php vendor/bin/antares make:dto CreateUserRequest --path=app/Http/RequestsMigration Commands
Section titled “Migration Commands”php vendor/bin/antares migratephp vendor/bin/antares migrate:rollbackmigrate runs all pending migrations in database/migrations/. migrate:rollback rolls back the last batch in reverse order. See Migrations for details.
Cache Commands
Section titled “Cache Commands”php vendor/bin/antares cache:clearDeletes the compiled route cache (storage/cache/routes.php) and the fingerprint file (storage/cache/fingerprint). The cache is rebuilt on the next boot.