edneymatias/antigravity-laravel-kit
Installation:
composer require edneymatias/antigravity-laravel-kit --dev
php artisan antigravity:install
This creates a .agent folder in your project root with pre-configured AI agent templates.
First Use Case: Run a basic agent command to generate a Laravel-specific component:
php artisan antigravity:run backend-specialist --task="Generate a controller for User resource with CRUD operations"
The agent will output a scaffolded controller with Eloquent methods, validation, and API responses.
Where to Look First:
backend-specialist, test-engineer)..agent/ for YAML/JSON templates (e.g., .agent/backend-specialist/template.yml).php artisan to see all antigravity: commands.Task-Driven Development: Use agents to automate repetitive tasks:
# Generate a Livewire component
php artisan antigravity:run frontend-specialist --task="Create a Livewire form for User profile with validation"
# Write Pest tests for a feature
php artisan antigravity:run test-engineer --task="Generate Pest tests for UserController@store"
Integration with Laravel Ecosystem:
frontend-specialist with Livewire components for real-time UI logic.
php artisan antigravity:run frontend-specialist --task="Add Livewire interactivity to a Blade form"
database-architect to generate migrations, factories, and seeders.
php artisan antigravity:run database-architect --task="Create migration and factory for a Post model with soft deletes"
backend-specialist for API resource scaffolding with Sanctum/Passport auth.
php artisan antigravity:run backend-specialist --task="Build API endpoints for a V1 User resource with rate limiting"
Workflow Automation: Chain agents for end-to-end feature development:
# Step 1: Generate model + migration
php artisan antigravity:run database-architect --task="Create Product model with relationships"
# Step 2: Scaffold controller
php artisan antigravity:run backend-specialist --task="Generate ProductController with API routes"
# Step 3: Add tests
php artisan antigravity:run test-engineer --task="Write Pest tests for ProductController"
Custom Templates:
Extend existing agents by modifying .agent/[agent-name]/template.yml or adding new templates to the directory. Example:
# .agent/custom-agent/template.yml
name: "custom-agent"
description: "Handles Laravel Forge deployments"
template: |
php artisan forge:redeploy --server={{ server_name }} --branch={{ branch }}
.env:
ANTIGRAVITY_AI_PROVIDER=openai
ANTIGRAVITY_API_KEY=your_api_key_here
--verbose flag for detailed agent execution logs:
php artisan antigravity:run backend-specialist --task="..." --verbose
.env (e.g., APP_ENV, DB_CONNECTION) for context-aware outputs.Template Overrides:
.agent/ may conflict with package updates.--force during updates to preserve your changes:
php artisan antigravity:install --force
.agent/custom/) and reference them via --template flag:
php artisan antigravity:run custom-agent --template=custom/
AI Rate Limits:
execute() method (extend the base agent class).Context Loss:
--context to pass previous outputs:
php artisan antigravity:run backend-specialist --task="Generate User model" --context="previous_output"
Livewire/Blade Conflicts:
--dry-run to preview changes:
php artisan antigravity:run frontend-specialist --task="..." --dry-run
Log Inspection:
storage/logs/antigravity.log for agent execution details..env:
ANTIGRAVITY_DEBUG=true
Template Validation:
php artisan antigravity:validate-templates
Agent Isolation:
Custom Agents:
.agent/[agent-name]/.php artisan vendor:publish --tag=antigravity-agents
Antigravity\Kit\Agents\Agent to add custom logic.Hooks:
preExecute(), postExecute()) in your custom agent class.AI Provider Swapping:
Antigravity\Kit\Services\AIService and binding it in config/antigravity.php.Caching:
.env:
ANTIGRAVITY_CACHE=false
File Permissions:
.agent/ is writable:
chmod -R 755 .agent/
Livewire Version:
php artisan antigravity:run frontend-specialist --task="Generate Livewire 2.x component"
How can I help you explore Laravel packages today?