PHPackages                             magna-cms/plugin-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. magna-cms/plugin-sdk

ActiveLibrary

magna-cms/plugin-sdk
====================

The official SDK for building Magna CMS plugins — extension contracts, the plugin base class, and the manifest spec.

v1.3.0(1mo ago)04752MITPHPPHP ^8.3

Since Jul 12Pushed 1mo agoCompare

[ Source](https://github.com/Magna-CMS/Magna-Plugin-SDK)[ Packagist](https://packagist.org/packages/magna-cms/plugin-sdk)[ Docs](https://github.com/Magna-CMS/Magna-Plugin-SDK)[ RSS](/packages/magna-cms-plugin-sdk/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (8)Versions (3)Used By (2)

Magna Plugin SDK
================

[](#magna-plugin-sdk)

The official SDK for building [Magna CMS](https://github.com/jish-44/Magna) plugins.

It contains the **stable, versioned public API** a plugin compiles against — the extension contracts, the `Plugin` base class, and the `magna.json` manifest spec — so you can build a plugin in your own repository without depending on Magna's core.

Install
-------

[](#install)

```
composer require magna-cms/plugin-sdk
```

Quick start
-----------

[](#quick-start)

A plugin is a Composer package with `"type": "magna-plugin"`, a `magna.json`manifest, and an entry class that extends `Magna\Plugins\Plugin`:

```
use Magna\Plugins\Plugin;
use Magna\Contracts\RegistersDashboardWidgets;

class HelloPlugin extends Plugin implements RegistersDashboardWidgets
{
    public function boot(): void
    {
        // load routes, views, listeners…
    }

    public function dashboardWidgets(): array
    {
        return [\Acme\Hello\Widgets\HelloWidget::class];
    }
}
```

`magna.json`:

```
{
    "name": "acme/hello",
    "displayName": "Hello",
    "description": "An example plugin.",
    "version": "1.0.0",
    "author": "Acme",
    "license": "MIT",
    "compat": { "magna": "^1.0", "php": "^8.3" },
    "entry": "Acme\\Hello\\HelloPlugin",
    "permissions": []
}
```

The manifest is validated against [`schema/magna.schema.json`](schema/magna.schema.json).

Extension contracts
-------------------

[](#extension-contracts)

Implement any of these interfaces on your entry class to hook into the CMS. The core calls the matching method at the right point in the lifecycle:

ContractMethodProvides`RegistersAdminResources``adminResources()`Filament resources (CRUD screens)`RegistersAdminNavigation``adminNavigation()`A sidebar nav group`RegistersDashboardWidgets``dashboardWidgets()`Admin dashboard widgets`RegistersSettingsPages``settingsPages()`Pages under Settings`RegistersBlocks``blockPaths()`Block definitions`RegistersWebhookEvents``webhookEvents()`Custom webhook event keys`ExtendsEntryForm``entryFormExtensions()`Extra fields on a content type form`FiltersApiQuery``filterApiQuery()`Scope the delivery API queryVersioning
----------

[](#versioning)

This package is semantically versioned. Everything exported here is a public contract: within a major version, existing signatures will not break. Your plugin declares which core it supports via `compat.magna` in `magna.json`.

License
-------

[](#license)

MIT.

###  Health Score

45

—

FairBetter than 91% of packages

Maintenance91

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~14 days

Total

2

Last Release

35d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7486c821242053408d6d04a46020d48a5f893bd3eb6e7b851fc86a76cba0973a?d=identicon)[jishnu](/maintainers/jishnu)

---

Top Contributors

[![jish-44](https://avatars.githubusercontent.com/u/27047484?v=4)](https://github.com/jish-44 "jish-44 (5 commits)")

---

Tags

pluginlaravelsdkcmsmagnamagna-cms

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/magna-cms-plugin-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/magna-cms-plugin-sdk/health.svg)](https://phpackages.com/packages/magna-cms-plugin-sdk)
```

###  Alternatives

[spatie/laravel-medialibrary

Associate files with Eloquent models

6.2k47.7M734](/packages/spatie-laravel-medialibrary)[statamic/cms

The Statamic CMS Core Package

4.9k3.9M1.2k](/packages/statamic-cms)[craftcms/cms

Craft CMS

3.6k3.7M3.5k](/packages/craftcms-cms)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.8k40.0k](/packages/matomo-matomo)[laravel/ai

The official AI SDK for Laravel.

1.1k6.4M360](/packages/laravel-ai)[psalm/plugin-laravel

Psalm plugin for Laravel

3365.5M359](/packages/psalm-plugin-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
