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 speeds up AI-assisted Laravel development by supplying the context and structure AI needs to generate accurate, framework-specific code. It helps produce higher-quality suggestions, scaffolding, and solutions tailored to your application.

View on GitHub
Deep Wiki
Context7

Getting Started

Minimal Setup

  1. Installation:

    composer require laravel/boost
    

    Run the publisher to publish the config file:

    php artisan vendor:publish --provider="Laravel\Boost\BoostServiceProvider"
    
  2. Configure AI Provider: Edit config/boost.php to set your preferred AI provider (e.g., OpenAI, Anthropic, or local tools like codex or mcp).

  3. First Use Case: Trigger Boost via Artisan:

    php artisan boost:assist
    

    Or use the Tinker-like interface:

    php artisan boost:tinker
    

Key Starting Points

  • boost:assist: Invokes AI assistance for the current context (e.g., file, class, or command).
  • boost:tinker: Interactive shell for querying AI about your project.
  • boost:update: Updates installed skills (custom rules/guidelines).

Implementation Patterns

Daily Workflow Integration

  1. Context-Aware Assistance:

    • Use boost:assist in your IDE terminal while focused on a file/class:
      php artisan boost:assist --file=app/Http/Controllers/UserController.php
      
    • Specify a class or method:
      php artisan boost:assist --class=App\Models\User
      
  2. Skill-Based Guidance:

    • Leverage built-in skills (e.g., livewire, pest, migrations) or add custom ones:
      php artisan boost:add-skill gitlab.com/your-skill-repo
      
    • Example: Generate a Livewire component:
      php artisan boost:assist --skill=livewire --prompt="Create a CRUD component for posts."
      
  3. Interactive Debugging:

    • Use boost:tinker to ask AI about your project’s structure, logs, or edge cases:
      php artisan boost:tinker
      > Explain why this query is slow: SELECT * FROM users WHERE created_at > NOW() - INTERVAL '1 day';
      
  4. Testing Assistance:

    • Generate or debug Pest tests:
      php artisan boost:assist --file=tests/Feature/UserTest.php --prompt="Add a test for failed login."
      
  5. Monorepo Support:

    • Configure mcp_config_path in boost.php for multi-package projects:
      'mcp_config_path' => base_path('mcp.config.json'),
      

Integration Tips

  • IDE Shortcuts: Bind boost:assist to a keyboard shortcut in your IDE (e.g., VSCode tasks or PHPStorm run configurations).
  • Git Hooks: Trigger Boost pre-commit to review changes:
    php artisan boost:assist --file=app/Http/Controllers/$(git diff --name-only --diff-filter=ACM | head -1)
    
  • CI/CD: Use Boost in pipelines to auto-generate docs or tests (e.g., on PRs):
    - name: Generate test cases
      run: php artisan boost:assist --prompt="Write tests for the new auth logic." --output=tests/Feature/AuthTest.php
    

Gotchas and Tips

Pitfalls

  1. Skill Discovery Issues:

    • If skills fail to load, ensure boost.json is in your project root and symlinks are resolved (use --discover flag):
      php artisan boost:update --discover
      
    • For monorepos, verify mcp_config_path points to the correct config file.
  2. AI Provider Quirks:

    • Rate Limits: Monitor API usage (e.g., OpenAI tokens). Boost includes token counters in output.
    • Local Tools: If using codex or mcp, ensure the CLI tools are installed and in PATH.
    • HTML/Blade Escaping: Avoid pasting raw Blade templates into prompts; use --file or --class flags instead.
  3. Configuration Conflicts:

    • Override default paths (e.g., app_path()) in boost.php if your project uses non-standard locations:
      'app_path' => base_path('custom_app_dir'),
      
  4. Skill Template Errors:

    • Custom skills may break if they reference non-existent files. Validate templates with:
      php artisan boost:add-skill --dry-run
      

Debugging Tips

  • Verbose Output: Enable debug mode in boost.php:
    'debug' => env('BOOST_DEBUG', false),
    
  • Log Inspection: Check storage/logs/boost.log for tool execution errors.
  • Skill Validation: Test skills in isolation:
    php artisan boost:skill-test gitlab.com/laravel/boost:livewire
    

Extension Points

  1. Custom Skills:

    • Create a skill repository with a skill.json manifest and SKILL.blade.php template.
    • Example structure:
      /skills/my-skill/
      ├── skill.json          # Metadata (name, description, rules)
      └── SKILL.blade.php      # Blade template for AI prompts
      
  2. Hooks:

    • Extend Boost’s lifecycle via events (e.g., Boost.Skill.Discovered):
      use Laravel\Boost\Events\SkillDiscovered;
      
      SkillDiscovered::listen(function (SkillDiscovered $event) {
          // Log or modify discovered skills
      });
      
  3. Tool Integration:

    • Add custom tools to config/boost.php under tools:
      'tools' => [
          'custom' => [
              'class' => \App\Boost\CustomTool::class,
              'description' => 'Runs custom logic for my app.',
          ],
      ],
      

Performance Tips

  • Token Efficiency: Use --concise flag to reduce AI response length:
    php artisan boost:assist --concise
    
  • Caching: Disable caching for frequent updates:
    'cache_skills' => false,
    
  • Parallelism: Boost supports parallel tool execution (enabled by default). Disable with:
    'parallel_tools' => false,
    
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport