Command Palette plugin screenshot
Dark mode ready
No multilingual support
Supports v5.x

Command Palette by Usama Muneer

Community

A Spotlight/CMD+K style command palette for quick navigation and actions across Filament panels.

Tags: Developer Tool Panels
Supported versions:
5.x 4.x
Usama Muneer avatar Author: Usama Muneer

Package health

Automated checks of this plugin's Composer package

89 / 100
Security 85
Maintenance 90
Ecosystem 100
15 checks
  • Passed: GitHub Actions pinned to SHA
  • Skipped: GitLab CI includes pinned to SHA
  • Passed: Open security advisories
  • Passed: Dependabot PR responsiveness — No open Dependabot PRs.
  • Skipped: Renovate MR responsiveness
  • Failed: Dependabot or Renovate configured — No dependency updater configuration found. View details on Plumb
  • Skipped: Dependency update cooldown configured
  • Passed: Provides a security policy
  • Passed: Abandoned or archived — No consulted source marks the package abandoned (packagist, github).
  • Passed: Commit and release recency — Active: last commit 0 days ago; last release 16 days ago.
  • Passed: composer.lock not committed by library — composer.lock is absent from the released dist archive.
  • Warning: Dist archive is lean
  • Passed: Current Laravel version supported — Package dependencies resolve together with current Laravel 13.0.
  • Passed: Current PHP version supported — Constraint ^8.3 supports current PHP 8.6.
  • Skipped: Current Symfony version supported
Third-party plugin. This is built by the community, not the Filament team. Filament does not review, endorse, or vet the security of plugins outside the filament/ namespace. Review the source and install at your own risk. Found malware or an unresolved security issue the author won't address? Report it .
Powered by Plumb Last scanned 4 days ago

Documentation

Latest Version on Packagist Tests Total Downloads Daily Downloads Licence

Filament Command Palette

Press ⌘K and go anywhere in your panel — a page, a record, or an action — without touching the sidebar.

#Features

  • Fuzzy search. crus finds "Create User", user create finds it too, and resume finds "Résumé". Matched characters are highlighted.
  • Record search. Type an invoice number, land on the invoice. Built on each resource's existing Filament global search configuration, so most apps get this with no extra setup.
  • Actions, not just links. Run a server closure or fire a browser event. Sign out, switch theme, clear a cache.
  • Authorization aware. Commands are filtered by the same policies Filament uses, and every action is re-authorized on the server before it runs.
  • Learns what you use. Recently run commands rank higher and appear first on an empty search.
  • Search modes. > for actions, # for records, ? for the shortcut list.
  • Keyboard and screen reader ready. Full combobox semantics, focus trapping, focus restoration, and result announcements.
  • Per panel. Every option can differ between panels in the same application.
  • Three layouts. standard, groups, preview.
  • Tiered drill-down. Tab on a resource or a record to step inside it. View, edit, delete, and custom record actions without leaving the palette.
  • Filament actions in the overlay. CommandItem::filamentAction() runs a real Filament Action, with forms and confirmation, from any page.
  • Pins. ⌘P pins a result to the top of the empty-state list.

#Requirements

  • PHP 8.3+
  • Laravel 11, 12 or 13
  • Filament v4 or v5

#Installation

composer require usamamuneerchaudhary/filament-command-palette

Register the plugin on your panel:

use Usamamuneerchaudhary\CommandPalette\FilamentCommandPalettePlugin;

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

That is the whole setup. The palette picks up your navigation, pages and resources automatically.

Or let the installer register the plugin on the panels you choose:

php artisan command-palette:install

It discovers Filament panel providers, injects FilamentCommandPalettePlugin::make(), asks for a shortcut, and can publish config and translations. Providers that already register the plugin are left alone. Use --no-interaction, --panel=, --shortcut= and --publish in CI.

#Configuration

Options can be set on the plugin, per panel:

FilamentCommandPalettePlugin::make()
    ->keyBindings(['mod+k'])
    ->template('groups')
    ->maxResults(12)
    ->recordSearch(true, maxResults: 20)
    ->recents(true, max: 5)
    ->pins(true, max: 8)
    ->topbarButton(false)
    ->cacheFor(60)

Or globally, in the published config file:

php artisan vendor:publish --tag=command-palette-config

Plugin options win over the config file, so the config sets your defaults and each panel adjusts from there.

maxResults() / max_results is a total cap on the ranked list, not a per-category limit. Recents are capped separately by recents.max (5 by default). Record search has its own record_search.max_results.

#Key bindings

mod means Cmd on macOS and Ctrl elsewhere. If Filament's own global search is bound to a shortcut, give the two different keys:

$panel
    ->globalSearchKeyBindings(['mod+shift+k'])
    ->plugins([
        FilamentCommandPalettePlugin::make()->keyBindings(['mod+k']),
    ]);

#Custom commands

Register commands on the plugin:

use Usamamuneerchaudhary\CommandPalette\Support\CommandItem;

FilamentCommandPalettePlugin::make()
    ->commands(fn () => [
        CommandItem::make('Billing portal', 'https://billing.example.com')
            ->group('External')
            ->openInNewTab()
            ->keywords(['invoice', 'subscription', 'payment']),
    ])

Register commands here rather than in the custom_commands config key. Config files are serialized by php artisan config:cache, and closures cannot survive that — it fails with "Your configuration files are not serializable". The config key still works, but the plugin is the right home for anything with a closure in it.

#Running an action

Return a string to redirect afterwards:

CommandItem::make('Clear application cache')
    ->icon(Heroicon::OutlinedTrash)
    ->action(function () {
        Artisan::call('cache:clear');

        Notification::make()->title('Cache cleared')->success()->send();
    })
    ->authorize(fn () => auth()->user()->isAdmin())

The browser only ever sends the command's id. The closure, the URL and the authorization check are all resolved server-side from a freshly built registry, so a stale or tampered payload cannot run anything.

To ask first, add requiresConfirmation(). The palette shows a confirmation modal and runs the closure only after the user confirms:

CommandItem::make('Clear application cache')
    ->action(fn () => Artisan::call('cache:clear'))
    ->requiresConfirmation(description: 'Every user gets a cold cache on their next request.')

Invokable classes survive config:cache and keep the panel provider small:

CommandItem::make('Clear application cache')
    ->action(ClearApplicationCache::class)
class ClearApplicationCache
{
    public function __invoke(CommandItem $command): void
    {
        Artisan::call('cache:clear');
    }
}

#Page context

Implement HasPaletteCommands on a page or resource. Those commands appear in a Current page group and are not stored in the static command cache. Action closures may take the current record as a second argument; it is loaded through the resource query, never from a client-supplied model class.

use Usamamuneerchaudhary\CommandPalette\Contracts\HasPaletteCommands;

class EditInvoice extends EditRecord implements HasPaletteCommands
{
    public static function getPaletteCommands(): iterable
    {
        return [
            CommandItem::make('Regenerate PDF')
                ->action(fn (CommandItem $command, Invoice $record) => $record->regeneratePdf()),
        ];
    }
}

#Nested commands

CommandItem::make('Assign role')
    ->children([
        CommandItem::make('Admin')->action(fn () => $this->assign('admin')),
        CommandItem::make('Editor')->action(fn () => $this->assign('editor')),
    ])

Enter opens a children() parent. Escape pops one level. Escape at the root still closes the palette.

Resources and records use drillDown() instead: Enter still navigates, Tab steps inside. Backspace on an empty query pops one level.

#Record actions

Implement HasPaletteRecordActions on a resource to add commands when someone Tabs into a record:

use Usamamuneerchaudhary\CommandPalette\Contracts\HasPaletteRecordActions;

class UserResource extends Resource implements HasPaletteRecordActions
{
    public static function getPaletteRecordActions(Model $record): iterable
    {
        return [
            CommandItem::make('Impersonate')
                ->action(fn () => impersonate($record))
                ->authorize(fn () => auth()->user()->can('impersonate', $record)),
        ];
    }
}

View and Edit are added when those pages exist and the policy allows them. Delete uses a confirmation modal on the palette itself.

#Opening a Filament action modal

To run a native Filament Action from any page, pass it to the palette. The overlay hosts the modal:

use Filament\Actions\Action;

CommandItem::make('Invite user')
    ->filamentAction(fn () => Action::make('invite')
        ->schema([
            TextInput::make('email')->email()->required(),
        ])
        ->action(fn (array $data) => User::invite($data['email'])))

mountAction('create') still asks the host page to mount an action that only exists there:

CommandItem::make('Create user')->mountAction('create')

#Pins

With the palette open, ⌘P / Ctrl+P pins or unpins the highlighted result. Pins are stored per panel in the browser. Links and copy commands, including those on records, keep a snapshot so they survive a reload. ->pins(false) turns this off.

#Recents

On an empty search, ⇧⌫ removes the highlighted recent. The built-in Clear recent commands command forgets them all. Turn it off with ->builtInCommands(['clear_recents' => false]).

#Copying to the clipboard

CommandItem::make('Copy API base URL')->copy(config('services.api.url'))

The text travels to the browser with the command, so only copy values the user is allowed to see. When you Tab into a record, Copy link and Copy ID are added automatically. built_in_commands.copy turns them off.

#Opening the palette from your own code

<x-filament::button x-on:click="$dispatch('open-command-palette', { query: '#' })">
    Find a record
</x-filament::button>

From Livewire: $this->dispatch('open-command-palette', query: '>'). The query is optional. A leading >, # or ? selects the matching mode.

#Keyboard chords

Two-stroke shortcuts run the same authorized runCommand() path. They are ignored while typing in an input, textarea, select, contenteditable node, or Filament form field:

CommandItem::make('Customers', CustomerResource::getUrl())->chord('g c')

#Firing a browser event

For anything that lives purely in the client:

CommandItem::make('Open help')->dispatch('open-help-drawer', ['section' => 'billing'])

#Controlling visibility

CommandItem::make('Impersonate user', '/impersonate')
    ->visible(fn () => config('app.debug'))
    ->authorize(fn () => auth()->user()->can('impersonate'))

Or gate everything at once:

FilamentCommandPalettePlugin::make()
    ->authorize(fn (CommandItem $item) => ! str_starts_with($item->group, 'Internal'))

Any resource that supports Filament's global search is searchable from the palette:

class OrderResource extends Resource
{
    protected static ?string $recordTitleAttribute = 'reference';

    public static function getGloballySearchableAttributes(): array
    {
        return ['reference', 'customer.name'];
    }

    public static function getGlobalSearchResultDetails(Model $record): array
    {
        return [
            'Customer' => $record->customer->name,
            'Total' => $record->total_formatted,
        ];
    }
}

Queries are debounced, run on the server, and respect the same scoping and policies as everywhere else in Filament. Details show up in the preview template's side pane.

To turn it off: ->recordSearch(false).

Htmlable titles from getGlobalSearchResultTitle() render in the preview pane after sanitizing. Link-style getGlobalSearchResultActions() become buttons there; modal actions stay on the Filament page.

For Scout-backed models:

FilamentCommandPalettePlugin::make()->scoutIntegration()

laravel/scout is optional. Models without Searchable keep using Eloquent. Scout returns keys; Filament still applies tenancy, policies, titles and URLs.

Cache keys include the panel, user, tenant, locale, and role/permission names when the user exposes them. Add extra material with ->cacheSignature(fn () => auth()->user()->team_id).

#Custom providers

The command list is produced by a pipeline. Add your own stage:

use Usamamuneerchaudhary\CommandPalette\Contracts\CommandProvider;

class DocumentationCommands implements CommandProvider
{
    public function commands(Panel $panel): iterable
    {
        return collect(Documentation::published())->map(
            fn ($doc) => CommandItem::make($doc->title, $doc->url)->group('Docs')
        );
    }
}
FilamentCommandPalettePlugin::make()
    ->providers([...CommandRegistry::DEFAULT_PROVIDERS, DocumentationCommands::class])

Implement SearchesCommands instead if your results depend on the search term.

#Events

use Usamamuneerchaudhary\CommandPalette\Events\CommandExecuted;

Event::listen(CommandExecuted::class, function (CommandExecuted $event) {
    Log::info('palette', ['command' => $event->command['label'], 'query' => $event->query]);
});

CommandPaletteOpened fires the first time someone opens it in a page session. Between them you can find out which commands actually earn their place.

#Translations

php artisan vendor:publish --tag=command-palette-translations

Every string is translatable. Layouts use logical properties, so RTL panels lay out correctly without further work.

#Customising the views

php artisan command-palette:publish-views

The publish-views page is registered by default, but canAccess() is local-only, so it never appears outside local. Set include_publish_views_command to false to hide it entirely.

Most appearance changes do not need this — the palette is styled entirely through CSS custom properties:

.fi-cp-root {
    --fi-cp-radius: 0.25rem;
    --fi-cp-selected-accent: rgb(var(--danger-600));
}

Published views take precedence over the package's from then on, which also means future package updates will not reach them. Prefer the variables where you can.

#Performance

The palette ships an empty shell with the page and fetches its commands the first time it opens. Nothing is embedded in every page response.

If building the list is expensive and your navigation is static, cache it:

FilamentCommandPalettePlugin::make()->cacheFor(300)

Cache keys include the panel, user, tenant, locale and a hash of the user's roles and permissions, so nothing leaks between users. Context commands are never stored in that cache.

#Upgrading from v1

See UPGRADE.md. The short version: move custom_commands closures onto the plugin, and check any code that constructed CommandItem directly.

#Testing

composer test
composer analyse
composer format
composer slipway:compile   # regenerate .github/workflows/slipway.yml after changing slipway.php

#Credits

#License

MIT. See LICENSE.md.

The author

Usama Muneer avatar Author: Usama Muneer

Coder, Blogger, Tech Speaker & Web Technologies Enthusiast. Passionate about working on open-source Programming languages & Tools while utilizing my Product Development skills.

Plugins
6
Stars
42

From the same author

Spatie Model States Visualizer plugin thumbnail

Spatie Model States Visualizer

State-aware Kanban board and status timeline components for Filament v5. Filament Model States provides a plug and play auto-detection for enums, Spatie Model States, or plain database values. Built to sit on top of: spatie/laravel-model-status > powers the timeline (status history log) spatie/laravel-model-states > powers transition validation and column discovery on the Kanban board (optional but recommended)

Usama Muneer avatar Author: Usama Muneer
70 / 100 package health score out of 100
4 stars
Tag: Developer Tool Tag: Infolist Entry More tags: +1
Dark mode ready No multilingual support
Free
Get it now
Adment plugin thumbnail

Adment

A simple custom ad & Google AdSense manager for Filament v5 with placements, responsive (and GIF/video) creatives, weighted A/B rotation, scheduling windows, geo/device targeting, impression & CTR analytics, obfuscated click tracking, AdSense Auto Ads & ad units, ads.txt management, and an optional public JSON API.

Usama Muneer avatar Author: Usama Muneer
70 / 100 package health score out of 100
1 star
Tag: Analytics Tag: Developer Tool
No dark mode support No multilingual support
Free
Get it now
Notifier plugin thumbnail

Notifier

A powerful notification system that handles multi-channel notifications with template management, scheduling, and real-time delivery. Built for developers who need enterprise-grade notifications without the complexity.

Usama Muneer avatar Author: Usama Muneer
87 / 100 package health score out of 100
28 stars
Tag: Forms Tag: Tables More tags: +1
Dark mode ready Multilingual support
Free
Get it now
Commentify Pro plugin thumbnail

Commentify Pro

Commentify Pro is a production-ready commenting system for Laravel. Attach a thread to any Eloquent model, ship a Livewire UI immediately, and use the same thread from React, Vue, or your own UI over the JSON API. Drop threaded comments on blogs, reviews, tickets, docs, and more. One Laravel package with Livewire out of the box, plus React/Vue SDKs, moderation, spam checks, guest comments, media, webhooks, and Filament admin.

Usama Muneer avatar Author: Usama Muneer
1 star
Tag: Developer Tool
Dark mode ready Multilingual support
$59.00
Buy now