Files
moko-platform/docs/api/plugin/index.md
T
Jonathan Miller 96c7bd9e46 docs: update all references to MokoConsulting org and Gitea URLs
- mokoconsulting-tech → MokoConsulting across all docs
- github.com → git.mokoconsulting.tech
- CLI examples updated with new org name

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 22:21:59 -05:00

4.4 KiB
Raw Blame History

Plugin Scripts

Scripts at api/plugin_*.php are the primary CLI entry points for the MokoStandards 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

Location: docs/api/plugin/ Mirrors: api/plugin_*.php Last Updated: 2026-03-13