UNPKG

growthbook

Version:

The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform

28 lines (27 loc) 1.23 kB
import { Command } from '@oclif/core'; export type GrowthBookCLIConfig = { apiKey: string; apiBaseUrl: string; }; export type GrowthBookTomlProfile = { growthbook_secret: string; api_base_url: string; }; /** * Get the text content of the config file. * @return {string} String contents of the config file or an empty string */ export declare function getGrowthBookConfigToml(): string; /** * Gets a valid GrowthBook config or null * @param {string} profileKey The desired profile in the GrowthBook config * @return {GrowthBookCLIConfig | null} Valid GrowthBook config. If no valid config found, this will be null. */ export declare function getGrowthBookProfileConfig(profileKey: string): GrowthBookCLIConfig | null; /** * Will return do standard configuration missing messaging if there's an error calling {@link getGrowthBookProfileConfig} * @param profileKey {string} * @param command {Command} * @return {GrowthBookCLIConfig | null} Valid GrowthBook config. If no valid config found, this will be null but the application would display an error and exit. */ export declare function getGrowthBookProfileConfigAndThrowForCommand(profileKey: string, command: Command): GrowthBookCLIConfig | never;