Search by

MokoCLI - enterprise CLI automation, validation, and governance engine for all Moko Consulting repositories

v10.30.00 2026-11-03 23:29 UTC

This package is auto-updated.

Last update: 2026-11-06 00:41:50 UTC


README

mokocli Enterprise API

Version PHP License

PHP implementation of mokocli — enterprise standards, automation framework, workflow templates, and bulk sync tooling.

Primary platform: MokoGIT — git.mokoconsulting.tech Backup mirror: GitHub (read-only mirror)

What Lives Here

DirectoryPurpose
lib/Enterprise/38 PHP enterprise library classes (platform adapters, sync, validation, plugins)
cli/CLI scripts (archive, create, release, sync rulesets, version management)
automation/Bulk sync, push files, repo cleanup, MokoGIT migration
validate/18 validation scripts (health, structure, secrets, syntax, drift)
templates/Workflow templates and config templates synced to governed repos
definitions/Repository structure definitions (.tf format)
deploy/Deployment scripts (SFTP, Joomla)
maintenance/Labels, inventory, SHA pinning, version sync
tools/Standalone tools (legal doc generator)
tests/PHPUnit test suite
.mokogit/workflows/custom/Repo-specific CI (ci-platform.yml, the 5 mokocli gates). Jobs are independent — no needs: chains — and the CI Summary aggregates gate results via the run API, because the MokoGIT Actions scheduler does not dispatch needs:-dependent jobs.

Installation

composer require mokoconsulting-tech/enterprise

Composer Registry

This package is served from MokoGIT package registry. Add this to your composer.json:

{
    "repositories": [
        {
            "type": "composer",
            "url": "https://git.mokoconsulting.tech/api/packages/MokoConsulting/composer"
        }
    ]
}

CLI Tools

# Health check
vendor/bin/moko health -- --path .

# Sync standards
vendor/bin/moko sync

# Inventory
vendor/bin/moko inventory -- --path .

The legacy repo:wizard scaffolder has been retired; use the create / scaffold_client flow for repo provisioning.

Platform Configuration

VariablePurpose
GIT_PLATFORMgit (default) or github
GA_TOKENMokoGIT API / MokoGIT Actions token
GH_TOKENGitHub API token (for mirror sync)
GIT_URLMokoGIT instance URL (default: https://git.mokoconsulting.tech)
GIT_ORGMokoGIT organization (default: MokoConsulting)

Version resolution

moko (via version_read.php) resolves a repo's version from the first available source, in order:

  1. VERSION file (non-Joomla)
  2. README.md (VERSION: XX.YY.ZZ)
  3. Joomla manifest <version>
  4. package.json
  5. pyproject.toml
  6. Makefile PROJECT_VERSION -- for generic/ops repos (PLATFORM := generic) that carry none of the above; the Makefile is their version source of truth.

Usage

mokocli is the enterprise CLI automation, validation, and governance engine for all Moko Consulting repositories. After installing (see Installation), the moko command is available at vendor/bin/moko:

# Health check a repository against the standards
vendor/bin/moko health -- --path .

# Sync workflow and config standards into a governed repo
vendor/bin/moko sync

# Inventory the repository structure
vendor/bin/moko inventory -- --path .

Behavior is driven by environment variables — set GIT_PLATFORM, GA_TOKEN, GH_TOKEN, GIT_URL, and GIT_ORG as described in Platform Configuration. The package also ships shared CI workflow templates, validation scripts, and MCP servers used across the organization's repositories.

moko sync fans out across every governed repo and org, so it is resilient to transient network blips: each API call bounds its connect/total timeouts and retries connection-phase failures (DNS/connect/timeout/SSL) with backoff, so a single momentary "couldn't connect" does not fail an otherwise-clean fleet run.

Contributing

Contributions are welcome. See CONTRIBUTING.md and follow the MokoStandards.

License

GPL-3.0-or-later — See LICENSE.md