For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • Get started
    • Overview
    • Onboarding
    • Get started
      • Developer tools
        • LaunchDarkly CLI
          • LaunchDarkly CLI commands
        • LaunchDarkly MCP server
        • LaunchDarkly developer toolbar
        • LaunchDarkly agent skills
        • Vega
        • IDE connectors and agents
      • Setting up an SDK
      • Joining an account
      • Using feature management
      • Getting started in different roles
    • Launch Insights
    • LaunchDarkly architecture
    • LaunchDarkly vocabulary
  • AgentControl
    • AgentControl
    • Manage AgentControl
  • Feature flags
    • Create flags
    • Target with flags
    • Flag templates
    • Manage flags
    • Code references
    • Contexts
    • Segments
  • Releases
    • Releasing features with LaunchDarkly
    • Release policies
    • Percentage rollouts
    • Progressive rollouts
    • Guarded rollouts
    • Feature monitoring
    • Release pipelines
    • Engineering insights
    • Release management tools
    • Applications and app versions
    • Change history
    • Restoring previous flag versions
  • Observability
    • Observability
    • Session replay
    • Error monitoring
    • Logs
    • Traces
    • Observability metrics
    • Product analytics events
    • LLM observability
    • Alerts
    • Dashboards
    • Service map
    • Vega for auto-remediation
    • Observability MCP server
    • Search specification
    • Observability settings
    • Observability integrations
  • Experimentation
    • Experimentation
    • Experiment metric types
    • Experiment configuration
    • Managing experiments
    • Analyzing experiments
    • Multi-armed bandits
    • Holdouts
  • Metrics and events
    • Metrics in LaunchDarkly
    • Creating metrics
    • Metric groups
    • Events
    • Autogenerated metrics
  • Warehouse native
    • Warehouse native metrics
    • Setting up external warehouses
    • Creating experiments using warehouse native metrics
  • Infrastructure
    • Connect apps and services to LaunchDarkly
    • LaunchDarkly in China and Pakistan
    • LaunchDarkly in the European Union (EU)
    • LaunchDarkly in federal environments
    • Public IP list
  • Your account
    • Projects
    • Views
    • Environments
    • Tags
    • Teams
    • Members
    • Roles
    • Account security
    • Feature previews
    • Billing and usage
    • Changelog
Sign inTry it free
LogoLogo
On this page
  • Overview
  • Installation
  • Get started
  • Authentication
  • Setup
  • Additional documentation
Get startedGet startedDeveloper tools

LaunchDarkly CLI

Was this page helpful?
Previous

LaunchDarkly CLI commands

Next
Built with

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:

$brew tap launchdarkly/homebrew-tap
$brew install ldcli

To update to the latest version of the LaunchDarkly CLI:

$brew upgrade ldcli

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:

$# you only need to run this once
$ldcli login

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:

Run ldcli setup
$ldcli setup

Additional documentation

LaunchDarkly provides the following additional documentation:

  • For more information about common commands, read LaunchDarkly CLI commands.
  • For details on how to use the LaunchDarkly CLI to perform local testing and development, read Using the LaunchDarkly CLI for local testing and read LaunchDarkly CLI dev-server reference.

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.