growthbook
Version:
The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform
29 lines (28 loc) • 1.39 kB
TypeScript
import { Command } from '@oclif/core';
export default class Login extends Command {
static description: string;
static examples: never[];
static flags: {
apiKey: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
apiBaseUrl: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
profile: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
};
static args: {};
run(): Promise<void>;
/**
* Writes the API key to the config file. Will throw errors if it cannot read or write to the file
* @param {string} apiKey The GrowthBook secret
* @param {string} profile The profile to write in the config
* @param {string} apiBaseUrl The base URL of the GrowthBook API
* @return void
*/
private writeApiKeyToGrowthBookConfig;
/**
* Finds the GrowthBook config.toml file in ~/.growthbook/config.toml
* If the directory doesn't exist, it will be created.
* If the directory cannot be created, the program will exit.
* @returns {string} Contents of the config.toml file or an empty string
*/
private getGrowthBookConfigFileContents;
private writeConfigFile;
}