Skip to main content

Overview

This topic describes how to get started with the LaunchDarkly CLI.LaunchDarkly provides a command line interface (CLI) so that you can set up and manage your feature flags, account members, projects, environments, teams, and other resources directly from the command line.

Installation

The LaunchDarkly CLI is available for macOS, Windows, and Linux. To install the LaunchDarkly CLI:
To update to the latest version of the LaunchDarkly CLI:

Get started

To get started with the LaunchDarkly CLI, you need to authenticate yourself. Then, you can use setup to create and set up your first flag, run any of the ldcli commands.

Authentication

Before you run commands in the LaunchDarkly CLI, you need to authenticate yourself. You have a few options:
  • Authenticate with your email and password. The login command provides a login link to the LaunchDarkly UI, requests your approval for the LaunchDarkly CLI to access your account information, and then stores an appropriate access token in the LaunchDarkly CLI’s configuration file.
  • Authenticate with an access token that you create, and use the config command to set the token for your session. The config command to controls authorization and other configuration values.
  • Authenticate with an access token that you create, and pass the access token each command you run. Here’s how:
To learn how to create an access token, read Creating API access tokens.

Setup

The setup command provides a step-by-step guide to create a flag, install an SDK, and toggle that flag:

Additional documentation

LaunchDarkly provides the following additional documentation: