PHPackages                             arnautdev/filament-deploy-indicator - 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. [Admin Panels](/categories/admin)
4. /
5. arnautdev/filament-deploy-indicator

ActiveLibrary[Admin Panels](/categories/admin)

arnautdev/filament-deploy-indicator
===================================

Show application ENV and latest deployment info inside your Filament admin.

v1.3.2(1mo ago)23.1kMITPHPPHP ^8.2CI passing

Since Mar 5Pushed 3mo agoCompare

[ Source](https://github.com/arnautdev/filament-deploy-indicator)[ Packagist](https://packagist.org/packages/arnautdev/filament-deploy-indicator)[ Docs](https://github.com/arnautdev/filament-deploy-indicator)[ GitHub Sponsors](https://github.com/arnautdev)[ RSS](/packages/arnautdev-filament-deploy-indicator/feed)WikiDiscussions main Synced 1w ago

READMEChangelog (10)Dependencies (55)Versions (19)Used By (0)

Filament Deploy Indicator
=========================

[](#filament-deploy-indicator)

Show the current application environment (ENV) and optional latest deployment info in your Filament topbar.

[![Latest Version on Packagist](https://camo.githubusercontent.com/60b12b1f5e375bc04791cd843c1e1af20b5990cbf6a0c3f0b16e5b44ac96ea37/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f61726e6175746465762f66696c616d656e742d6465706c6f792d696e64696361746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arnautdev/filament-deploy-indicator)[![GitHub Tests Action Status](https://camo.githubusercontent.com/1f3175250fd713c31225d3acf7313c6424cb1a2dcf1ba5af84487a5cc74c78dd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61726e6175746465762f66696c616d656e742d6465706c6f792d696e64696361746f722f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/arnautdev/filament-deploy-indicator/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/f9e9f3660da8c42d795905546c3ee93b89cebe332cebba00ad77858075a565be/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f61726e6175746465762f66696c616d656e742d6465706c6f792d696e64696361746f722f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/arnautdev/filament-deploy-indicator/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/7c45134d92a4a6db9f65ffa840b092a332bd99c92831c26b3ebc259e85213fe9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f61726e6175746465762f66696c616d656e742d6465706c6f792d696e64696361746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/arnautdev/filament-deploy-indicator)

Features
--------

[](#features)

- Shows current `APP_ENV` (mapped to a short label like `PROD`, `STAGE`, `LOCAL`) with a color-coded badge.
- Optional hint next to the label: commit hash, deploy time, git tag, or branch name.
- Click the badge to see full deployment info: commit, branch, author, message, tag, deploy time.
- Copy commit hash to clipboard with one click.
- Reads deployment metadata from a JSON file (default: `storage/app/private/deploy-info.json`).
- Can auto-generate the JSON from git on first request, or generate it during deployment via Artisan command.
- Records every deploy to an append-only history log and shows the last few in the dropdown.
- Optional **Dev Tools** navigation group: surface links to Horizon, Telescope, Mailpit, and your own tools in the sidebar, each gated by permission and environment.

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

[](#requirements)

- PHP ^8.2
- Filament ^4.0 or ^5.0

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

[](#installation)

```
composer require arnautdev/filament-deploy-indicator
```

Register the plugin
-------------------

[](#register-the-plugin)

Add the plugin to your panel provider:

```
use Arnautdev\FilamentDeployIndicator\FilamentDeployIndicatorPlugin;

public function panel(Panel $panel): Panel
{
    return $panel
        ->plugins([
            FilamentDeployIndicatorPlugin::make(),
        ]);
}
```

Conditional visibility
----------------------

[](#conditional-visibility)

Show the indicator only to specific users:

```
FilamentDeployIndicatorPlugin::make()
    ->visible(fn (): bool => auth()->user()?->is_admin === true),
```

Configuration
-------------

[](#configuration)

Everything is configurable two ways: publish the config file, or chain fluent methods on the plugin (Filament style). Fluent methods override the published config at runtime.

### Fluent configuration

[](#fluent-configuration)

```
FilamentDeployIndicatorPlugin::make()
    ->setPosition('panels::topbar.start')        // render hook position
    ->setCacheTtl(300)                            // cache seconds
    ->setFilePath(storage_path('app/deploy.json'))// read path
    ->setWritePath(storage_path('app/deploy.json'))// write path (auto-gen / command)
    ->setGitRoot(base_path())                     // git repo root
    ->setAutoGenerateWhenMissing(true)            // generate from git if missing

    // ENV badge
    ->setDefaultLabel('ENV')                      // fallback label
    ->setDefaultColor('gray')                     // fallback color
    ->setEnvMap([                                 // replace whole map
        'production' => ['label' => 'PROD', 'color' => 'danger'],
    ])
    ->mapEnv('qa', 'QA', 'warning')               // add/override one env

    // Topbar hint
    ->setTopbarHint('commit')                     // null|commit|deployed_at|tag|branch
    ->setCommitLength(7)                           // commit hash chars
    ->setDateFormat('d.m H:i')                     // deployed_at format

    // Deploy history
    ->setHistoryEnabled(true)
    ->setHistoryPath(storage_path('app/private/deploy-history.jsonl'))
    ->setHistoryMaxEntries(100)
    ->setHistoryShowInDropdown(5)

    // Dev Tools navigation group
    ->devTools()                                   // enable the group
    ->devToolsGroupLabel('Dev Tools')              // group label (string or Closure)
    ->devToolsGroupCollapsed(true)                 // start collapsed
    ->devToolsPermission('access-dev-tools')       // group gate (string or Closure)
    ->addTool('grafana', [                         // add/override one tool
        'label' => 'Grafana',
        'icon' => 'heroicon-o-chart-bar',
        'url' => env('GRAFANA_URL'),
        'permission' => null,                      // null | ability string
        'environments' => null,                    // null = everywhere; ['local'] to restrict
        'open_in_new_tab' => true,
    ])
    ->toolPermission('grafana', fn (): bool => auth()->user()?->isAdmin() === true)

    // Conditional visibility
    ->visible(fn (): bool => auth()->user()?->is_admin === true),
```

MethodConfig key`setPosition()``position``setCacheTtl()``cache_ttl``setFilePath()``file_path``setWritePath()``write_path``setGitRoot()``git_root``setAutoGenerateWhenMissing()``auto_generate_when_missing``setDefaultLabel()``default.label``setDefaultColor()``default.color``setEnvMap()``env_map``mapEnv()``env_map.{env}``setTopbarHint()``topbar.show``setCommitLength()``topbar.commit_length``setDateFormat()``topbar.date_format``setHistoryEnabled()``history.enabled``setHistoryPath()``history.path``setHistoryMaxEntries()``history.max_entries``setHistoryShowInDropdown()``history.show_in_dropdown``devTools()``dev_tools.enabled``devToolsGroupLabel()``dev_tools.group_label``devToolsGroupCollapsed()``dev_tools.collapsed``devToolsPermission()``dev_tools.permission` (string) / runtime (Closure)`setTools()``dev_tools.tools``addTool()``dev_tools.tools.{key}``toolPermission()``dev_tools.tools.{key}.permission` (string) / runtime (Closure)`visible()`(runtime only)### Published config file

[](#published-config-file)

```
php artisan vendor:publish --tag="filament-deploy-indicator-config"
```

### Main options

[](#main-options)

OptionDefaultDescription`position``GLOBAL_SEARCH_BEFORE`Filament render hook position`cache_ttl``30`Cache time in seconds`file_path``storage/app/private/deploy-info.json`Path to read deployment JSON from`write_path``null` (falls back to `file_path`)Path to write generated JSON to`auto_generate_when_missing``true`Generate JSON using git if file is missing`git_root``base_path()`Root of the git repository (env: `DEPLOY_INDICATOR_GIT_ROOT`)`env_map`See configMapping of environment → label + Filament color`topbar.show``'commit'``null`, `'commit'`, `'deployed_at'`, `'tag'`, `'branch'``topbar.commit_length``7`Number of commit hash characters to show`topbar.date_format``'d.m H:i'`PHP date format for `deployed_at` hint`history.enabled``true`Record deploys to an append-only history log`history.path``storage/app/private/deploy-history.jsonl`Path of the JSONL history file`history.max_entries``100`How many entries to keep (older ones are trimmed)`history.show_in_dropdown``5`How many recent deploys to show in the dropdown`dev_tools.enabled``true`Master switch for the Dev Tools navigation group`dev_tools.group_label`translation keySidebar group label (string or translation key)`dev_tools.collapsed``true`Whether the group starts collapsed`dev_tools.permission``null`Group-level Gate ability (`null` = everyone)`dev_tools.tools`See configMap of tool key → link definition---

Dev Tools navigation group
--------------------------

[](#dev-tools-navigation-group)

Surface links to developer tooling (Horizon, Telescope, Mailpit, OpenObserve, Swagger, or anything you add) as a collapsible **Dev Tools** group in the Filament sidebar. It is disabled unless you turn it on — either keep `dev_tools.enabled` in the published config or call `->devTools()` on the plugin.

Each tool is:

- **Hidden when its URL is empty** — set the URL via env so each environment points at its own host.
- **Gated by permission** — a group-level gate plus an optional per-tool gate. A permission can be a Gate ability string (the user must `->can()` it) or a Closure for custom logic.
- **Restricted by environment** — `environments: null` shows it everywhere (production included); an array like `['local', 'development']` keeps it out of production.

### Configure via env

[](#configure-via-env)

The shipped preset reads these env vars (empty URL = hidden):

```
DEPLOY_INDICATOR_HORIZON_URL=/horizon
DEPLOY_INDICATOR_TELESCOPE_URL=/telescope
DEPLOY_INDICATOR_MAILPIT_URL=http://localhost:8025
DEPLOY_INDICATOR_OPENOBSERVE_URL=
DEPLOY_INDICATOR_SWAGGER_URL=/swagger
```

### Permissions

[](#permissions)

Restrict the whole group, or a single tool:

```
FilamentDeployIndicatorPlugin::make()
    ->devTools()
    ->devToolsPermission('access-dev-tools')      // everyone in the group must pass this
    ->toolPermission('horizon', 'access-horizon'); // and this to see Horizon specifically
```

A tool is visible only when **both** the group gate and its own gate pass. Use `null` (the default) to leave a gate open.

> **Config caching:** string abilities live in the published config and survive `php artisan config:cache`. Closures cannot be cached — pass them through `->devToolsPermission(fn () => ...)` / `->toolPermission('key', fn () => ...)` instead, which keeps them on the plugin instance.

### Add your own tools

[](#add-your-own-tools)

```
FilamentDeployIndicatorPlugin::make()
    ->devTools()
    ->addTool('grafana', [
        'label' => 'Grafana',
        'icon' => 'heroicon-o-chart-bar',
        'url' => env('GRAFANA_URL'),
        'permission' => 'access-grafana', // optional
        'environments' => null,           // optional
        'open_in_new_tab' => true,
    ]);
```

Use `->setTools([...])` to replace the whole preset, or edit the `dev_tools.tools` array in the published config.

---

Generating deployment info
--------------------------

[](#generating-deployment-info)

The plugin reads deployment metadata from a JSON file. There are two ways to generate it.

### Option 1: During deployment (recommended)

[](#option-1-during-deployment-recommended)

Run the command as part of your deployment pipeline. Git data (commit, branch, author, message) is read automatically. This also gives accurate deployment timestamps.

```
php artisan deploy-indicator:write --env=production
```

Any option you pass overrides the git value. For example, to set a custom author:

```
php artisan deploy-indicator:write \
  --env=production \
  --author="CI Bot" \
  --deployed-at="$(date '+%Y-%m-%d %H:%M:%S')"
```

### Option 2: Auto-generate on first request

[](#option-2-auto-generate-on-first-request)

Set `auto_generate_when_missing = true` in config (default). The JSON will be generated from git automatically on the first request if the file is missing. Useful for local development.

---

Deploy history
--------------

[](#deploy-history)

Every time deploy info is written (via `deploy-indicator:write` or auto-generate), the package appends a snapshot to an append-only JSONL log at `storage/app/private/deploy-history.jsonl`.

- **Deduped by commit hash** — running the command twice for the same commit does not create duplicate entries.
- **Retention** — capped at `history.max_entries` (default `100`). Older entries are trimmed automatically.
- **Shown in the dropdown** — under the current deploy info, a "Recent deploys" section lists the last `history.show_in_dropdown` entries (default `5`) in `commit · author · deployed_at` format.
- **Disable** — set `history.enabled` to `false` in config.

Each line in the JSONL file is a self-contained JSON object, e.g.:

```
{"environment":"production","deployed_at":"2026-04-27 10:00:00","commit":"abc123","branch":"main","author":"Dmitry","commit_message":"...","recorded_at":"2026-04-27 10:00:01"}
```

---

CI/CD integration examples
--------------------------

[](#cicd-integration-examples)

### GitHub Actions

[](#github-actions)

Git data is read automatically. Pass `--commit-url` to make the commit hash clickable in the dropdown.

```
- name: Write deploy info
  run: |
    php artisan deploy-indicator:write \
      --env=production \
      --commit-url="${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}"
```

### GitLab CI

[](#gitlab-ci)

```
deploy:
  script:
    - |
      php artisan deploy-indicator:write \
        --env=production \
        --commit-url="$CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA"
```

### Shell / custom script

[](#shell--custom-script)

```
php artisan deploy-indicator:write --env=production
```

---

Verify your setup
-----------------

[](#verify-your-setup)

Run the check command to see the current state of the plugin configuration:

```
php artisan deploy-indicator:check
```

Example output:

```
Filament Deploy Indicator — Setup Check

  ✓ Config file published
  ✓ Git repository detected at: /var/www/html
  ✓ Git info readable (commit: abc1234, branch: main)
  ✓ deploy-info.json found at: storage/app/private/deploy-info.json
  ✓ deploy-info.json is valid JSON
  ✓ Write path is writable: storage/app/private

Current deployment info:
 +--------------+-----------------------+
 | Key          | Value                 |
 +--------------+-----------------------+
 | environment  | production            |
 | deployed_at  | 2026-03-05 10:00:00   |
 | commit       | abc1234...            |
 | branch       | main                  |
 | author       | Dmitry                |
 +--------------+-----------------------+

```

---

Deployment JSON format
----------------------

[](#deployment-json-format)

The plugin reads a JSON file with this structure:

```
{
  "environment": "production",
  "deployed_at": "2026-03-04 16:30:00",
  "commit": "33de817f4b2c3a1e9d0f8c7b5e2a4d6f8b1c3e5a",
  "branch": "main",
  "author": "Dmitry",
  "commit_message": "initial release",
  "commit_url": "https://github.com/your/repo/commit/33de817",
  "tag": "v1.0.0"
}
```

All fields are optional. Default location: `storage/app/private/deploy-info.json`.

---

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)

- [Dmitry Arnaut](https://github.com/arnautdev)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 50% 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

11

Last Release

34d ago

Major Versions

v1.0.1 → 5.x-dev2026-03-06

### Community

Maintainers

![](https://www.gravatar.com/avatar/d3b124fd52a66c0436019492fecc95dcae08e2bd45ea8e3e376ce494830948ed?d=identicon)[dmitrii.arnaut@gmail.com](/maintainers/dmitrii.arnaut@gmail.com)

---

Top Contributors

[![arnautdev](https://avatars.githubusercontent.com/u/13415129?v=4)](https://github.com/arnautdev "arnautdev (8 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (2 commits)")

---

Tags

environmentfilamentfilament-adminfilament-pluginfilament-pluginsfilamentphplaravellaravel-packagelaravelfilamentfilament-pluginfilamentphparnautdevfilament-envfilament-deploy-infofilament-deploy-indicator

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/arnautdev-filament-deploy-indicator/health.svg)

```
[![Health](https://phpackages.com/badges/arnautdev-filament-deploy-indicator/health.svg)](https://phpackages.com/packages/arnautdev-filament-deploy-indicator)
```

###  Alternatives

[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

6758.2k2](/packages/marcelweidum-filament-passkeys)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

86240.3k9](/packages/stephenjude-filament-two-factor-authentication)[relaticle/custom-fields

User Defined Custom Fields for Laravel Filament

16461.2k](/packages/relaticle-custom-fields)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.8k](/packages/rawilk-profile-filament-plugin)[backstage/mails

View logged mails and events in a beautiful Filament UI.

16321.5k](/packages/backstage-mails)[mradder/filament-logger

Audit logging, activity tracking, exports, alerts, and dashboards for Filament admin panels.

2318.8k1](/packages/mradder-filament-logger)

PHPackages © 2026

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