PHPackages                             nikolaynesov/laravel-command-assistant - 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. [CLI &amp; Console](/categories/cli)
4. /
5. nikolaynesov/laravel-command-assistant

ActiveLibrary[CLI &amp; Console](/categories/cli)

nikolaynesov/laravel-command-assistant
======================================

Laravel plugin to allow GPT-triggered command execution with authorization and audit logging

0.0.4(8mo ago)0883↓33.3%MITPHPPHP &gt;=8.1

Since Aug 27Pushed 8mo agoCompare

[ Source](https://github.com/nikolaynesov/laravel-command-assistant)[ Packagist](https://packagist.org/packages/nikolaynesov/laravel-command-assistant)[ RSS](/packages/nikolaynesov-laravel-command-assistant/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (4)Used By (0)

Laravel Command Assistant
=========================

[](#laravel-command-assistant)

A secure Laravel plugin that allows GPT-based interfaces to execute **approved artisan commands only**. All commands must define the `--laravel-assistant` option to be eligible.

---

✨ Features
----------

[](#-features)

- ✅ Restricts GPT to safe, whitelisted commands
- ✅ Only runs commands explicitly designed for GPT usage
- ✅ Logs all executions with user/email
- ✅ Supports GPT plugin metadata files for `.well-known`
- ✅ No risk of overwriting host Laravel config or routes

---

🚀 Installation
--------------

[](#-installation)

In your Laravel project:

```
composer require nikolaynesov/laravel-command-assistant
```

---

🛠️ Publish Assets
-----------------

[](#️-publish-assets)

To publish the config file and plugin metadata:

```
php artisan vendor:publish --tag=laravel-command-assistant
```

This will publish:

From (package)To (your app)`config/command-assistant.php``config/command-assistant.php``public/.well-known/ai-plugin.command-assistant.json``public/vendor/laravel-command-assistant/.well-known/ai-plugin.json``public/.well-known/openapi.command-assistant.yaml``public/vendor/laravel-command-assistant/.well-known/openapi.yaml`---

📁 How to Enable GPT Plugin
--------------------------

[](#-how-to-enable-gpt-plugin)

To make your assistant plugin work with GPT:

1. Create a `.well-known/` folder in your app’s `public/` directory if it doesn't exist.
2. Copy files from the published vendor directory:

```
cp public/vendor/laravel-command-assistant/.well-known/* public/.well-known/
```

> ✅ This avoids overwriting any `.well-known` files from other plugins you may already have.

3. Your plugin should now be reachable at:

```
https://your-domain.com/.well-known/ai-plugin.json
https://your-domain.com/.well-known/openapi.yaml

```

---

✏️ Making Commands GPT-Safe
---------------------------

[](#️-making-commands-gpt-safe)

To allow a Laravel command to be executed via the assistant, define this option:

```
protected $signature = 'your:command {--laravel-assistant}';
```

Or, using Symfony input directly:

```
$this->addOption('laravel-assistant', null, InputOption::VALUE_NONE, 'Assistant execution enabled');
```

> 🧠 The flag does nothing functionally — it’s a safety requirement for access.

---

🔐 Security
----------

[](#-security)

- Requires valid Bearer token via `Authorization: Bearer `
- Command is rejected unless it:
    - Exists in the app
    - Defines the `--laravel-assistant` option

---

📝 License
---------

[](#-license)

MIT © [Nikolay Nesov](https://github.com/nikolaynesov)

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance60

Regular maintenance activity

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity36

Early-stage or recently created project

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

Total

3

Last Release

251d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/683b7d77be6bd1b72df2771b2a5efcda8ce65ea9aba24accc4f1c8772e6992d3?d=identicon)[nikolaynesov](/maintainers/nikolaynesov)

---

Top Contributors

[![nikolaynesov](https://avatars.githubusercontent.com/u/17743574?v=4)](https://github.com/nikolaynesov "nikolaynesov (6 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/nikolaynesov-laravel-command-assistant/health.svg)

```
[![Health](https://phpackages.com/badges/nikolaynesov-laravel-command-assistant/health.svg)](https://phpackages.com/packages/nikolaynesov-laravel-command-assistant)
```

###  Alternatives

[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[nunomaduro/laravel-console-menu

Laravel Console Menu is an output method for your Laravel/Laravel Zero commands.

815412.0k48](/packages/nunomaduro-laravel-console-menu)[bestmomo/nice-artisan

Web interface for Laravel Artisan

215149.3k](/packages/bestmomo-nice-artisan)[statamic/cli

Statamic CLI Tool

7587.7k](/packages/statamic-cli)[mwguerra/web-terminal

A web-based terminal component for Filament/Laravel with command whitelisting and multiple connection types

251.1k](/packages/mwguerra-web-terminal)[sunaoka/laravel-facade-generator

Provide command line generation of facade layer files.

171.9k](/packages/sunaoka-laravel-facade-generator)

PHPackages © 2026

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