Architecture: Tarantula CLI
Service-Oriented Design
- All core logic is encapsulated in services (e.g.,
ScaffoldingService
, ConfigManager
, Logger
).
- Services are registered as singletons using
tsyringe
and injected where needed.
CLI Entrypoint
- Bootstrapped in
src/index.ts
.
- Command definitions in
src/commands/
as yargs modules.
Template Generation
- Uses Hygen and EJS for code generation.
- Templates in
_templates/model/
.
- Shared EJS includes referenced via
rootfolder
context variable.
Configuration
- Managed via
tara.config.ts
and loaded by ConfigManager
.
Error Handling
- All user-facing errors are wrapped in custom error classes.
Extensibility
- Add new commands or templates by following the service and template conventions.