| Recommend this page to a friend! |
| Info | Documentation | Reputation | Support forum | Blog | Links |
| Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
| 2026-05-17 (1 month ago) | Not yet rated by the users | Total: Not yet counted | Not yet ranked | |||||
| Version | License | PHP version | Categories | |||
| codemetry-laravel 1.0 | MIT/X Consortium ... | 7 | Tools, Web services, Artificial intel..., P... |
Please read this document to learn how to install and use a Laravel Artisan command to analyze the quality of code in a repository.
Laravel adapter for Codemetry - provides Artisan commands and service provider integration for Git repository analysis.
This package depends on codemetry/core.
Documentation | Getting Started
composer require codemetry/laravel
This automatically installs codemetry/core as a dependency.
Publish the configuration file:
php artisan vendor:publish --tag=codemetry-config
Both codemetry/laravel and codemetry/core must be updated together to ensure compatibility:
composer update "codemetry/*"
Or explicitly:
composer update codemetry/laravel codemetry/core
> Note: Running composer update codemetry/laravel alone may not work because both packages are versioned together and require matching versions.
# Table output (one row per day)
php artisan codemetry:analyze --days=7
# JSON output
php artisan codemetry:analyze --days=7 --format=json
# Filter by author or branch
php artisan codemetry:analyze --days=7 --author="Jane Doe" --branch=main
# Specify date range
php artisan codemetry:analyze --since=2024-01-01 --until=2024-01-31
# Enable AI-powered explanations (requires API keys in config)
php artisan codemetry:analyze --days=7 --ai=1
After publishing, edit config/codemetry.php:
return [
// Number of days to analyze by default
'days' => 7,
// Baseline period for normalization (in days)
'baseline_days' => 56,
// Follow-up fix detection horizon (in days)
'follow_up_horizon_days' => 3,
// AI configuration (optional)
'ai' => [
'enabled' => false,
'engine' => 'openai', // openai, anthropic, deepseek, google
'api_key' => env('CODEMETRY_AI_API_KEY'),
],
];
AI integration is opt-in and metrics-only. Engines never receive raw code or diffs.
Supported engines: - OpenAI - Anthropic (Claude) - DeepSeek - Google
When AI is requested but unavailable (missing keys, API failure), analysis continues normally with a warning.
MIT
| File | Role | Description | ||
|---|---|---|---|---|
| Data | Auxiliary data | |||
| Data | Auxiliary data | |||
| Doc. | Documentation | |||
| / | src |
| File | Role | Description |
|---|---|---|
| |
Class | Class source |
| |
Class | Class source |
| / | tests |
| File | Role | Description |
|---|---|---|
| |
Class | Class source |
| |
Aux. | Configuration script |
| The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
| Version Control | Unique User Downloads | |||||||
| 100% |
|
| Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.