Setu-TS
    Preparing search index...

    Interface ICliApi

    CLI command registration surface: a plugin publishes commands here, and the kernel registers each under CAPABILITIES.CLI_COMMAND as a multi-provider token that any consumer can read with getAll.

    @setu-ts/cli reads these: setu commands lists them and setu <name> runs one. Doing so requires importing and booting the application, so the CLI loads it through the project's setu.config.ts (createApp()) and starts it with no port — which registers plugins without binding a socket. Two plugins registering the same name is refused rather than resolved by load order.

    register(ctx: IPluginContext): void {
    ctx.cli.register('db:migrate', async (args) => {
    await migrate(args[0] ?? 'latest');
    });
    }

    0.1.0

    interface ICliApi {
        register(name: string, handler: CliCommandHandler): void;
    }
    Index