@semo/core
    Preparing search index...

    Interface SemoCommand

    Type interface for Semo command files. Use satisfies SemoCommand for type checking without losing literal types.

    import { SemoCommand } from '@semo/core'

    export default {
    command: 'mycommand',
    desc: 'My command description',
    builder: (yargs) => yargs.option('name', { type: 'string' }),
    handler: async (argv) => { console.log(argv.name) },
    } satisfies SemoCommand
    interface SemoCommand {
        aliases?: string | string[];
        builder?: Record<string, unknown> | ((yargs: Argv) => void | Argv<{}>);
        command: string | string[];
        desc?: string;
        describe?: string;
        disabled?: boolean;
        handler?: (
            argv: {
                _?: (string | number)[];
                cwd?: string;
                enableCoreHook?: string[];
                setEpilog?: string | string[];
                setVersion?: string;
                [key: string]: any;
            } & InitOptions & Record<string, unknown>,
        ) => void | Promise<void>;
        middlewares?: ((argv: Record<string, unknown>) => void | Promise<void>)[];
        noblank?: boolean;
        plugin?: string;
    }
    Index

    Properties

    aliases?: string | string[]
    builder?: Record<string, unknown> | ((yargs: Argv) => void | Argv<{}>)
    command: string | string[]
    desc?: string
    describe?: string
    disabled?: boolean
    handler?: (
        argv: {
            _?: (string | number)[];
            cwd?: string;
            enableCoreHook?: string[];
            setEpilog?: string | string[];
            setVersion?: string;
            [key: string]: any;
        } & InitOptions & Record<string, unknown>,
    ) => void | Promise<void>
    middlewares?: ((argv: Record<string, unknown>) => void | Promise<void>)[]
    noblank?: boolean
    plugin?: string