承接 cline/analyzer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

cline/analyzer

最新稳定版本:3.2.0

Composer 安装命令:

composer require cline/analyzer

包简介

Configurable parallel PHP code analyzer for checking class references

README 文档

README

Configurable parallel PHP code analyzer for checking class references with Laravel Prompts UI and AI agent orchestration.

Requirements

Requires PHP 8.4+ and Laravel 12+

Installation

composer require cline/analyzer

The service provider will be automatically registered via Laravel's package discovery.

Features

  • Laravel Artisan Command: php artisan analyzer:analyze for easy CLI usage
  • AI Agent Mode: Generate XML-structured prompts for parallel AI-powered fixes
  • Configurable Architecture: Replace core components via interfaces
  • Parallel Processing: Analyze files concurrently with configurable worker count
  • Laravel Prompts UI: Beautiful terminal reporting with summary statistics
  • Flexible Resolution: Custom path, file, and analysis resolvers
  • Based on graham-analyzer: Built on battle-tested analysis logic

Usage

Artisan Command

# Analyze default paths (app, tests) with auto-detected CPU cores php artisan analyzer:analyze # Analyze specific paths php artisan analyzer:analyze src tests # Auto-detect CPU cores for parallel processing php artisan analyzer:analyze --workers=auto # Specify exact worker count php artisan analyzer:analyze --workers=8 # Ignore specific class patterns php artisan analyzer:analyze --ignore="Illuminate\\*" --ignore="Symfony\\*" # Exclude files/directories from scanning php artisan analyzer:analyze --exclude=vendor --exclude=storage # AI agent mode - outputs XML prompts for automated fixing php artisan analyzer:analyze --agent

Programmatic Usage

use Cline\Analyzer\Analyzer; use Cline\Analyzer\Config\AnalyzerConfig; $config = AnalyzerConfig::make() ->paths(['app', 'tests']) ->workers(0) // 0 = auto-detect CPU cores ->ignore(['Illuminate\\*']) ->exclude(['vendor', 'storage']); $analyzer = new Analyzer($config); $results = $analyzer->analyze();

AI Agent Mode

Generate structured prompts for spawning parallel AI agents to fix issues:

$config = AnalyzerConfig::make() ->paths(['app']) ->agentMode(); $analyzer = new Analyzer($config); $analyzer->analyze();

This outputs XML-structured orchestration prompts grouped by namespace for efficient parallel processing.

Configuration

Publish the configuration file:

php artisan vendor:publish --tag=analyzer-config

This creates analyzer.php in your project root:

<?php use Cline\Analyzer\Config\AnalyzerConfig; return AnalyzerConfig::make() ->paths(['app', 'tests']) ->workers(0) // 0 = auto-detect CPU cores, or specify (e.g., 4, 8) ->ignore(['Illuminate\\*', 'Symfony\\*']) ->exclude(['vendor', 'node_modules', 'storage']);

Custom Resolvers

Implement custom resolution logic:

use Cline\Analyzer\Contracts\PathResolverInterface; class CustomPathResolver implements PathResolverInterface { public function resolve(array $paths): array { // Custom path resolution logic return $resolvedPaths; } }

Documentation

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固