Clone
3
api-plugin-index
Jonathan Miller edited this page 2026-05-20 01:26:19 +00:00
This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Home

Plugin Scripts

Scripts at api/plugin_*.php are the primary CLI entry points for the moko-platform plugin system. Each script auto-detects the project type (Joomla, Dolibarr, Node.js, Python, WordPress, Terraform, mobile, API, generic, documentation) or accepts --project-type to override.

All scripts share a common set of flags and exit-code conventions.


Common Options

Option Description
--project-path <dir> (required) Path to the project directory
--project-type <type> Override auto-detection. Valid: joomla, dolibarr, wordpress, nodejs, python, terraform, mobile, api, documentation, generic
--config <file> Path to a project-specific configuration file
--json Output results in machine-readable JSON
--verbose Enable verbose logging
--help / -h Show help and exit

Common Exit Codes

Code Meaning
0 Success (check/collection passed)
1 Completed with failures or warnings
2 Script error (invalid arguments, plugin not found, etc.)

plugin_validate.php

Path: api/plugin_validate.php

Validates a project's structure, required files, and standards compliance.

# Auto-detect project type and validate
php api/plugin_validate.php --project-path /path/to/project

# Validate a specific type
php api/plugin_validate.php --project-path /path/to/project --project-type dolibarr

# Machine-readable output
php api/plugin_validate.php --project-path /path/to/project --json

plugin_health_check.php

Path: api/plugin_health_check.php

Runs health checks on a project and returns a health score (0100).

Additional options:

Option Description
--json Output as JSON (default)
# Run health check
php api/plugin_health_check.php --project-path /path/to/project

# Explicit type, human-readable output
php api/plugin_health_check.php --project-path /path/to/project --project-type joomla --verbose

Exit Codes:

  • 0 — Healthy
  • 1 — Unhealthy
  • 2 — Script error

plugin_readiness.php

Path: api/plugin_readiness.php

Checks whether a project is ready for release or deployment by evaluating blockers vs. warnings.

# Check release readiness
php api/plugin_readiness.php --project-path /path/to/project

# Pipe JSON output to jq
php api/plugin_readiness.php --project-path /path/to/project --json | jq '.ready'

Exit Codes:

  • 0 — Ready for release (no blockers)
  • 1 — Not ready (has blockers)
  • 2 — Script error

plugin_metrics.php

Path: api/plugin_metrics.php

Collects project metrics (file counts, code coverage, complexity indicators, dependency counts, etc.) as reported by the plugin.

Additional options:

Option Description
--format <fmt> Output format: json (default), table, csv
# JSON metrics (default)
php api/plugin_metrics.php --project-path /path/to/project

# Table output
php api/plugin_metrics.php --project-path /path/to/project --format table

# CSV for spreadsheet import
php api/plugin_metrics.php --project-path /path/to/project --format csv

plugin_list.php

Path: api/plugin_list.php

Lists all registered project-type plugins and their capabilities. Does not require --project-path.

Additional options:

Option Description
--format <fmt> Output format: table (default), json, simple
--type <type> Show details for one specific plugin type
--details Include required files, features, and commands in output
# List all plugins (table)
php api/plugin_list.php

# JSON output of all plugins
php api/plugin_list.php --format json

# Details for a specific plugin
php api/plugin_list.php --type dolibarr --details

# Simple list of plugin type names only
php api/plugin_list.php --format simple

Repo: moko-platform · moko-platform wiki

Field Value
Minimum Version 04.07.00
Platform joomla
Applies To Joomla repositories
Revision Date Author Description
1.0 2026-05-08 Moko Consulting Initial version