@flowscripter/dynamic-cli-framework-api
v4.0.3
Published
API for https://github.com/flowscripter/dynamic-cli-framework
Maintainers
Readme
dynamic-cli-framework-api
API for the dynamic-cli-framework
Usage
Plugin authors should depend on this package (not the full
@flowscripter/dynamic-cli-framework) as a peerDependency:
{
"peerDependencies": {
"@flowscripter/dynamic-cli-framework-api": "*",
},
}Key exports:
createCLIPlugin- scaffolding helper to build aCLIPluginfrom aCommandFactoryand/orServiceProviderFactory.CommandFactory,ServiceProviderFactory- extension interfaces implemented by a plugin.Command,SubCommand,GlobalCommand,GroupCommand- command types.Context,CLIConfig- runtime context passed to commands.- Core service interfaces and their
*_SERVICE_IDidentifiers (PrinterService,TableGeneratorService,SyntaxHighlighterService,ConfigurationService, etc.) used to look up services viaContext. StartupService/StartupTask,ShutdownService/ShutdownTask- priority-ordered registration of work to run once during CLI startup/shutdown, viaregisterTask({id, priority, run})on either.
See dynamic-cli-framework for the runnable framework and its concrete service implementations.
Development
Install dependencies:
bun install
Build (produces dist/ for Node.js and TypeScript consumers; Bun uses raw source directly):
bun run build
Format:
bunx oxfmt
Lint:
bunx oxlint index.ts src/ tests/
Generate HTML API documentation:
bunx typedoc index.ts
License
MIT © Flowscripter
