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.
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:
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.
Before you run commands in the LaunchDarkly CLI, you need to authenticate yourself. You have a few options:
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.config command to set the token for your session. The config command to controls authorization and other configuration values.Here’s how:
To learn how to create an access token, read Creating API access tokens.
The setup command provides a step-by-step guide to create a flag, install an SDK, and toggle that flag:
LaunchDarkly provides the following additional documentation:
You can also use the ldcli [command] --help command to view usage information for all commands for the LaunchDarkly CLI.
To view and contribute to the LaunchDarkly CLI source code, or to file issues for our team, visit the LaunchDarkly CLI GitHub repository.