A standalone CLI tool for Oh Dear website monitoring. Built with Laravel Zero 12 and spatie/laravel-openapi-cli, which auto-generates all API commands from the Oh Dear OpenAPI spec.
- OpenAPI-driven commands: All API commands are auto-generated from
https://ohdear.app/api-docs/ohdear-openapi.ymlviaspatie/laravel-openapi-cli. No manual command classes for API endpoints. - 4 custom commands:
login,logout,clear-cache,install-skillinapp/Commands/. - Credential storage: API tokens stored in
~/.ohdear/config.jsonviaApp\Services\CredentialStore. - Auth validation:
GET https://ohdear.app/api/mevalidates tokens during login.
app/Providers/AppServiceProvider.php: Registers OpenAPI CLI, CredentialStore singleton, OhDearDescriberapp/Services/CredentialStore.php: Token read/write/flush to~/.ohdear/config.jsonapp/Services/OhDearDescriber.php: Custom describer that shows ASCII banner in help/list outputapp/Concerns/RendersBanner.php: ASCII art "OH DEAR" banner with orange gradientconfig/cache.php: File cache insys_get_temp_dir().'/ohdear'for OpenAPI spec cachingohdear: Entry point scriptbox.json: PHAR build configuration
composer test # Run tests with Pest
composer analyse # Run PHPStan (level 5)
composer format # Run Laravel PintTests use Pest PHP. Feature tests mock HTTP calls with Http::fake() and use temp directories for credential storage isolation. Test files are in tests/Feature/.