Download the PHP package farsi/nova-command-center without Composer

On this page you can find all versions of the php package farsi/nova-command-center. 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 nova-command-center

Nova Command Center

Tests Static Analysis Latest Version

Run pre-approved Artisan and shell commands directly from your Laravel Nova dashboard โ€” safely. Built for and tested against Nova v4 and v5.

This package is a security-first, clean-room reimagining of the command-center idea. It fixes the long-standing problems of earlier tools: shell injection, Nova 5 incompatibility (the __ is not defined crash from Nova 5 removing the global JS translation helper), null-value crashes, missing optional variables and the absence of authorization hooks.

โ–ถ See it in action โ€” searching, model-backed variables, confirmation and live output ![Demo](docs/screenshots/demo.gif)
Searchable model variables Structured command editor

Highlights


Requirements

Package Version
PHP 8.1+
Laravel 10, 11 or 12
Laravel Nova 4.x or 5.x

Installation

Register the tool in app/Providers/NovaServiceProvider.php:

Publish the configuration:

Configuration

All commands live in config/nova-command-center.php. A command is keyed by its display name; only run is required.

Command options

Key Type Description
run string Command to run. Use {name} placeholders for variables.
command_type artisan/bash Defaults to artisan.
group string UI grouping.
type string Button style: primary, danger, warning, โ€ฆ
help string Description shown under the command.
timeout int Max seconds before the process is killed.
output_size int Number of trailing output lines to display.
queue bool / array Run on the queue. Array may set connection / queue.
can string Gate ability required to run this specific command.
confirm bool Force/skip the confirmation modal. Default: danger/warning types confirm, others don't.
variables array User input, keyed by placeholder name (see below).
flags array Optional flags rendered as checkboxes.

Where commands come from

By default the allow-list is read from the config file โ€” version-controlled, reviewed in pull requests, and immutable at runtime. This is the recommended, safest posture. The source is pluggable via the source key:

Anything that reads command definitions implements the tiny CommandSource contract, so raw definitions can come from anywhere. Regardless of the source, every definition still passes through the same coercion, validation and security model โ€” a custom source can never widen the trust boundary or bypass the bash/rate-limit/authorization gates.

Managing commands in the database

Prefer editing commands from the Nova UI instead of a config file? Opt into the database source. Read the security note first.

  1. Publish and run the migration:

  2. Switch the driver in config/nova-command-center.php:

  3. Register the bundled Nova resource from your own NovaServiceProvider โ€” ideally behind a strict policy so only trusted operators can edit the allow-list:

Rows in the nova_command_center_commands table map one-to-one onto the config keys documented above (run, command_type, group, variables, flags, โ€ฆ), plus enabled (bool) and position (int) to toggle and order them.

Variables and flags are edited through structured, repeatable sub-forms โ€” add a variable block, pick its type (text, select or searchable model), fill in labels, options and validation rules as plain inputs, and drag to reorder. No JSON required. See command sources for details.

โš ๏ธ Security: the database driver moves the allow-list out of version control. Anyone who can create or edit those rows decides what the tool will run โ€” that is remote code execution by design. Protect the resource with a policy (CommandPolicy), restrict it to super-admins, keep bash disabled unless you truly need it, and remember every run still emits audit events. If you don't need UI-managed commands, stay on the config driver.

Variables

Variables are referenced in run with {name} placeholders. Because substitution happens after the command is tokenised, a variable can only ever become the content of a single argument โ€” never a new one.

An optional variable that is left blank simply removes its placeholder token, so foo --tag={tag} becomes foo when tag is empty.

A type => 'model' variable renders as a type-ahead search box backed by a real Eloquent model instead of a plain text input โ€” useful when the argument is a record id picked from a large or dynamic table. Its backing model must be explicitly allow-listed via searchable_models, and matching is always case-insensitive regardless of database driver. See "Searchable model variables" in docs/configuration.md for the full schema and security notes.

Authorization

Every request is checked against the tool's canSee callback. In addition, you may define a global gate ability (default runCommand) and/or per-command can abilities:

Shell (bash) commands

Shell execution is disabled by default. When enabled, only allow-listed commands run, and arguments are always escaped. Shell features such as pipes and redirection are intentionally unsupported โ€” wrap those in a script file instead.

Queued execution & progress bars

Mark a command as queue => true to run it on a worker with live, polled output. To report progress from your own Artisan command, use the provided trait:

Validate your configuration

The allow-list is code โ€” lint it like code:

The check reports everything that would otherwise fail silently at runtime: a command dropped for having no run string, a {placeholder} with no matching variable (it would be passed to the process literally), a required select that can never be satisfied, a model variable whose class is missing or not allow-listed in searchable_models, bash commands while bash is disabled, a per-command can ability no gate defines, without_overlapping on a cache store that can't lock, and a database source whose migration hasn't run.

It exits non-zero when it finds errors, so it can gate CI. Add --strict to fail on warnings too:

Events

Every execution dispatches Farsi\NovaCommandCenter\Events\CommandStarted and CommandFinished, each carrying the command definition, the execution result and the operator โ€” handy for audit logging.

Documentation

Deep-dive guides live in docs/:

Security

See SECURITY.md for the threat model and how to report a vulnerability. In short: allow-list only, no shell interpolation, bash off by default, authorization required, and every value is validated before it runs.

Development

The frontend is built with Laravel Mix (the build system Nova uses on both v4 and v5):

Backend quality tools:

Nova is a paid, private package. Running the test suite locally requires Nova credentials, or the provided composer.testing.json scaffold that swaps in a lightweight stub. See CONTRIBUTING.md.

License

The MIT License. See LICENSE.md.


All versions of nova-command-center with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
illuminate/console Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/contracts Version ^10.0 || ^11.0 || ^12.0 || ^13.0
illuminate/support Version ^10.0 || ^11.0 || ^12.0 || ^13.0
laravel/nova Version ^4.0 || ^5.0
symfony/process Version ^6.0 || ^7.0 || ^8.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 farsi/nova-command-center contains the following files

Loading the files please wait ...