ultraviolettes/hive-cli-agent-for-laravel
Composer 安装命令:
composer create-project ultraviolettes/hive-cli-agent-for-laravel
包简介
Laravel agent orchestration CLI — turns GitHub backlogs and Nightwatch exceptions into parallel Claude Code agents.
README 文档
README
The Laravel agent orchestration CLI.
hive planturns your GitHub backlog into parallel Claude Code agents.
hive fixturns your Nightwatch exceptions into pull requests.
Hive is a Laravel Zero CLI that reads your GitHub issues or Nightwatch exceptions, analyzes task dependencies with AI, and spawns parallel Claude Code agents — each in its own git worktree with a task-specific CLAUDE.md.
Why Hive?
Tools like Polyscope (by BeyondCode) and Superset are excellent at running parallel agents. Polyscope in particular is deeply integrated with the Laravel ecosystem — Nightwatch, GitHub, autopilot mode. If you don't use it, you should try it.
Hive is a different kind of tool. It's not an app — it's a CLI that fits into any workflow.
The key difference: hierarchical task planning.
Hive reads your existing issues or exceptions and reasons about their dependencies before spawning anything:
- "This feature depends on that security patch — spawn the patch first, block the feature until it's done."
- "These 4 bug fixes are independent — spawn them all in parallel right now."
- "This Nightwatch exception happens in
UserController:42with 150 occurrences — inject the exact stacktrace as context for the fix agent."
# Analyzes dependencies, builds a DAG, spawns in the right order hive plan --github owner/repo --milestone "Sprint 4" # Fetches unresolved exceptions, sorts by impact, spawns fix agents hive fix --nightwatch
Because it's a CLI, it works with Polyscope, Superset, your terminal, or anything else.
How it works
GitHub Issues / Nightwatch Exceptions
│
▼
QueenBee (DagAnalyzer)
Analyzes dependencies → builds execution DAG
Priority: security (100) > bugs (60) > features (30)
│
▼
Ready tasks spawned in parallel
Blocked tasks wait for their dependencies
│
▼
Each worktree gets a CLAUDE.md with:
· Task description & context
· Stack info (Filament, Pest, Livewire…)
· TDD instructions if Pest detected
· Exact stacktrace if from Nightwatch
· Conventional commit prefix
Requirements
- PHP 8.2+
- gh CLI — for GitHub issues ingestion
- Claude Code — to run agents in worktrees (also used headlessly for DAG analysis)
ANTHROPIC_API_KEYin your Laravel project's.env— only needed if Claude Code CLI is not installed
Installation
composer global require ultraviolettes/hive-cli-agent-for-laravel
Or clone and build locally:
git clone https://github.com/ultraviolettes/hive-cli-agent-for-laravel.git cd hive-cli-agent-for-laravel composer install php hive app:build hive # → builds/hive (standalone PHAR)
Quick start
cd ~/your-laravel-project # 1. Initialize Hive (detects your stack automatically) hive init # 2. Plan from GitHub issues hive plan --github owner/repo hive plan --github owner/repo --milestone "Sprint 4" # 3. Or fix Nightwatch exceptions hive fix --nightwatch # 4. Or spawn a single agent manually hive spawn feat/my-feature --context "Build the admin dashboard" # 5. Check what's running hive status # 6. Commit, push and open a PR from a worktree hive pr # 7. Clean up after merge hive harvest feat/my-feature
Commands
hive init
Detects your Laravel stack (Filament, Pest, Nightwatch, Vite, Livewire, Horizon, Inertia) and creates a .hive.json config file.
hive init hive init --path /path/to/project
hive plan
Reads a backlog (GitHub issues or raw text), builds a dependency graph, displays the execution plan, and spawns agents for all ready tasks.
hive plan --github owner/repo hive plan --github owner/repo --milestone "Sprint 4" hive plan --text "Fix the login bug, then add dark mode, then refactor auth" hive plan --github owner/repo --dry-run # preview without spawning
The DAG in practice:
| # | Branch | Priority | Status | Depends on |
|---|---|---|---|---|
| 1 | fix/composer-cve | 100 | 🟡 ready | — |
| 2 | fix/npm-audit | 100 | 🟡 ready | — |
| 3 | chore/laravel-update | 70 | 🔒 blocked | #1, #2 |
| 4 | feat/filament-v5 | 30 | 🔒 blocked | #3 |
Tasks 1 and 2 spawn immediately in parallel. Tasks 3 and 4 wait.
hive fix --nightwatch
Fetches unresolved exceptions from Laravel Nightwatch, sorts by impact (occurrences), and spawns fix agents with the exact stacktrace injected as context.
hive fix --nightwatch hive fix --nightwatch --limit 5 hive fix --nightwatch --dry-run
Requires NIGHTWATCH_TOKEN and NIGHTWATCH_PROJECT_ID in your .env.
hive spawn
Spawns a single agent in an isolated git worktree.
hive spawn feat/my-feature
hive spawn fix/login-bug --context "Users can't login when 2FA is enabled"
hive pr
From inside a worktree — commits staged changes, pushes, and opens a PR via gh.
hive pr # current worktree hive pr --all # all worktrees with unpushed commits
hive status
Lists all active Hive worktrees with branch, last commit, and whether an agent is running.
hive harvest
Removes a worktree after the branch has been merged.
Configuration
.hive.json created by hive init at your Laravel project root:
{
"project": "my-app",
"stack": ["laravel", "filament", "pest", "nightwatch", "vite"],
"main_branch": "main",
"worktrees_path": ".hive/worktrees"
}
Environment variables (in your Laravel project's .env):
| Variable | Required for | Notes |
|---|---|---|
ANTHROPIC_API_KEY |
plan, fix |
Not needed if Claude Code CLI is installed |
NIGHTWATCH_TOKEN |
fix --nightwatch |
Nightwatch API token |
NIGHTWATCH_PROJECT_ID |
fix --nightwatch |
Nightwatch project ID |
Architecture
app/
├── Ai/Agents/
│ └── DagAnalyzerAgent.php — laravel/ai structured output (fallback)
├── Commands/
│ ├── InitCommand.php — hive init
│ ├── PlanCommand.php — hive plan
│ ├── FixCommand.php — hive fix
│ ├── SpawnCommand.php — hive spawn
│ ├── HarvestCommand.php — hive harvest
│ ├── StatusCommand.php — hive status
│ └── PrCommand.php — hive pr
├── Services/
│ ├── ClaudeCodeGateway.php — runs `claude -p` headless, parses JSON output
│ ├── DagAnalyzer.php — ClaudeCode first, laravel/ai fallback
│ ├── HiveDetector.php — auto-detects Laravel stack
│ ├── WorktreeManager.php — git worktree spawn/harvest/list
│ ├── WorktreeInspector.php — reads worktree state
│ ├── ContextBuilder.php — generates CLAUDE.md per task
│ ├── GithubIngester.php — fetches issues via gh CLI
│ └── NightwatchIngester.php — fetches exceptions via API
└── Support/
└── HiveConfig.php — reads/writes .hive.json
Testing
./vendor/bin/pest
Built with
- Laravel Zero — CLI framework
- Laravel AI SDK — structured output agent
- Laravel Prompts — terminal UX
- Pest — testing
Status
🚧 Early — looking for contributors and real-world testers.
See CONTRIBUTING.md for the roadmap and how to help.
License
MIT
ultraviolettes/hive-cli-agent-for-laravel 适用场景与选型建议
ultraviolettes/hive-cli-agent-for-laravel 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 0 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「cli」 「laravel」 「agents」 「ai」 「claude」 「nightwatch」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ultraviolettes/hive-cli-agent-for-laravel 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ultraviolettes/hive-cli-agent-for-laravel 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ultraviolettes/hive-cli-agent-for-laravel 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Interactive CLI that generates customized Claude Code markdown files (CLAUDE.md, commands, agents) for PHP projects with Symfony, Laravel, Rector, PHPStan, PHP-CS-Fixer, GrumPHP and more.
Slim starter / Slim skeleton package to boost your development with Slim framework
Generates a trait to help ease the access of custom repo methods
Alfabank REST API integration
Eco CLI for Laravel .env syncing
Laravel architecture guidance, application audit, and guard tooling for AI coding agents.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 37
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-23
