PHPackages                             blackpig-creatif/grimoire - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. blackpig-creatif/grimoire

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

blackpig-creatif/grimoire
=========================

In-panel documentation for FilamentPHP applications

v2.0.0(1mo ago)0713MITPHPPHP ^8.3|^8.4CI failing

Since Feb 23Pushed 1mo agoCompare

[ Source](https://github.com/Blackpig/grimoire)[ Packagist](https://packagist.org/packages/blackpig-creatif/grimoire)[ Docs](https://github.com/blackpig/grimoire)[ GitHub Sponsors](https://github.com/blackpig-creatif)[ RSS](/packages/blackpig-creatif-grimoire/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (28)Versions (7)Used By (3)

Grimoire
========

[](#grimoire)

[![Latest Version on Packagist](https://camo.githubusercontent.com/71ba93160dc1da5ad527ffd3d6054922e46d408366ad3000184d678bab33240a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c61636b7069672d637265617469662f6772696d6f6972652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blackpig-creatif/grimoire)[![GitHub Tests Action Status](https://camo.githubusercontent.com/7f605cd2ac2ddab4f0368ef84f8430074eda08531b1881bf59032fec5284c235/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626c61636b7069672d637265617469662f6772696d6f6972652f72756e2d74657374732e796d6c3f6272616e63683d352e78266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/blackpig-creatif/grimoire/actions?query=workflow%3Arun-tests+branch%3A5.x)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b6872893f28063579744efd664be571be34bc89456b07397b050e4cf831342ba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f626c61636b7069672d637265617469662f6772696d6f6972652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d352e78266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/blackpig-creatif/grimoire/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3A5.x)[![Total Downloads](https://camo.githubusercontent.com/5e0a733c0b17bd2b7236c5b8414c509ec5b514a0a7cf7a3b54fa3c6bf986da84/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c61636b7069672d637265617469662f6772696d6f6972652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/blackpig-creatif/grimoire)

**In-panel documentation for FilamentPHP v5 applications.**

Grimoire lets you embed rich, versioned documentation directly inside your Filament admin panel. Organise content into *Tomes* (top-level books) and *Chapters* (individual pages), author in Markdown with YAML frontmatter, and edit chapters inline without leaving the panel.

---

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11 or 12
- Filament v5

---

Installation
------------

[](#installation)

```
composer require blackpig-creatif/grimoire
```

Publish the config (optional):

```
php artisan vendor:publish --tag="grimoire-config"
```

---

Plugin Registration
-------------------

[](#plugin-registration)

Register the plugin in your Filament panel provider:

```
use BlackpigCreatif\Grimoire\GrimoirePlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            GrimoirePlugin::make()
                ->navigationGroup('Help')    // optional — defaults to 'Help'
                ->withDocs(),                // optional — enables Grimoire's own built-in docs
        ]);
}
```

---

Registering a Tome
------------------

[](#registering-a-tome)

A Tome is a top-level documentation section. Register one in your `AppServiceProvider::boot()`:

```
use BlackpigCreatif\Grimoire\Facades\Grimoire;

Grimoire::registerTome(
    id: 'my-docs',
    label: 'My Documentation',
    icon: 'heroicon-o-book-open',
    path: resource_path('grimoire/my-docs'),
    clusterClass: \App\Filament\Grimoire\Clusters\MyDocsCluster::class,
);
```

Then scaffold the required Filament stubs:

```
php artisan grimoire:make-tome my-docs "My Documentation"
```

---

Adding Chapters
---------------

[](#adding-chapters)

```
php artisan grimoire:make-chapter my-docs my-chapter "My Chapter Title"
```

This generates a Filament page stub and a Markdown file at `resources/grimoire/my-docs/my-chapter.md`. Add content with YAML frontmatter:

```
---
title: My Chapter
order: 1
icon: heroicon-o-document-text
---

# My Chapter

Content goes here.
```

---

Extending a Tome
----------------

[](#extending-a-tome)

Override or add chapters to any Tome (including vendor Tomes) from your app:

```
Grimoire::extendTome(
    id: 'my-docs',
    path: resource_path('grimoire/my-docs-local'),
);
```

Local chapters take priority over vendor chapters on slug collision — useful for overriding package documentation with app-specific notes.

---

Permissions
-----------

[](#permissions)

Access to view and edit documentation is controlled via `config/grimoire.php`:

```
'permissions' => [
    'view' => null,   // null = allow all authenticated users (default)
    'edit' => null,   // null = deny all (default)
],
```

Each key accepts one of the following:

**`null` (default behaviour)**

- `view`: all authenticated users may read chapters
- `edit`: no one may edit chapters

**A Laravel Gate ability name**

```
'permissions' => [
    'view' => 'view-docs',
    'edit' => 'edit-docs',
],
```

Define the ability in `AuthServiceProvider` (or a dedicated `GrimoirePolicy`):

```
Gate::define('view-docs', fn (User $user) => $user->hasRole('staff'));
Gate::define('edit-docs', fn (User $user) => $user->hasRole('admin'));
```

**A `Class@method` string**

```
'permissions' => [
    'view' => \App\Policies\GrimoirePolicy::class . '@view',
    'edit' => \App\Policies\GrimoirePolicy::class . '@edit',
],
```

The method receives the authenticated user as its only argument and must return a boolean.

**A closure (local development only)**

Closures work when config is not cached, making them convenient for local development. They cannot be used in production with `php artisan config:cache`.

```
'permissions' => [
    'view' => fn ($user) => true,
    'edit' => fn ($user) => $user->is_admin,
],
```

---

Inline Editing
--------------

[](#inline-editing)

Authenticated users with edit permission can edit chapter content directly in the panel. Click **Edit** on any chapter page to switch to an inline editor with a Markdown editor for content and a YAML editor for frontmatter.

---

Locale Support
--------------

[](#locale-support)

Grimoire supports two locale strategies for multilingual documentation. Configure in `config/grimoire.php`:

```
'locale_strategy' => 'suffix',   // 'suffix' or 'directory'
'fallback_locale'  => 'en',
```

**Suffix strategy** — place locale variants alongside the default file:

```
my-chapter.md       ← locale-neutral fallback
my-chapter.fr.md    ← French
my-chapter.de.md    ← German

```

**Directory strategy** — organise by locale subdirectory:

```
my-chapter.md
fr/my-chapter.md
de/my-chapter.md

```

Grimoire resolves files in order: current locale → fallback locale → locale-neutral.

---

Built-in Self-Documentation
---------------------------

[](#built-in-self-documentation)

Enable Grimoire's own documentation Tome inside your panel with `->withDocs()`:

```
GrimoirePlugin::make()->withDocs()

// Or conditionally — e.g. local environment only:
GrimoirePlugin::make()->withDocs(fn ($user) => app()->isLocal())
```

---

Caching
-------

[](#caching)

For production, cache the navigation tree:

```
php artisan grimoire:cache
php artisan grimoire:clear-cache
```

---

Testing
-------

[](#testing)

```
composer test
```

---

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](.github/SECURITY.md) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Blackpig Creatif](https://github.com/blackpig-creatif)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

45

—

FairBetter than 93% of packages

Maintenance90

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity56

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 ~12 days

Total

4

Last Release

48d ago

Major Versions

v1.0.3 → v2.0.02026-04-01

PHP version history (2 changes)v1.0.0PHP ^8.2|^8.3|^8.4

v2.0.0PHP ^8.3|^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/e094a144c7d16d2115fac66e49bf5013829a545f111c618ff22fe11ddf8c7bf4?d=identicon)[Blackpig](/maintainers/Blackpig)

---

Top Contributors

[![Blackpig](https://avatars.githubusercontent.com/u/1029317?v=4)](https://github.com/Blackpig "Blackpig (8 commits)")

---

Tags

laraveldocumentationfilamentfilament-pluginfilamentphpGrimoireblackpig-creatif

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/blackpig-creatif-grimoire/health.svg)

```
[![Health](https://phpackages.com/badges/blackpig-creatif-grimoire/health.svg)](https://phpackages.com/packages/blackpig-creatif-grimoire)
```

###  Alternatives

[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12247.8k](/packages/jibaymcs-filament-tour)[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

33184.7k6](/packages/schmeits-filament-character-counter)[defstudio/filament-searchable-input

A searchable autocomplete input for Filament forms

3212.4k](/packages/defstudio-filament-searchable-input)[agencetwogether/hookshelper

Simple plugin to toggle display hooks available in current page.

2312.7k](/packages/agencetwogether-hookshelper)[jiten14/jitone-ai

jitone-ai is a powerful FilamentPHP plugin that integrates AI-powered features directly into your Filament forms.

213.1k](/packages/jiten14-jitone-ai)

PHPackages © 2026

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