Skip to content

Commands

Run application commands directly from the debug panel — tests, static analysis, and composer scripts.

Commands

Available Command Types

TypeDescription
PHPUnitRun unit tests with JSON-formatted output
CodeceptionRun Codeception tests with JSON reporter
PsalmRun Psalm static analysis with JSON report
Composer scriptsAll scripts from composer.json (auto-discovered)
BashExecute arbitrary shell commands

How It Works

Commands are automatically discovered from two sources:

  1. Registered commands — PHPUnit, Codeception, Psalm (if configured in the adapter)
  2. Composer scripts — All scripts entries from composer.json are exposed as composer/{scriptName} commands

Click a command button to execute it. Output is displayed in real-time.

API Endpoints

MethodPathDescription
GET/inspect/api/commandList available commands
POST/inspect/api/command?command=composer/testExecute a command

Response format:

json
{
    "status": "ok",
    "result": "PHPUnit 11.0.0 ...\nOK (42 tests, 100 assertions)",
    "error": ""
}

TIP

PHPUnit and Codeception commands use custom JSON reporters for structured output in the panel.

Released under the MIT License.