growthbook
Version:
The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform
25 lines (24 loc) • 952 B
TypeScript
import { Command } from '@oclif/core';
export default class Login extends Command {
static description: string;
static examples: never[];
static flags: {};
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;
}