mokoconsulting / mokocli
MokoCLI - enterprise CLI automation, validation, and governance engine for all Moko Consulting repositories
Requires
- php: >=8.1
- ext-curl: *
- ext-json: *
- ext-zip: *
- guzzlehttp/guzzle: ^7.8
- monolog/monolog: ^3.5
- phpseclib/phpseclib: ^3.0
- psr/cache: ^3.0
- psr/http-client: ^1.0
- psr/log: ^3.0
- symfony/cache: ^6.4
- symfony/console: ^6.4
- symfony/filesystem: ^6.4
- symfony/finder: ^6.4
- symfony/http-foundation: ^6.4
- symfony/process: ^6.4
- symfony/routing: ^6.4
- symfony/yaml: ^6.4
- twig/twig: ^3.8
- vlucas/phpdotenv: ^5.6
Requires (Dev)
- phpmd/phpmd: ^2.14
- phpstan/phpstan: ^1.10 || ^2.0
- phpunit/phpunit: ^10.5
- squizlabs/php_codesniffer: ^3.8 || ^4.0
- vimeo/psalm: ^5.20
This package is auto-updated.
Last update: 2026-07-29 06:56:07 UTC
README
mokocli Enterprise API
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
| Directory | Purpose |
|---|---|
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 |
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 .
Platform Configuration
| Variable | Purpose |
|---|---|
GIT_PLATFORM | git (default) or github |
GA_TOKEN | MokoGIT API / MokoGIT Actions token |
GH_TOKEN | GitHub API token (for mirror sync) |
GIT_URL | MokoGIT instance URL (default: https://git.mokoconsulting.tech) |
GIT_ORG | MokoGIT organization (default: MokoConsulting) |
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.
Contributing
Contributions are welcome. See CONTRIBUTING.md and follow the MokoStandards.
License
GPL-3.0-or-later — See LICENSE.md