← 全部工具

growthbook

热度 65 更新于 开发与构建

Command-line interface for the GrowthBook REST API

npmauto-collected

安装

npm
npm install -g growthbook

通过 npm 安装。

growthbook

Command-line interface for the GrowthBook REST API.

Installation

The recommended way to install is via npm, which installs a small launcher that downloads the prebuilt binary for your platform:

npm i -g growthbook

Prefer a standalone binary with no Node.js dependency? An install script, go install, and prebuilt downloads are covered under CLI Installation below.

Versioning and stability

This CLI follows semantic versioning: breaking changes ship only in a major release and are called out in the changelog. Additive changes (new commands, flags, or response fields) are minor releases; fixes are patch releases. We recommend pinning to a version you have tested.

The CLI checks for a newer release at most once a day and prints a one-line notice to stderr (never stdout) when one is available and compatible with your server. Disable it with --no-update-check or GBCLINOUPDATECHECK=1; it is also off automatically in CI and non-interactive shells.

Command versioning

Each command group targets the newest version of its API endpoint — e.g. features is the latest (v2) feature API. When a command is superseded, the previous version stays available under a version suffix (e.g. features-v1), deprecated and printing a one-line notice to stderr. When a newer API version lands, the base group advances to it and the prior version becomes the next -vN.

Because the bare command then returns the newer version's response shape, re-pointing a base command is a breaking change: it ships as a major release with the change called out in the changelog — so you can pin the prior major or move to the explicit -vN command on your own schedule.

Summary

GrowthBook REST API: A command-line interface for GrowthBook — manage feature flags, experiments, metrics, and more from your terminal.

Endpoints are versioned by path prefix: /v1 (stable) and /v2 (improved shapes). Each command group targets the newest version of its endpoint; superseded versions remain available under a -vN suffix.

Authenticate with a Secret Key or Personal Access Token via --bearer-auth (or the GBCLIBEARERAUTH environment variable). Run growthbook configure to store credentials, or growthbook whoami to check the active configuration. <!-- End Summary [summary] --

Table of Contents

  • growthbook
  • Installation
  • Versioning and stability
  • CLI Installation
  • Shell Completion
  • CLI Example Usage