Extend XEngine Terminal's project detection capabilities with custom JSON-based plugins. Detect any framework, language, or project type with powerful, secure plugin definitions.
XEngine plugins are JSON files that define how to detect projects and provide custom actions. They're secure, easy to create, and require no coding knowledge.
Plugins only execute predefined commands that you explicitly approve. No arbitrary code execution, no security risks. All plugin actions require user consent before execution.
To create a plugin, you'll need:
Every plugin must contain a manifest and detection object. Optional sections include metadata, actions, and package managers.
// Basic plugin structure { "manifest": { "id": "com.example.myplugin", "name": "My Framework Plugin", "version": "1.0.0", "author": "Your Name", "description": "Detects My Framework projects", "language": "javascript", "icon": "⚡" }, "detection": { // Detection rules go here }, "metadata": { /* optional */ }, "actions": [ /* optional */ ], "packageManagers": [ /* optional */ ] }
| Field | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Unique identifier (reverse domain notation recommended) |
| name | string | Yes | Display name for the plugin |
| version | string | Yes | Plugin version (semantic versioning recommended) |
| author | string | No | Author name |
| description | string | No | Brief description of what the plugin does |
| language | string | No | Primary language (e.g., "php", "javascript", "python") |
| icon | string | No | Emoji or icon identifier for visual representation |
Detection rules tell XEngine how to identify your project type. You can detect by file existence, file content patterns, or a combination of both.
Detect projects by checking for specific files or directories:
"detection": { "files": [ { "name": "package.json", "type": "file", "required": true }, { "name": "src", "type": "directory", "required": false } ] }
Detect projects by matching patterns in file contents:
"detection": { "patterns": [ { "file": "composer.json", "jsonPath": "$.require['laravel/framework']" }, { "file": "package.json", "regex": "\"react\"\\s*:" }, { "file": ".env.example", "exists": true } ] }
Control how confident the detection is with base scores and bonus points:
"detection": { "confidence": { "base": 50, "bonus": [ { "condition": "file:vendor/laravel/framework", "points": 30 }, { "condition": "file:artisan", "points": 20 } ] } }
Automatically detect the version of frameworks or tools in your project using JSONPath expressions or regex patterns.
"metadata": { "versionDetection": [ { "source": "composer.lock", "path": "$.packages[?(@.name == 'laravel/framework')].version", "transform": "removeVersionPrefix" }, { "source": "package.json", "path": "$.dependencies.react" } ] }
Define custom actions that appear in the Project Panel. Actions can execute single commands or multiple commands based on conditions.
"actions": [ { "id": "run-migrations", "label": "Run Migrations", "icon": "🗄️", "command": "php artisan migrate" }, { "id": "install-and-build", "label": "Install & Build", "commands": [ { "packageManager": "npm", "command": "npm install" }, { "command": "npm run build", "optional": true } ], "condition": "packageManager:npm" } ]
All action commands require explicit user consent before execution. Users will see a confirmation dialog before any command runs.
Define custom package managers that integrate with XEngine's package management system. These will appear in the Project Panel with full install/update/uninstall capabilities.
"packageManagers": [ { "id": "my-custom-pm", "name": "My Package Manager", "icon": "📦", "lockFile": "my-lock.json", "manifestFile": "my-manifest.json", "installCommand": "my-pm install {package}@{version}", "uninstallCommand": "my-pm remove {package}", "updateCommand": "my-pm update {package}" } ]
Here's a complete plugin example for a Laravel-like framework:
{
"manifest": {
"id": "com.example.laravel-detector",
"name": "Laravel Framework Detector",
"version": "1.0.0",
"author": "Your Name",
"description": "Detects Laravel PHP framework projects",
"language": "php",
"icon": "🔴"
},
"detection": {
"files": [
{ "name": "artisan", "required": true },
{ "name": "composer.json", "required": true }
],
"patterns": [
{
"file": "composer.json",
"jsonPath": "$.require['laravel/framework']"
}
],
"confidence": {
"base": 60,
"bonus": [
{ "condition": "file:vendor/laravel", "points": 30 },
{ "condition": "file:app/Http", "points": 10 }
]
}
},
"metadata": {
"versionDetection": [
{
"source": "composer.lock",
"path": "$.packages[?(@.name == 'laravel/framework')].version"
}
],
"packageManagers": ["composer", "npm"],
"framework": "Laravel"
},
"actions": [
{
"id": "artisan-serve",
"label": "Start Dev Server",
"icon": "🚀",
"command": "php artisan serve"
},
{
"id": "run-migrations",
"label": "Run Migrations",
"command": "php artisan migrate"
}
]
}
You can install plugins through multiple methods:
Access the Plugin Manager from the toolbar (🔌 icon) in XEngine Terminal. Here you can:
To share your plugin with others:
Start extending XEngine Terminal today with custom project detection plugins.