@karmaniverous/get-dotenv
    Preparing search index...

    Interface GetDotenvCliPlugin<TOptions, TArgs, TOpts, TGlobal>

    Public plugin contract used by the GetDotenv CLI host.

    interface GetDotenvCliPlugin<
        TOptions extends GetDotenvOptions = GetDotenvOptions,
        TArgs extends unknown[] = [],
        TOpts extends OptionValues = {},
        TGlobal extends OptionValues = {},
    > {
        afterResolve?: (
            cli: GetDotenvCliPublic<TOptions, TArgs, TOpts, TGlobal>,
            ctx: GetDotenvCliCtx<TOptions>,
        ) => void | Promise<void>;
        children: PluginChildEntry<TOptions, TArgs, TOpts, TGlobal>[];
        configSchema?: ZodObject<$ZodLooseShape, $strip>;
        ns: string;
        nsOptions?: NsOptions;
        setup: (
            cli: GetDotenvCliPublic<TOptions, TArgs, TOpts, TGlobal>,
        ) => void | Promise<void>;
        use: (
            child: GetDotenvCliPlugin<TOptions, TArgs, TOpts, TGlobal>,
            override?: PluginNamespaceOverride,
        ) => GetDotenvCliPlugin<TOptions, TArgs, TOpts, TGlobal>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index
    afterResolve?: (
        cli: GetDotenvCliPublic<TOptions, TArgs, TOpts, TGlobal>,
        ctx: GetDotenvCliCtx<TOptions>,
    ) => void | Promise<void>

    After the dotenv context is resolved, initialize any clients/secrets or attach per-plugin state under ctx.plugins (by convention). Runs parent → children (pre-order).

    Scoping: When the host provides an invoked subcommand filter, afterResolve only fires for plugins whose realized mount path (built from effective namespaces: override > default) matches the invoked command path. A plugin's afterResolve should never produce side effects for commands outside its subtree.

    Compositional children, with optional per-child overrides (e.g., ns). Installed after the parent per pre-order.

    configSchema?: ZodObject<$ZodLooseShape, $strip>

    Zod schema for this plugin's config slice (from config.plugins[…]).

    ns: string

    Namespace (required): the default command name where this plugin is mounted. A .use(plugin, \{ ns \}) override replaces it for that mount.

    nsOptions?: NsOptions

    Options forwarded to the host's ns() call when creating the mount for this plugin (e.g. { isDefault: true }).

    setup: (
        cli: GetDotenvCliPublic<TOptions, TArgs, TOpts, TGlobal>,
    ) => void | Promise<void>

    Setup phase: register commands and wiring on the provided mount. Runs parent → children (pre-order). Return nothing (void).

    Compose a child plugin with optional override (ns). Returns the parent to enable chaining.