LaunchDarkly CLI
$ ldcli Official High RiskLaunchDarkly CLI (ldcli) lets engineers and agents list projects, inspect feature flag targeting, toggle flags in test environments, and bootstrap local dev flags. Structured -o json output and LD_ACCESS_TOKEN auth make it reliable for automated release pipelines.
brew install launchdarkly/homebrew-tap/ldcli Use ldcli for deterministic -o json flag updates and CI scripts; LaunchDarkly MCP complements it for natural-language rollout audits.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Consistent -o json formatting, LD_ACCESS_TOKEN support, and self-describing Cobra commands built from LaunchDarkly's API spec.
-o jsonoutput onprojects,flags, andenvironments- Semantic patch
--instructionsavoids brittle JSON diffs
Requires explicit --project and --environment targeting on flag mutations and works with RBAC-scoped LD_ACCESS_TOKENs.
- Environment-scoped flag mutations
- Supports LaunchDarkly custom role tokens
Available via Homebrew tap, npm (@launchdarkly/ldcli), Docker, and GitHub releases.
- Multiple official package channels
Covers feature flags, environments, segments, and local dev-server syncing in one binary.
- Supports both REST resource management and local
dev-server
Official LaunchDarkly repository (launchdarkly/ldcli) under Apache-2.0.
- Official LaunchDarkly GitHub organization
Thorough official documentation and OpenAPI-aligned command flags.
- Official docs at launchdarkly.com/docs/home/getting-started/ldcli
Security, Auth & Guardrails
Stores OAuth/API credentials in local config or accepts LD_ACCESS_TOKEN / --access-token for headless runs.
CLI is free (Apache-2.0); LaunchDarkly offers a Developer free tier and paid team/enterprise plans.
# LaunchDarkly CLI Agent Rules - Always specify `--environment test` (or staging); NEVER target `production` flags without explicit human approval. - Use semantic patch `--instructions` for targeted updates instead of full flag overwrites. - Scope `LD_ACCESS_TOKEN` to non-production custom roles whenever possible.
Agent-Ready Command Recipes
Safe Read-Only Queries
ldcli projects list -o json
Retrieves all accessible LaunchDarkly projects and keys in structured JSON.
ldcli flags list --project default -o json
Lists feature flag definitions, variations, and targeting summaries for the default project.
Controlled Writes & Previews
ldcli flags update --project default --flag new-checkout --environment test --instructions '[{"kind":"turnFlagOff"}]' -o json Applies a semantic patch instruction to disable a feature flag strictly in the test environment.
Strengths for Agents
- + Consistent
-o jsonoutput andLD_ACCESS_TOKENauth fit headless agent loops. - + Semantic patch
--instructionsprevent unintended overwrites of unrelated flag rules. - + Explicit
--environmentscoping protects production traffic when locked to test tokens.
Caveats & Pitfalls
- ! Production flag flips are immediately user-facing if an agent holds an unrestricted token.
- ! Requires constructing JSON instruction arrays for
flags updatemutations.