ΒΆ Command Line Interface (CLI)
The GOAL Backend provides two primary mechanisms for operational interaction:
- REST API (HTTP JSON services under
/v1/...) for synchronous application and web/mobile requests.
- Command Line Interface (CLI) for automated jobs, scheduled tasks, batch synchronizations, database migrations, and operational maintenance.
graph LR
subgraph Phase1["Phase 1: Current Architecture"]
A["Artisan CLI / PHP 8.2"] --> B["GOAL Core Backend"]
B --> C[("PostgreSQL / SAP / Timescale")]
end
subgraph Phase2["Phase 2: Remote Operations"]
D["Remote Device / Edge Server"] -->|"Secure gRPC / HTTPS"| E["goal-cli Go Binary"]
E -->|"Authenticated Execution"| B
end
Native command-line routines executed within the application container or host system, powering:
- Scheduled crons and maintenance cycles
- Master data synchronization (SAP Business One, BEES B2B, SUNAT)
- Real-time telemetry queue consumers
- Database migration and seed pipelines
π Explore: Artisan Commands Catalog β includes goal:products:sync-from-sap and goal:business-partners:sync-from-sap.
π Inventory UoM onboarding: inventory:clone-unit-measures β clone template unit_measures catalog to a new company.
π Route Workload & Rebalance: goal:customer-route-balance β route workload balance reporting, draft-only polygon verification, and scenario testing.
π WHMS Operations & Diagnostics: goal:wms β WHMS dashboard stats, picking error KPIs, and OPE-ALM-PRO-002 CLI test suite.
π SAP master identity (remote_id): Master data sync
As part of the GOAL integration roadmap, a high-performance, single-binary CLI tool written in Go (goal-cli) is being designed to allow:
- Remote Execution: Securely trigger, monitor, and query backend command-line actions from any remote device or edge server without requiring direct SSH or PHP environment dependencies.
- Cross-Platform Portability: Zero-dependency executable distributed for Linux, macOS, and Windows.
- Role-Based Authentication: Secure token and API-key authorization to guard sensitive administrative commands.
- Streaming Output & Telemetry: Real-time progress updates, logs streaming, and automated health diagnostics.
π Explore: CLI Architecture & goal-cli Roadmap