@ecfjs/console
v1.0.0-rc.2
Published
ECF console kernel with Artisan-style commands, argument parsing, and interactive prompts
Maintainers
Readme
@ecfjs/console — Artisan-Style Console Kernel
@ecfjs/console is the Artisan-style console command kernel for the ECF (Elegant Core Framework) ecosystem.
Features
- ConsoleKernel — command registration and dispatch lifecycle
- CommandBus — synchronous and queued command execution
- SignatureParser — CLI argument and option parsing
- PromptsEngine — interactive CLI prompts
- CommandAutoDiscoverer — automatic command discovery from directories
- LockManager — prevents concurrent command execution
Quick Start
import { Command, ConsoleKernel } from "@ecfjs/console";
class HelloCommand extends Command {
signature = "hello {name}";
description = "Say hello";
async handle(input, output) {
output.info(`Hello, ${input.argument("name")}!`);
}
}
const kernel = new ConsoleKernel();
kernel.register(HelloCommand);
await kernel.handle(["hello", "ECF"]);Documentation
- ARCHITECTURE.md — package architecture
License
MIT
