Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Boost Laravel Package

laravel/boost

Laravel Boost accelerates AI-assisted Laravel development by supplying the context, conventions, and structure AI needs to generate high-quality, framework-specific code and suggestions, helping teams build faster while staying aligned with Laravel best practices.

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation:

    composer require laravel/boost
    php artisan boost:install
    

    This initializes Boost in your Laravel project, setting up the boost.json config file and default skills.

  2. First Use Case:

    • Ask a question about your project:
      php artisan boost:ask "How do I implement a multi-step form with Livewire?"
      
    • Generate a test:
      php artisan boost:ask "Write a Pest test for my User model"
      
  3. Where to Look First:

    • Skills: Run php artisan boost:skills to see available AI capabilities (e.g., laravel-best-practices, livewire, pest-testing).
    • Configuration: Edit boost.json to customize AI models, tokens, or enabled skills.
    • Documentation: Laravel Boost Docs for CLI commands and advanced usage.

Implementation Patterns

Daily Workflows

  1. Context-Aware Coding:

    • Pattern: Use boost:ask with file paths or class names for precise context:
      php artisan boost:ask "Refactor this controller" --file=app/Http/Controllers/UserController.php
      
    • Why: Boost scans your project (models, routes, tests) to provide Laravel-specific suggestions.
  2. Skill-Based Workflows:

    • Pattern: Enable/disable skills dynamically:
      php artisan boost:skills --enable=livewire,laravel-best-practices
      
    • Use Cases:
      • Testing: Use pest-testing skill to generate tests:
        php artisan boost:ask "Create a feature test for the auth flow"
        
      • Refactoring: Use laravel-best-practices to audit code:
        php artisan boost:ask "Review this code for Laravel best practices" --file=app/Services/InvoiceService.php
        
  3. Integration with IDEs:

    • Pattern: Use Boost with Kiro IDE Agent (v2.4.4+) for real-time AI assistance:
      // boost.json
      {
        "agents": {
          "kiro": {
            "enabled": true
          }
        }
      }
      
    • Why: Seamless inline code suggestions without leaving your editor.
  4. Project-Specific Guidelines:

    • Pattern: Customize guidelines in resources/boost/skills/:
      # SKILL: custom-guideline.md
      ---
      title: "Project-Specific Rules"
      ---
      Always use `Str::of()->title()` for formatting.
      
    • Trigger: Boost will reference these during code generation.
  5. Testing Workflow:

    • Pattern: Generate and run tests in one command:
      php artisan boost:ask "Write and run a test for the UserController store method"
      
    • Tip: Use --enforce-tests in boost.json to require test generation for new features.

Integration Tips

  1. CI/CD Pipelines:

    • Pattern: Use boost:update to sync skills before deployments:
      php artisan boost:update --discover
      
    • Why: Ensures your team uses the latest Laravel-specific AI guidelines.
  2. Monorepos:

    • Pattern: Configure mcp_config_path in boost.json:
      {
        "mcp_config_path": "path/to/monorepo/boost.json"
      }
      
    • Why: Supports multi-project setups with shared Boost configurations.
  3. Cloud Integration:

    • Pattern: Deploy Boost skills to Laravel Cloud:
      php artisan boost:install --cloud
      
    • Why: Pre-configures skills for cloud environments (e.g., deployment guidelines).
  4. Custom Agents:

    • Pattern: Extend Boost with custom MCP agents (e.g., Claude Code):
      // boost.json
      {
        "agents": {
          "claude": {
            "enabled": true,
            "model": "claude-3-opus",
            "cwd": "./"
          }
        }
      }
      

Gotchas and Tips

Pitfalls

  1. Token Limits:

    • Issue: Long file paths or complex contexts may exceed token limits.
    • Fix: Use --file or --class flags to narrow scope:
      php artisan boost:ask "Optimize this" --class=App\Models\User
      
  2. Skill Conflicts:

    • Issue: Overlapping skills (e.g., livewire + blade) may generate conflicting advice.
    • Fix: Disable redundant skills or merge guidelines:
      php artisan boost:skills --disable=blade
      
  3. Caching Quirks:

    • Issue: Stale skill responses due to caching.
    • Fix: Clear Boost cache:
      php artisan boost:clear
      
    • Config: Adjust cache_prefix in boost.json for Laravel 13+:
      {
        "cache": {
          "prefix": "boost_"
        }
      }
      
  4. Model Version Mismatches:

    • Issue: AI suggestions for unsupported Laravel versions (e.g., using vapor:deploy in Laravel 10).
    • Fix: Specify version in prompts:
      php artisan boost:ask "Show me Laravel 11 migration syntax"
      
  5. Livewire-Specific Gotchas:

    • Issue: Boost may suggest outdated Livewire v3 syntax in v4 projects.
    • Fix: Update SKILL.blade.php in resources/boost/skills/livewire/ or use:
      php artisan boost:skills --enable=livewire-v4
      

Debugging Tips

  1. Verbose Output:

    • Enable debug mode to inspect MCP interactions:
      php artisan boost:ask "Debug this" --verbose
      
    • Log Location: storage/logs/boost.log.
  2. Skill Validation:

    • Validate custom skills with:
      php artisan boost:validate-skill resources/boost/skills/custom-guideline.md
      
  3. Network Issues:

    • Error: Http::pool errors when downloading remote skills.
    • Fix: Configure a proxy in boost.json:
      {
        "http": {
          "proxy": "http://your-proxy:port"
        }
      }
      
  4. PHP Path Conflicts:

    • Issue: Boost uses the system PHP path, which may differ from your project’s PHP version.
    • Fix: Set php_executable in boost.json:
      {
        "tools": {
          "php_executable": "/path/to/your/php"
        }
      }
      

Extension Points

  1. Custom Skills:

    • Pattern: Create skills in resources/boost/skills/ with frontmatter:
      # SKILL: custom-skill.md
      ---
      title: "Custom Skill"
      description: "Describe your skill's purpose."
      ---
      # Your guidelines here.
      
    • Trigger: Boost will auto-discover skills on boost:update.
  2. Agent Hooks:

    • Pattern: Extend MCP agents via app/Providers/BoostServiceProvider.php:
      use Laravel\Boost\Events\AgentInitializing;
      
      public function boot()
      {
          event(new AgentInitializing(function ($agent) {
              $agent->extend('custom', function () {
                  return new CustomAgent();
              });
          }));
      }
      
  3. Pre/Post-Processing:

    • Pattern: Override skill rendering:
      // app/Providers/BoostServiceProvider.php
      public function boot()
      {
          Boost::macro('renderSkill', function ($skill) {
              return str_replace('{{placeholder}}', 'custom-value', $skill);
          });
      }
      
  4. Testing Boost:

    • Pattern: Mock AI responses in tests:
      use Laravel\Boost\Facades\Boost;
      
      Boost::shouldReceive('askAI')->andReturn('Mocked response');
      
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai