CLI Tools (Custom Modules)
Module System
Since version v2.0.0, the CLI supports modular extensions, enabling developers to customize commands and workflows.
Core Architecture
- CLI Module: A self-contained module encompassing your custom commands and workflows.
- Command: A single, executable ad-hoc terminal command.
- Workflow: Complex, stateful action flows composed of chronological steps.
- Module Manager: The underlying component framework that hooks modules and executes them.
Registering Modules
Developing Custom Modules
Review Created Commands
Workflow System
Workflows manage the complicated end-to-end task flows consisting of distinct states. They support conditional execution thresholds, standardized error handling, and robust data propagation parameters.
Built-in Workflows
1. User Authentication Flow
cresc auth-check
Verifies current user authentication conditions.
cresc login-flow
Complete end-to-end CLI dashboard login procedure.
2. Cross-Platform App Management Flows
cresc workflow multi-platform-app-management
Consolidated unified oversight over multi-platform apps.
cresc workflow incremental-build
Executes an incremental build generation to assemble partial/delta updates.
Workflow Utilities
Lists all available workflow suites dynamically.
cresc workflow
Perform a specified dynamic workflow sequence.
cresc list
Lists the full set of registered modules framework-wide.
Workflow Features
- Procedural Execution: Handfuls of workflow steps fire strictly in chronological sequences.
- Context Passing: Each node's returned result can be passed into subsequent execution nodes.
- Conditional Thresholds: Execution nodes can dynamically route execution based on conditions.
- Error Handling: Standardized rollback mechanism handles exceptions robustly.
- Realtime Feedback: Visually monitors stage progress metrics via STDERR streaming.
- Input Validation: Required parameter variables are strictly schema-verified before execution paths begin.
Example Repository
Explore an assortment of complete modules and robust workflows documented thoroughly via code samples within the example/ directory folder:
example/modules/- Basic Module instantiation guides.example/workflows/- Elaborate Workflow architecture samples.example/scripts/- TypeScript command triggers for CI tooling.
To exercise the sandbox scripts directly: