The GrowthBook command-line interface (CLI) is a tool for working with the GrowthBook A/B testing, feature flagging, and experimentation platform. Requires Node.js version 16+.Documentation Index
Fetch the complete documentation index at: https://growthbook-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The GrowthBook CLI is a brand new tool. If you experience any issues, let us know either on Slack or create an issue.
CLI Features
Generating Types
The GrowthBook CLI enables you to generate TypeScript types for working with the SDK. Rungrowthbook features generate-types --help for more info.
See the JavaScript SDK documentation for more information on working with typed features.
Profile management
If you have multiple GrowthBook organizations or accounts, you can easily switch between profiles when running individual commands. Rungrowthbook auth --help for more info.
Usage
Installing the CLI
You can install the CLI to your project with the following command:- npm
- Yarn
- pnpm
- Bun
growthbook executable should now be available in your project. You should now be able to run commands, e.g.:
Adding your API secret
Before using the GrowthBook CLI you will need to authenticate yourself. You will need to get an API key, which you can do here . Next, use thegrowthbook auth login --apiKey XXX command to set your token for the default profile.
Run growthbook auth login --help for more info and options.
Generating Types
You can also add it to yourpackage.json file of the project that will use the types, e.g.:
npm run type-gen or yarn type-gen.
Usage on CI/CD
If you’d like to use the CLI in continuous integration/continuous deployment environments, instead of running thegrowthbook auth login command, we recommend creating the following file at ~/.growthbook/config.toml with your secret and API base URL:
--profile flag in supported commands:

