jamesclark32/clapperboard 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jamesclark32/clapperboard

Composer 安装命令:

composer require jamesclark32/clapperboard

包简介

Opinionated Laravel application code generation commands for AI agents.

README 文档

README

Opinionated Laravel application code generation commands for AI agents.

Scope

This package currently provides the existing generation commands from the host app:

  • php artisan generate:model
  • php artisan generate:route

The package is intentionally opinionated around a Laravel + Inertia + Vue application structure.

Install In A Laravel App

For local development via a Composer path repository:

{
    "repositories": [
        {
            "type": "path",
            "url": "../clapperboard"
        }
    ],
    "require-dev": {
        "jamesclark32/clapperboard": "^0.1"
    }
}

Then run:

composer update jamesclark32/clapperboard

Laravel package discovery will register JamesClark32\Clapperboard\CodegenServiceProvider automatically.

Install agent-facing project instructions:

php artisan clapperboard:install

Local Testing

Example workflow for testing package changes against a local Laravel app:

  1. Add this package to a host app with a Composer path repository.
  2. Refresh the package in the host app after each package change.
  3. Run generator dry-runs first, then apply writes.

In the host Laravel app:

composer update jamesclark32/clapperboard
php artisan clapperboard:install --dry-run --json
php artisan generate:model Widget "Widget catalog item" '{"attributes":[{"name":"name","fillable":true,"columnType":"string"},{"name":"description","fillable":true,"columnType":"text","nullable":true},{"name":"price","fillable":true,"columnType":"decimal","casts":"decimal"}],"relationships":[]}' --dry-run --json
php artisan generate:route Widgets index --dry-run --json
php artisan generate:route Widgets create --dry-run --json
php artisan generate:route Widgets store --dry-run --json
php artisan generate:route Widgets show --dry-run --json
php artisan generate:route Widgets edit --dry-run --json
php artisan generate:route Widgets update --dry-run --json

To apply the generated files in the host app:

php artisan generate:model Widget "Widget catalog item" '{"attributes":[{"name":"name","fillable":true,"columnType":"string"},{"name":"description","fillable":true,"columnType":"text","nullable":true},{"name":"price","fillable":true,"columnType":"decimal","casts":"decimal"}],"relationships":[]}'
php artisan generate:route Widgets index
php artisan generate:route Widgets create
php artisan generate:route Widgets store
php artisan generate:route Widgets show
php artisan generate:route Widgets edit
php artisan generate:route Widgets update

Useful follow-up checks in the host app:

php artisan test
php artisan route:list --name=widgets

Usage

Preview changes without writing files:

php artisan clapperboard:install --dry-run --json
php artisan generate:route Widgets index --dry-run --json
php artisan generate:model Widget "Widget catalog item" '{"attributes":[{"name":"name","fillable":true,"columnType":"string"}],"relationships":[]}' --dry-run --json

Write files:

php artisan generate:route Widgets index
php artisan generate:model Widget "Widget catalog item" '{"attributes":[{"name":"name","fillable":true,"columnType":"string"}],"relationships":[]}'

Notes

  • --dry-run returns a generation plan without writing files.
  • --json returns machine-readable output for agents.
  • php artisan clapperboard:install writes Clapperboard instructions into AGENTS.md and .github/copilot-instructions.md.
  • Generated output assumes the host app follows the architecture used by this codebase.

统计信息

  • 总下载量: 0
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-05

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固