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

    Interface PluginWithInstanceHelpers<TOptions, TConfig, TArgs, TOpts, TGlobal>

    Compile-time helper type: the plugin object returned by definePlugin always includes the instance-bound helpers as required members. Keeping the public interface optional preserves compatibility for ad-hoc/test plugins, while return types from definePlugin provide stronger DX for shipped/typed plugins.

    interface PluginWithInstanceHelpers<
        TOptions extends GetDotenvOptions = GetDotenvOptions,
        TConfig = unknown,
        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?: z.ZodObject<$ZodLooseShape, $strip>;
        ns: string;
        setup: (
            cli: GetDotenvCliPublic<TOptions, TArgs, TOpts, TGlobal>,
        ) => void | Promise<void>;
        use: (
            child: GetDotenvCliPlugin<TOptions, TArgs, TOpts, TGlobal>,
            override?: PluginNamespaceOverride,
        ) => GetDotenvCliPlugin<TOptions, TArgs, TOpts, TGlobal>;
        createPluginDynamicOption<TCfg = TConfig, Usage extends string = string>(
            cli: GetDotenvCliPublic<
                TOptions,
                unknown[],
                OptionValues,
                OptionValues,
            >,
            flags: Usage,
            desc: (cfg: ResolvedHelpConfig, pluginCfg: Readonly<TCfg>) => string,
            parser?: (value: string, previous?: unknown) => unknown,
            defaultValue?: unknown,
        ): Option<Usage>;
        readConfig<TCfg = TConfig>(
            cli: GetDotenvCliPublic<
                TOptions,
                unknown[],
                OptionValues,
                OptionValues,
            >,
        ): Readonly<TCfg>;
    }

    Type Parameters

    Hierarchy (View Summary)

    Index

    Properties

    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).

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

    configSchema?: z.ZodObject<$ZodLooseShape, $strip>

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

    ns: string

    Namespace (required): the command name where this plugin is mounted.

    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.

    Methods