mischasigtermans/laravel-altitude
Installation Add the package via Composer:
composer require mischasigtermans/laravel-altitude --dev
Register the service provider in config/app.php (handled automatically by Laravel Boost).
First Sync Run the sync command to pull the latest agents:
php artisan altitude:sync
Or integrate with Laravel Boost for automatic updates:
// composer.json
{
"scripts": {
"post-update-cmd": [
"@php artisan boost:update --quiet"
]
}
}
First Use Case Trigger an agent via TALL stack commands. For example, generate a Livewire component:
php artisan altitude:livewire
Or use the altitude Artisan command to interactively select an agent:
php artisan altitude
app/Altitude/Agents (auto-generated by sync).php artisan boost:docs to access version-specific guides.config/altitude.php for customization options (e.g., agent behavior, output paths).Agent Workflows Use agents for repetitive TALL stack tasks:
php artisan altitude:livewire:component UserProfile
php artisan altitude:tailwind:optimize
php artisan altitude:filament:resource Post
Interactive Mode Launch the interactive CLI for guided agent selection:
php artisan altitude
Follow prompts to customize outputs (e.g., naming conventions, paths).
Integration with Laravel Boost Leverage Boost’s MCP (Model-Controller-Provider) for version-aware documentation:
php artisan boost:docs --agent=livewire
Development Loop
altitude:sync after updating dependencies.altitude:livewire:test).Testing Use Pest integration (if enabled) to validate agent outputs:
php artisan altitude:pest UserProfileTest
CI/CD Add to your pipeline to auto-generate boilerplate:
# .github/workflows/ci.yml
- run: php artisan altitude:sync
- run: php artisan altitude:livewire:component AdminDashboard
app/Altitude/Agents/Custom.config/altitude.php to override default output directories (e.g., resources/views/livewire).altitude:filament:resource to auto-generate admin panels with pre-configured policies/validation.altitude:tailwind:purge to optimize CSS during deployments.Stack Mismatch
config/altitude.php.Sync Conflicts
app/Altitude/Agents may be overwritten during sync.altitude:sync --dry-run to preview changes or stash customizations.Agent Overrides
app/Altitude/Agents/Custom may not inherit latest updates.altitude:sync --force.Boost Dependency
v1.0+). Missing Boost may cause errors.composer require laravel/boost
php artisan boost:install
Verbose Output Enable debug mode for agent logs:
php artisan altitude --verbose
Agent-Specific Debugging
Check storage/logs/altitude.log for errors during generation.
Dry Runs Test agent outputs without writing files:
php artisan altitude:livewire:component UserProfile --dry-run
Configuration
Customize agent behavior via config/altitude.php:
'agents' => [
'livewire' => [
'default_namespace' => 'App\\Livewire\\Custom',
'test_stubs' => true,
],
],
Pest Integration Enable Pest test generation for agents:
// config/altitude.php
'testing' => [
'enable_pest' => true,
'test_path' => 'tests/Altitude',
],
Performance
bootstrap/app.php):
$app->singleton(\MischaSigtermans\Altitude\Agents\LivewireAgent::class, fn() => new \MischaSigtermans\Altitude\Agents\LivewireAgent(cache()->remember(...)));
Extending Agents
Override agent methods in app/Altitude/Agents/Custom:
namespace App\Altitude\Agents\Custom;
use MischaSigtermans\Altitude\Agents\LivewireAgent;
class CustomLivewireAgent extends LivewireAgent {
protected function generateTestStub(): string {
return '// Custom test stub logic';
}
}
CI/CD Optimization Skip sync in CI if agents are pre-synced:
- run: php artisan altitude:livewire:component --skip-sync
Tailwind JIT
Ensure Tailwind JIT is configured if using altitude:tailwind agents to avoid CSS conflicts.
Filament Policies
Agents auto-generate policies. Extend them in app/Policies for custom logic:
namespace App\Policies;
use MischaSigtermans\Altitude\Agents\Filament\GeneratedPolicy;
class CustomPostPolicy extends GeneratedPolicy {
public function updateAny(): bool {
return true; // Custom logic
}
}
How can I help you explore Laravel packages today?