Skip to content
Antares

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.

Terminal window
php vendor/bin/antares # lists all commands
Terminal window
php vendor/bin/antares make:controller UserController
php vendor/bin/antares make:dto CreateUserRequest
php vendor/bin/antares make:response UserResponse
php vendor/bin/antares make:middleware AuthMiddleware
php vendor/bin/antares make:guard JwtGuard
php vendor/bin/antares make:migration create_users_table
CommandCreatesNamespace
make:controllerapp/Controllers/{Name}.phpApp\Controllers
make:dtoapp/DTOs/{Name}.php, with #[Dto]App\DTOs
make:responseapp/Responses/{Name}.php, with #[ResponseDto(case: CaseStyle::SnakeCase)]App\Responses
make:middlewareapp/Middleware/{Name}.phpApp\Middleware
make:guardapp/Guards/{Name}.phpApp\Guards
make:migrationdatabase/migrations/{Y_m_d_His}_{name}.phpnone

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:

Terminal window
php vendor/bin/antares make:dto CreateUserRequest --path=app/Http/Requests
Terminal window
php vendor/bin/antares migrate
php vendor/bin/antares migrate:rollback

migrate runs all pending migrations in database/migrations/. migrate:rollback rolls back the last batch in reverse order. See Migrations for details.

Terminal window
php vendor/bin/antares cache:clear

Deletes the compiled route cache (storage/cache/routes.php) and the fingerprint file (storage/cache/fingerprint). The cache is rebuilt on the next boot.