Skip to content

xenthrall/about-plus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About Plus

Latest Version on Packagist Tests License

A richer, prettier php artisan about.

One command gives you the whole picture of a Laravel project: what it runs on, what it is made of, where its data lives and what the working tree looks like. Useful on day one of a new codebase, and useful on day one thousand of your own.

php artisan about:plus

Preview

  ╭────────────────────────────────────────────────────────────────────────╮
  │                         ABOUT PLUS  ·  ERP OS                          │
  ╰────────────────────────────────────────────────────────────────────────╯

  Application
  ──────────────────────────────────────────────────────────────────────────
  Name ······························································ ERP OS
  Environment ··················································· production
  Debug mode ························································· false
  URL ················································ https://erp.tequia.co
  Locale ································································ es
  Maintenance ························································ false

  Framework
  ──────────────────────────────────────────────────────────────────────────
  Laravel ·························································· 12.64.0
  PHP ································································ 8.3.6
  Composer ·························································· 2.8.12
  Config cached ······················································· true
  Routes cached ······················································· true
  Events cached ······················································ false

  Project
  ──────────────────────────────────────────────────────────────────────────
  Routes ······························································· 243
  Middleware ···························································· 31
  Models ································································ 81
  Controllers ··························································· 57
  Policies ······························································ 18
  Events ································································ 34
  Listeners ····························································· 42
  Observers ····························································· 11
  Jobs ·································································· 29
  Notifications ························································· 14
  Mailables ······························································ 9
  Commands ······························································ 65

  Database
  ──────────────────────────────────────────────────────────────────────────
  Connection ························································· mysql
  Driver ····························································· MySQL
  Database ·························································· erp_os
  Migrations ··························································· 156
  Seeders ······························································· 18
  Factories ····························································· 62

  Cache
  ──────────────────────────────────────────────────────────────────────────
  Store ······························································ redis
  Driver ····························································· redis
  Prefix ····················································· erp_os_cache_

  Queue
  ──────────────────────────────────────────────────────────────────────────
  Connection ························································· redis
  Driver ····························································· redis
  Failed jobs ··············································· database-uuids

  Storage
  ──────────────────────────────────────────────────────────────────────────
  Default disk ·························································· s3
  storage/app ······················································· 2.3 GB
  storage/logs ······················································ 185 MB
  storage/framework ·················································· 41 MB
  bootstrap/cache ··················································· 1.2 MB

  Git
  ──────────────────────────────────────────────────────────────────────────
  Branch ······························································ main
  Last commit ································ feat(hr): add employee export
  Commit hash ······················································ a12f4bc
  Author ··········································· Jhon Jairo Tequia Rojas
  Committed on ·················································· 2026-07-18
  Uncommitted files ······················································ 3

  System
  ──────────────────────────────────────────────────────────────────────────
  Operating system ············································ Linux 6.17.0
  Architecture ······················································ x86_64
  PHP interface ························································ cli
  Memory limit ························································ 512M
  Max execution ·················································· unlimited
  Timezone ·················································· America/Bogota
  OpenSSL ··················································· OpenSSL 3.0.13

  ──────────────────────────────────────────────────────────────────────────
  Rendered in 143 ms using 26 MB of memory

Requirements

  • PHP 8.3+
  • Laravel 12 or 13

Installation

composer require tequia/about-plus --dev

The service provider is auto-discovered, so there is nothing else to wire up. Publish the config only if you want to customise the sections:

php artisan vendor:publish --tag=about-plus-config

Usage

Command Result
php artisan about:plus The full dashboard.
php artisan about:plus --compact The headline numbers only.
php artisan about:plus --json Machine readable output.
php artisan about:plus --only=git A single section.
php artisan about:plus --only=git,database Several sections.
php artisan about:plus --except=storage Everything but one section.

--only and --except take section keys, are case insensitive, and accept either a comma separated list or a repeated flag. Sections always render in the order they are configured, not the order you list them in. --except wins over --only. The available keys are:

application  framework  project  database  cache
queue        storage    git      system

JSON output

--json prints the same data with native types, slugged keys and no ANSI codes, which makes it safe to pipe:

php artisan about:plus --json --only=database | jq '.database.migrations'
{
    "database": {
        "connection": "mysql",
        "driver": "MySQL",
        "database": "erp_os",
        "migrations": 156,
        "seeders": 18,
        "factories": 62
    },
    "meta": {
        "duration_ms": 41.28,
        "memory_bytes": 27262976
    }
}

Anything the package cannot determine — git on a project that is not a repository, a missing storage directory — reports Not available rather than failing or lying with a zero.

How counting works

Counts are inheritance based wherever the framework gives us a base class, so a model living outside app/Models is still counted as a model. Where there is no base class to look at — listeners, observers, policies — counting falls back to the namespace. Discovery walks your PSR-4 autoload map, not a hardcoded app/.

Adding your own section

A section is any class implementing AboutSection. It is resolved from the container, so type hint whatever it needs:

namespace App\About;

use Illuminate\Contracts\Config\Repository;
use Tequia\AboutPlus\Contracts\AboutSection;

class HorizonSection implements AboutSection
{
    public function __construct(private readonly Repository $config) {}

    public function key(): string
    {
        return 'horizon';
    }

    public function label(): string
    {
        return 'Horizon';
    }

    public function render(): array
    {
        return [
            'Prefix' => $this->config->get('horizon.prefix'),
            'Workers' => count($this->config->get('horizon.defaults', [])),
        ];
    }
}

Register it in config/about-plus.php:

'sections' => [
    Sections\ApplicationSection::class,
    // …
    App\About\HorizonSection::class,
],

Return plain scalars — colouring, alignment and truncation are the renderer's job, which is what keeps --json output clean. To shorten your section under --compact, implement HasCompactView and list the labels worth keeping.

Testing

composer test

Roadmap

Ideas under consideration for future releases:

  • --watch to refresh the dashboard on an interval
  • Sections for scheduled tasks, notifications channels and installed packages
  • Package health checks (pending migrations, stale caches, debug in production)
  • Export to Markdown for issue templates and onboarding docs
  • Optional ASCII logo, neofetch style

Contributing

Pull requests are welcome. Please run composer test and composer format before opening one.

Credits

Built by Jhon Jairo Tequia Rojas, standing on the shoulders of php artisan about.

License

The MIT License (MIT). See LICENSE.md.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages