Download the PHP package usamamuneerchaudhary/filament-command-palette without Composer

On this page you can find all versions of the php package usamamuneerchaudhary/filament-command-palette. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package filament-command-palette

Filament Command Palette

Latest Version on Packagist Tests Total Downloads Daily Downloads

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

Features

Requirements

Installation

Register the plugin on your panel:

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:

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:

Or globally, in the published config file:

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:

Custom commands

Register commands on the plugin:

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:

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.

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

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.

Nested commands

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:

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:

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

Pins

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

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:

Firing a browser event

For anything that lives purely in the client:

Controlling visibility

Or gate everything at once:

Record search

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

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:

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:

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

Events

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

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

Customising the 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:

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:

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

Credits

License

MIT. See LICENSE.md.


All versions of filament-command-palette with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
spatie/laravel-package-tools Version ^1.19
filament/filament Version ^4.0|^5.0
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package usamamuneerchaudhary/filament-command-palette contains the following files

Loading the files please wait ...