Laravel AI 辅助开发包 Laravel Boost 已发布

NoBody

Laravel AI 辅助开发包 Laravel Boost 已发布

Laravel AI

简介

Laravel Boost 旨在通过为 AI 提供更完整的上下文与结构,来加速基于 Laravel 的 AI 辅助开发。

从基础形态上看,Boost 是一个 MCP 服务器,内置 15+ 个为 AI 编码场景而设计的专用工具;同时提供可组合的 AI 指南(guidelines),针对 Laravel 生态包进行定制,使生成代码保持一致性与框架适配性。

此外,Boost 还内置强大的 Documentation API:结合 MCP 工具与超过 17,000 条 Laravel 相关知识库,配合基于向量嵌入的语义检索,返回更精确、具备上下文意识的结果。

[!IMPORTANT]
Laravel Boost 目前处于 beta 阶段,功能仍在持续完善与更新。

安装

通过 Composer 安装(开发依赖):

composer require laravel/boost --dev

安装 MCP Server 与编码指南:

php artisan boost:install

完成安装后,你可以在 Cursor、Claude Code,或任意你偏好的 AI 编码代理中开始使用。

可用 MCP 工具

Name Notes
Application Info Read PHP & Laravel versions, database engine, list of ecosystem packages with versions, and Eloquent models
Browser Logs Read logs and errors from the browser
Database Connections Inspect available database connections, including the default connection
Database Query Execute a query against the database
Database Schema Read the database schema
Get Absolute URL Convert relative path URIs to absolute so agents generate valid URLs
Get Config Get a value from the configuration files using "dot" notation
Last Error Read the last error from the application's log files
List Artisan Commands Inspect the available Artisan commands
List Available Config Keys Inspect the available configuration keys
List Available Env Vars Inspect the available environment variable keys
List Routes Inspect the application's routes
Read Log Entries Read the last N log entries
Report Feedback Share Boost & Laravel AI feedback with the team, just say "give Boost feedback: x, y, and z"
Search Docs Query the Laravel hosted documentation API service to retrieve documentation based on installed packages
Tinker Execute arbitrary code within the context of the application

可用 AI 指南(Guidelines)

Laravel Boost 为以下框架与生态包提供 AI 指南。core 指南为通用建议,适用于该包的所有版本。

Package Versions Supported
Core & Boost core
Laravel Framework core, 10.x, 11.x, 12.x
Livewire core, 2.x, 3.x
Filament core, 4.x
Flux UI core, free, pro
Herd core
Inertia Laravel core, 1.x, 2.x
Inertia React core, 1.x, 2.x
Inertia Vue core, 1.x, 2.x
Pest core, 4.x
PHPUnit core
Pint core
TailwindCSS core, 3.x, 4.x
Livewire Volt core
Laravel Folio core
Enforce Tests conditional

可用文档(Documentation)

Package Versions Supported
Laravel Framework 10.x, 11.x, 12.x
Filament 2.x, 3.x, 4.x
Flux UI 2.x Free, 2.x Pro
Inertia 1.x, 2.x
Livewire 1.x, 2.x, 3.x
Pest 3.x, 4.x
Tailwind CSS 3.x, 4.x

添加自定义 AI 指南

如果你希望为项目补充自定义的 AI 指南(guidelines),可在应用中新增 .ai/guidelines/* 目录,并放置 .blade.php 文件。执行 boost:install 时,这些文件会与 Boost 自带的指南一同生效。

手动注册 Boost MCP 服务器

在某些情况下,你可能需要在偏好的编辑器中手动注册 Laravel Boost MCP 服务器。请按以下配置注册:

命令与参数:

php ./artisan boost:mcp

或以 JSON 方式声明(示例):

{
  "mcpServers": {
    "laravel-boost": {
      "command": "php",
      "args": ["./artisan", "boost:mcp"]
    }
  }
}

视频介绍

Laravel AI 视频介绍

89 0 0
0个评论

NoBody

774
积分
0
获赞数
0
粉丝数
2020-07-24 加入
🔝