matrix-appservice-bridge
    Preparing search index...

    Interface CliOpts<ConfigType>

    interface CliOpts<ConfigType extends Record<string, unknown>> {
        bridgeConfig?: {
            affectsRegistration?: boolean;
            defaults: Record<string, unknown>;
            schema: string | Record<string, unknown>;
        };
        enableLocalpart?: boolean;
        enableRegistration?: boolean;
        generateRegistration?: (
            reg: AppServiceRegistration,
            cb: (finalReg: AppServiceRegistration) => void,
        ) => void;
        noUrl?: boolean;
        onConfigChanged?: (config: ConfigType) => void;
        registrationPath?: string;
        run: (
            port: null | number,
            config: null | ConfigType,
            registration: null | AppServiceRegistration,
        ) => void;
    }

    Type Parameters

    • ConfigType extends Record<string, unknown>
    Index

    Properties

    bridgeConfig?: {
        affectsRegistration?: boolean;
        defaults: Record<string, unknown>;
        schema: string | Record<string, unknown>;
    }

    Bridge-specific config info. If not defined, --config option will not be present in the CLI

    Type declaration

    • OptionalaffectsRegistration?: boolean

      If true, the config will be required when generating a registration file.

    • defaults: Record<string, unknown>

      The default options for the config file.

    • schema: string | Record<string, unknown>

      Path to a schema YAML file (string) or the parsed schema file (object).

    enableLocalpart?: boolean

    Enable '--localpart [-l]' to allow users to configure the bot localpart.

    true
    
    enableRegistration?: boolean

    Enable '--generate-registration' to allow users to generate a registration file.

    true
    
    generateRegistration?: (
        reg: AppServiceRegistration,
        cb: (finalReg: AppServiceRegistration) => void,
    ) => void

    The function called when you should generate a registration. Must be defined unless enableRegistration is false.

    noUrl?: boolean

    Don't ask user for appservice url when generating registration.

    false
    
    onConfigChanged?: (config: ConfigType) => void

    This function is when the config is hot-reloaded. If not defined, hot-reloading is disabled.

    You can hot-reload the bridge by sending a SIGHUP signal to the bridge.

    registrationPath?: string

    The path to write the registration file to. Users can overwrite this with -f.

    "registration.yaml"
    
    run: (
        port: null | number,
        config: null | ConfigType,
        registration: null | AppServiceRegistration,
    ) => void

    This function called when you should run the bridge.