Page:
CLI_AUTOMATION
Pages
ARCHITECTURE
AUTO_CREATE_ORG_PROJECTS
CLI_AUTOMATION
DEPLOY_SCRIPTS
DOLIBARR_MODULE_IDS
DRY_RUN_PATTERN
Documentation-Standards.-.-
Documentation-Standards.-
File-Header-Standards
Home
JOOMLA_SYNC
LEGAL_DOC_GENERATOR_WEB_README
MCP-Servers.-.-.
MCP-Servers
MINIFICATION
MONITORING_SCRIPTS
NEW_SCRIPTS
QUICKSTART_ORG_PROJECTS
SITE_MONITORING
WIKI_STANDARDS
WORKFLOW_STANDARDS
api-automation-index.-
api-automation-index
api-definitions-default-index.-
api-definitions-default-index
api-definitions-sync-index.-
api-definitions-sync-index
api-deploy-index.-
api-deploy-index
api-fix-index.-
api-fix-index
api-index.-
api-index
api-maintenance-index.-
api-maintenance-index
api-plugin-index.-
api-plugin-index
api-tests-index.-
api-tests-index
api-tests-sample-index.-
api-tests-sample-index
api-validate-index.-
api-validate-index
automation-README.-
automation-README
automation-branch-version-automation.-
automation-branch-version-automation
automation-push-files.-
automation-push-files
automation-repo-cleanup.-
automation-repo-cleanup
client-repos.-.-
client-repos
standards-mokostandards-file-spec.-
standards-mokostandards-file-spec
templates-client-waas
templates-dolibarr
templates-generic
templates-mcp
workflows-README.-
workflows-README
workflows-auto-release.-
workflows-auto-release
workflows-branch-protection.-
workflows-branch-protection
workflows-build-release.-
workflows-build-release
workflows-cascade-dev.-
workflows-cascade-dev
workflows-changelog-management.-
workflows-changelog-management
workflows-demo-deployment.-
workflows-demo-deployment
workflows-dev-branch-tracking.-
workflows-dev-branch-tracking
workflows-dev-deployment.-
workflows-dev-deployment
workflows-index.-
workflows-index
workflows-release-system.-
workflows-release-system
workflows-renovate.-
workflows-renovate
workflows-reusable-workflows.-
workflows-reusable-workflows
workflows-rs-deployment.-
workflows-rs-deployment
workflows-secret-scanning.-
workflows-secret-scanning
workflows-shared-workflows.-
workflows-shared-workflows
workflows-standards-compliance.-
workflows-standards-compliance
workflows-static-analysis.-
workflows-static-analysis
workflows-sub-issue-management.-
workflows-sub-issue-management
workflows-update-server.-
workflows-update-server
workflows-workflow-architecture.-
workflows-workflow-architecture
Clone
1
CLI_AUTOMATION
Jonathan Miller edited this page 2026-05-19 20:49:12 +00:00
CLI and Automation Scripts
Scripts for managing client repos, triggering workflows, and validating deployments.
CLI Scripts
scaffold_client.php
Scaffold a new client-waas repo from Template-Client-WaaS with pre-configured settings.
php cli/scaffold_client.php --name clarksvillefurs --org ClarksvilleFurs --token YOUR_TOKEN
php cli/scaffold_client.php --name newclient --org NewClient --token YOUR_TOKEN --dry-run
Steps performed:
- Creates repo from Template-Client-WaaS via Gitea API
- Sets repo description
- Creates dev branch from main
- Prints instructions for configuring repo variables and secrets
client_inventory.php
Discover and list all client-waas repos with their server configuration status.
php cli/client_inventory.php --token YOUR_TOKEN
php cli/client_inventory.php --token YOUR_TOKEN --json
Output table: Org | Repo | Has Dev Config | Has Live Config | Last Push | Status
bulk_workflow_trigger.php
Trigger a workflow across multiple repos at once.
# All repos in an org
php cli/bulk_workflow_trigger.php --org ClarksvilleFurs --workflow sync-servers.yml --token YOUR_TOKEN
# Specific repos from file
php cli/bulk_workflow_trigger.php --repos repos.txt --workflow sync-servers.yml --token YOUR_TOKEN
# With inputs
php cli/bulk_workflow_trigger.php --org ClarksvilleFurs --workflow sync-servers.yml --inputs '{"direction":"dev-to-live","dry_run":"true"}' --token YOUR_TOKEN
Automation Scripts
bulk_workflow_trigger.sh
Shell wrapper for triggering workflows across all client-waas repos in an org.
./automation/bulk_workflow_trigger.sh GITEA_URL TOKEN ORG WORKFLOW [REF] [INPUTS_JSON]
Validation Scripts
check_file_integrity.php
Compare deployed files on a remote server against the local repository to detect drift.
php validate/check_file_integrity.php --config sftp-config.json
php validate/check_file_integrity.php --config sftp-config.json --repo-path /path/to/repo --verbose
php validate/check_file_integrity.php --config sftp-config.json --json
Output: Total files | Match | Differ | Server-only | Repo-only
Exits 1 if any drift detected, 0 if clean.
Related
- DEPLOY_SCRIPTS -- Deploy, sync, and rollback scripts
- MONITORING_SCRIPTS -- Uptime, SSL, and version audit
- client-repos -- Client repository standards
Repo: moko-platform
| Revision | Date | Author | Description |
|---|---|---|---|
| 1.0 | 2026-05-19 | Moko Consulting | Initial version |