growthbook
v0.2.5
Published
The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform
Downloads
29,017
Readme
GrowthBook CLI
A CLI tool for helping developers work with the GrowthBook open-source platform for feature flags and A/B tests.
See the official GrowthBook CLI documentation for more information.
Commands
growthbook authgrowthbook auth logingrowthbook auth logoutgrowthbook datasources get IDgrowthbook datasources listgrowthbook dimensions get IDgrowthbook dimensions listgrowthbook experiments get IDgrowthbook experiments listgrowthbook experiments results EXPERIMENTIDgrowthbook features generate-typesgrowthbook features get FEATUREKEYgrowthbook features listgrowthbook features toggle FEATUREKEYgrowthbook help [COMMANDS]growthbook metrics create [INPUT]growthbook metrics get METRICIDgrowthbook metrics listgrowthbook projects get PROJECTIDgrowthbook projects listgrowthbook savedgroups create [INPUT]growthbook savedgroups delete IDgrowthbook savedgroups get IDgrowthbook savedgroups listgrowthbook savedgroups update [INPUT]growthbook sdkconnections get IDgrowthbook sdkconnections listgrowthbook segments get IDgrowthbook segments listgrowthbook vcs get IDgrowthbook vcs list
growthbook auth
USAGE
$ growthbook authgrowthbook auth login
Configure your API key with the GrowthBook SDK with your project
USAGE
$ growthbook auth login [-u <value>] [-p <value>] [-k <value>]
FLAGS
-k, --apiKey=<value> Your GrowthBook secret API Key
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Configure your API key with the GrowthBook SDK with your projectgrowthbook auth logout
Removes GrowthBook API key configurations
USAGE
$ growthbook auth logout [-p <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances or organizations)
(default: all profiles)
DESCRIPTION
Removes GrowthBook API key configurationsgrowthbook datasources get ID
Get a single datasource by ID
USAGE
$ growthbook datasources get ID [-u <value>] [-p <value>]
ARGUMENTS
ID Datasource ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a single datasource by ID
EXAMPLES
$ growthbook datasources getgrowthbook datasources list
Get all data sources
USAGE
$ growthbook datasources list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>] [--project <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
--project=<value> Project ID filter
DESCRIPTION
Get all data sources
EXAMPLES
$ growthbook datasources listgrowthbook dimensions get ID
Get a single dimension used during experiment analysis
USAGE
$ growthbook dimensions get ID [-u <value>] [-p <value>]
ARGUMENTS
ID Dimension ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a single dimension used during experiment analysis
EXAMPLES
$ growthbook dimensions getgrowthbook dimensions list
Get all dimensions used during experiment analysis
USAGE
$ growthbook dimensions list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>] [--dataSourceId <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--dataSourceId=<value> Data source ID to filter by
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
DESCRIPTION
Get all dimensions used during experiment analysis
EXAMPLES
$ growthbook dimensions listgrowthbook experiments get ID
Get a single experiment by ID
USAGE
$ growthbook experiments get ID [-u <value>] [-p <value>]
ARGUMENTS
ID Experiment ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a single experiment by ID
EXAMPLES
$ growthbook experiments getgrowthbook experiments list
Get all experiments
USAGE
$ growthbook experiments list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>] [--project <value>]
[--datasource <value>] [--experiment <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--datasource=<value> Datasource ID filter
--experiment=<value> Filter the returned list by the experiment tracking key (id)
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
--project=<value> Project ID filter
DESCRIPTION
Get all experiments
EXAMPLES
$ growthbook experiments listgrowthbook experiments results EXPERIMENTID
Get results for an experiment with optional phase and dimension filtering
USAGE
$ growthbook experiments results EXPERIMENTID [-u <value>] [-p <value>] [--dimension <value>] [--phase <value>]
ARGUMENTS
EXPERIMENTID ID of the experiment
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--dimension=<value>
--phase=<value>
DESCRIPTION
Get results for an experiment with optional phase and dimension filtering
EXAMPLES
$ growthbook experiments resultsgrowthbook features generate-types
Generate TypeScript types for all your features
USAGE
$ growthbook features generate-types [-u <value>] [-p <value>] [-o <value>] [-f <value>] [--project <value>]
FLAGS
-f, --filename=<value> Output filename for the generated types. If not provided, the filename app-features.ts will
be used.
-o, --output=<value> Output path for the app-features.ts file. All directories in this path should exist. If not
provided, the directory ./growthbook-types will be created in the current working directory.
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--project=<value> Project ID filter
DESCRIPTION
Generate TypeScript types for all your featuresgrowthbook features get FEATUREKEY
Get a feature by key
USAGE
$ growthbook features get FEATUREKEY [-u <value>] [-p <value>]
ARGUMENTS
FEATUREKEY Feature key
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a feature by key
EXAMPLES
$ growthbook features getgrowthbook features list
Get all features
USAGE
$ growthbook features list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>] [--project <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
--project=<value> Project ID filter
DESCRIPTION
Get all features
EXAMPLES
$ growthbook features listgrowthbook features toggle FEATUREKEY
Toggle a feature on or off for a specific environment
USAGE
$ growthbook features toggle FEATUREKEY -e <value> -n true|false|on|off|1|0 [-u <value>] [-p <value>] [-r <value>]
ARGUMENTS
FEATUREKEY Feature key to toggle
FLAGS
-e, --environment=<value> (required) Environment that you would like to toggle
-n, --enabled=<option> (required) Enabled state of the feature
<options: true|false|on|off|1|0>
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-r, --reason=<value> The reason for toggling it on
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Toggle a feature on or off for a specific environment
EXAMPLES
$ growthbook features togglegrowthbook help [COMMANDS]
Display help for growthbook.
USAGE
$ growthbook help [COMMANDS] [-n]
ARGUMENTS
COMMANDS Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for growthbook.growthbook metrics create [INPUT]
Create a metric from file or standard in
USAGE
$ growthbook metrics create [INPUT] [-u <value>] [-p <value>] [-f <value>] [-o <value>]
ARGUMENTS
INPUT JSON payload of the metric to be created. Docs:
https://docs.growthbook.io/api/#tag/metrics/operation/postMetric
FLAGS
-f, --filePath=<value> Path to input file
-o, --output=<value> Path to output file, e.g. created-resource.json
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Create a metric from file or standard in
EXAMPLES
cat my-metric.json | growthbook metrics create
$ growthbook metrics create --filePath my-metric.jsongrowthbook metrics get METRICID
Get a single metric by ID
USAGE
$ growthbook metrics get METRICID [-u <value>] [-p <value>]
ARGUMENTS
METRICID Metric ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a single metric by ID
EXAMPLES
$ growthbook metrics getgrowthbook metrics list
List all metrics
USAGE
$ growthbook metrics list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>] [--project <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
--project=<value> Project ID filter
DESCRIPTION
List all metrics
EXAMPLES
$ growthbook metrics listgrowthbook projects get PROJECTID
Get a single project by ID
USAGE
$ growthbook projects get PROJECTID [-u <value>] [-p <value>]
ARGUMENTS
PROJECTID Project ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a single project by ID
EXAMPLES
$ growthbook projects getgrowthbook projects list
List all projects
USAGE
$ growthbook projects list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
DESCRIPTION
List all projects
EXAMPLES
$ growthbook projects listgrowthbook savedgroups create [INPUT]
Create a saved group
USAGE
$ growthbook savedgroups create [INPUT] [-u <value>] [-p <value>] [-f <value>] [-o <value>]
ARGUMENTS
INPUT JSON payload of the saved group to be created. Docs:
https://docs.growthbook.io/api/#tag/saved-groups/operation/postSavedGroup
FLAGS
-f, --filePath=<value> Path to input file
-o, --output=<value> Path to output file, e.g. created-resource.json
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Create a saved group
EXAMPLES
$ growthbook savedgroups create
$ growthbook savedgroups create --filePath input.jsongrowthbook savedgroups delete ID
Delete a saved group
USAGE
$ growthbook savedgroups delete ID [-u <value>] [-p <value>]
ARGUMENTS
ID Saved Group ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Delete a saved group
EXAMPLES
$ growthbook savedgroups deletegrowthbook savedgroups get ID
Get a single saved group by ID
USAGE
$ growthbook savedgroups get ID [-u <value>] [-p <value>]
ARGUMENTS
ID Saved Group ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a single saved group by ID
EXAMPLES
$ growthbook savedgroups getgrowthbook savedgroups list
Defined sets of attribute values which can be used with feature rules for targeting features at particular users.
USAGE
$ growthbook savedgroups list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
DESCRIPTION
Defined sets of attribute values which can be used with feature rules for targeting features at particular users.
EXAMPLES
$ growthbook savedgroups listgrowthbook savedgroups update [INPUT]
Update an existing saved group.
USAGE
$ growthbook savedgroups update [INPUT] -i <value> [-u <value>] [-p <value>] [-f <value>] [-o <value>]
ARGUMENTS
INPUT JSON payload of the update payload. Docs:
https://docs.growthbook.io/api/#tag/saved-groups/operation/updateSavedGroup
FLAGS
-f, --filePath=<value> Path to input file
-i, --id=<value> (required) Saved group ID to update
-o, --output=<value> Path to output file, e.g. created-resource.json
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Update an existing saved group.
EXAMPLES
$ growthbook savedgroups update
$ growthbook savedgroups update --filePath input.jsongrowthbook sdkconnections get ID
Client keys and settings for connecting SDKs to a GrowthBook instance
USAGE
$ growthbook sdkconnections get ID [-u <value>] [-p <value>]
ARGUMENTS
ID SDK connection ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Client keys and settings for connecting SDKs to a GrowthBook instance
EXAMPLES
$ growthbook sdkconnections getgrowthbook sdkconnections list
Client keys and settings for connecting SDKs to a GrowthBook instance
USAGE
$ growthbook sdkconnections list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>] [--projectId <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
--projectId=<value> Project ID to filter by
DESCRIPTION
Client keys and settings for connecting SDKs to a GrowthBook instance
EXAMPLES
$ growthbook sdkconnections listgrowthbook segments get ID
Get a single segment used during experiment analysis
USAGE
$ growthbook segments get ID [-u <value>] [-p <value>]
ARGUMENTS
ID Segment ID
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a single segment used during experiment analysis
EXAMPLES
$ growthbook segments getgrowthbook segments list
Get all segments used during experiment analysis
USAGE
$ growthbook segments list [-u <value>] [-p <value>] [--limit <value>] [--offset <value>] [--dataSourceId <value>]
FLAGS
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
--dataSourceId=<value> Data source ID to filter by
--limit=<value> [default: 100] Limit for pagination
--offset=<value> Offset for pagination
DESCRIPTION
Get all segments used during experiment analysis
EXAMPLES
$ growthbook segments listgrowthbook vcs get ID
Get a Visual Changeset created in the visual editor
USAGE
$ growthbook vcs get ID [-u <value>] [-p <value>] [-e 0|1]
ARGUMENTS
ID Visual Changeset ID
FLAGS
-e, --includeExperiment=<option> Include the associated experiment in payload
<options: 0|1>
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default:
default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
Get a Visual Changeset created in the visual editor
EXAMPLES
$ growthbook vcs getgrowthbook vcs list
List Visual Changesets created in the visual editor
USAGE
$ growthbook vcs list -e <value> [-u <value>] [-p <value>]
FLAGS
-e, --experiment=<value> (required) Filter by experiment
-p, --profile=<value> Optional profile (for projects that use multiple GrowthBook instances) default: default)
-u, --apiBaseUrl=<value> Your GrowthBook instance base URL (e.g. http://localhost:3100, default:
https://api.growthbook.io)
DESCRIPTION
List Visual Changesets created in the visual editor
EXAMPLES
$ growthbook vcs list