The GrowthBook command-line interface (CLI) for working with the GrowthBook A/B testing, feature flagging, and experimentation platform
npm install growthbookA 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.
* growthbook auth
* growthbook auth login
* growthbook auth logout
* growthbook datasources get ID
* growthbook datasources list
* growthbook dimensions get ID
* growthbook dimensions list
* growthbook experiments get ID
* growthbook experiments list
* growthbook experiments results EXPERIMENTID
* growthbook features generate-types
* growthbook features get FEATUREKEY
* growthbook features list
* growthbook features toggle FEATUREKEY
* [growthbook help [COMMANDS]](#growthbook-help-commands)
* [growthbook metrics create [INPUT]](#growthbook-metrics-create-input)
* growthbook metrics get METRICID
* growthbook metrics list
* growthbook projects get PROJECTID
* growthbook projects list
* [growthbook savedgroups create [INPUT]](#growthbook-savedgroups-create-input)
* growthbook savedgroups delete ID
* growthbook savedgroups get ID
* growthbook savedgroups list
* [growthbook savedgroups update [INPUT]](#growthbook-savedgroups-update-input)
* growthbook sdkconnections get ID
* growthbook sdkconnections list
* growthbook segments get ID
* growthbook segments list
* growthbook vcs get ID
* growthbook vcs list
growthbook auth```
USAGE
$ growthbook auth
Configure your API key with the GrowthBook SDK with your project
`
USAGE
$ growthbook auth login [-u
FLAGS
-k, --apiKey=
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Configure your API key with the GrowthBook SDK with your project
`
Removes GrowthBook API key configurations
`
USAGE
$ growthbook auth logout [-p
FLAGS
-p, --profile=
(default: all profiles)
DESCRIPTION
Removes GrowthBook API key configurations
`
Get a single datasource by ID
`
USAGE
$ growthbook datasources get ID [-u
ARGUMENTS
ID Datasource ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a single datasource by ID
EXAMPLES
$ growthbook datasources get
`
Get all data sources
`
USAGE
$ growthbook datasources list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--limit=
--offset=
--project=
DESCRIPTION
Get all data sources
EXAMPLES
$ growthbook datasources list
`
Get a single dimension used during experiment analysis
`
USAGE
$ growthbook dimensions get ID [-u
ARGUMENTS
ID Dimension ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a single dimension used during experiment analysis
EXAMPLES
$ growthbook dimensions get
`
Get all dimensions used during experiment analysis
`
USAGE
$ growthbook dimensions list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--dataSourceId=
--limit=
--offset=
DESCRIPTION
Get all dimensions used during experiment analysis
EXAMPLES
$ growthbook dimensions list
`
Get a single experiment by ID
`
USAGE
$ growthbook experiments get ID [-u
ARGUMENTS
ID Experiment ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a single experiment by ID
EXAMPLES
$ growthbook experiments get
`
Get all experiments
`
USAGE
$ growthbook experiments list [-u
[--datasource
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--datasource=
--experiment=
--limit=
--offset=
--project=
DESCRIPTION
Get all experiments
EXAMPLES
$ growthbook experiments list
`
Get results for an experiment with optional phase and dimension filtering
`
USAGE
$ growthbook experiments results EXPERIMENTID [-u
ARGUMENTS
EXPERIMENTID ID of the experiment
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--dimension=
--phase=
DESCRIPTION
Get results for an experiment with optional phase and dimension filtering
EXAMPLES
$ growthbook experiments results
`
Generate TypeScript types for all your features
`
USAGE
$ growthbook features generate-types [-u
FLAGS
-f, --filename=
be used.
-o, --output=
provided, the directory ./growthbook-types will be created in the current working directory.
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--project=
DESCRIPTION
Generate TypeScript types for all your features
`
Get a feature by key
`
USAGE
$ growthbook features get FEATUREKEY [-u
ARGUMENTS
FEATUREKEY Feature key
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a feature by key
EXAMPLES
$ growthbook features get
`
Get all features
`
USAGE
$ growthbook features list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--limit=
--offset=
--project=
DESCRIPTION
Get all features
EXAMPLES
$ growthbook features list
`
Toggle a feature on or off for a specific environment
`
USAGE
$ growthbook features toggle FEATUREKEY -e
ARGUMENTS
FEATUREKEY Feature key to toggle
FLAGS
-e, --environment=
-n, --enabled=
DESCRIPTION
Toggle a feature on or off for a specific environment
EXAMPLES
$ growthbook features toggle
`
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.
`
Create a metric from file or standard in
`
USAGE
$ growthbook metrics create [INPUT] [-u
ARGUMENTS
INPUT JSON payload of the metric to be created. Docs:
https://docs.growthbook.io/api/#tag/metrics/operation/postMetric
FLAGS
-f, --filePath=
-o, --output=
-p, --profile=
-u, --apiBaseUrl=
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.json
`
Get a single metric by ID
`
USAGE
$ growthbook metrics get METRICID [-u
ARGUMENTS
METRICID Metric ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a single metric by ID
EXAMPLES
$ growthbook metrics get
`
List all metrics
`
USAGE
$ growthbook metrics list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--limit=
--offset=
--project=
DESCRIPTION
List all metrics
EXAMPLES
$ growthbook metrics list
`
Get a single project by ID
`
USAGE
$ growthbook projects get PROJECTID [-u
ARGUMENTS
PROJECTID Project ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a single project by ID
EXAMPLES
$ growthbook projects get
`
List all projects
`
USAGE
$ growthbook projects list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--limit=
--offset=
DESCRIPTION
List all projects
EXAMPLES
$ growthbook projects list
`
Create a saved group
`
USAGE
$ growthbook savedgroups create [INPUT] [-u
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=
-o, --output=
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Create a saved group
EXAMPLES
$ growthbook savedgroups create
$ growthbook savedgroups create --filePath input.json
`
Delete a saved group
`
USAGE
$ growthbook savedgroups delete ID [-u
ARGUMENTS
ID Saved Group ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Delete a saved group
EXAMPLES
$ growthbook savedgroups delete
`
Get a single saved group by ID
`
USAGE
$ growthbook savedgroups get ID [-u
ARGUMENTS
ID Saved Group ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a single saved group by ID
EXAMPLES
$ growthbook savedgroups get
`
Defined sets of attribute values which can be used with feature rules for targeting features at particular users.
`
USAGE
$ growthbook savedgroups list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--limit=
--offset=
DESCRIPTION
Defined sets of attribute values which can be used with feature rules for targeting features at particular users.
EXAMPLES
$ growthbook savedgroups list
`
Update an existing saved group.
`
USAGE
$ growthbook savedgroups update [INPUT] -i
ARGUMENTS
INPUT JSON payload of the update payload. Docs:
https://docs.growthbook.io/api/#tag/saved-groups/operation/updateSavedGroup
FLAGS
-f, --filePath=
-i, --id=
-o, --output=
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Update an existing saved group.
EXAMPLES
$ growthbook savedgroups update
$ growthbook savedgroups update --filePath input.json
`
Client keys and settings for connecting SDKs to a GrowthBook instance
`
USAGE
$ growthbook sdkconnections get ID [-u
ARGUMENTS
ID SDK connection ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Client keys and settings for connecting SDKs to a GrowthBook instance
EXAMPLES
$ growthbook sdkconnections get
`
Client keys and settings for connecting SDKs to a GrowthBook instance
`
USAGE
$ growthbook sdkconnections list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--limit=
--offset=
--projectId=
DESCRIPTION
Client keys and settings for connecting SDKs to a GrowthBook instance
EXAMPLES
$ growthbook sdkconnections list
`
Get a single segment used during experiment analysis
`
USAGE
$ growthbook segments get ID [-u
ARGUMENTS
ID Segment ID
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
Get a single segment used during experiment analysis
EXAMPLES
$ growthbook segments get
`
Get all segments used during experiment analysis
`
USAGE
$ growthbook segments list [-u
FLAGS
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
--dataSourceId=
--limit=
--offset=
DESCRIPTION
Get all segments used during experiment analysis
EXAMPLES
$ growthbook segments list
`
Get a Visual Changeset created in the visual editor
`
USAGE
$ growthbook vcs get ID [-u
ARGUMENTS
ID Visual Changeset ID
FLAGS
-e, --includeExperiment=
DESCRIPTION
Get a Visual Changeset created in the visual editor
EXAMPLES
$ growthbook vcs get
`
List Visual Changesets created in the visual editor
`
USAGE
$ growthbook vcs list -e
FLAGS
-e, --experiment=
-p, --profile=
-u, --apiBaseUrl=
https://api.growthbook.io)
DESCRIPTION
List Visual Changesets created in the visual editor
EXAMPLES
$ growthbook vcs list
``