Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

LaunchDarkly CLI

$ ldcli Official High Risk
LaunchDarkly · Workspace & SaaS · Apache-2.0 · macos / linux / windows

LaunchDarkly 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.

FCRS-1.0 Score
86 /100
Good
Medium Confidence
Zero-Friction Install
brew install launchdarkly/homebrew-tap/ldcli
CLI vs MCP Decision Hybrid (CLI + MCP)

Use ldcli for deterministic -o json flag updates and CI scripts; LaunchDarkly MCP complements it for natural-language rollout audits.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 22 / 25

Consistent -o json formatting, LD_ACCESS_TOKEN support, and self-describing Cobra commands built from LaunchDarkly's API spec.

  • -o json output on projects, flags, and environments
  • Semantic patch --instructions avoids brittle JSON diffs
Trust & Safety 20 / 25

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
Setup & Portability 13 / 15

Available via Homebrew tap, npm (@launchdarkly/ldcli), Docker, and GitHub releases.

  • Multiple official package channels
Utility & Efficiency 13 / 15

Covers feature flags, environments, segments, and local dev-server syncing in one binary.

  • Supports both REST resource management and local dev-server
Maintenance & Lineage 9 / 10

Official LaunchDarkly repository (launchdarkly/ldcli) under Apache-2.0.

  • Official LaunchDarkly GitHub organization
Docs & Verifiability 9 / 10

Thorough official documentation and OpenAPI-aligned command flags.

  • Official docs at launchdarkly.com/docs/home/getting-started/ldcli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Config File
Credential Storage

Stores OAuth/API credentials in local config or accepts LD_ACCESS_TOKEN / --access-token for headless runs.

Side Effects
Read-Only Remote Write Destructive
Cost & Quotas

CLI is free (Apache-2.0); LaunchDarkly offers a Developer free tier and paid team/enterprise plans.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# 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

List LaunchDarkly projects as JSON
ldcli projects list -o json

Retrieves all accessible LaunchDarkly projects and keys in structured JSON.

Inspect feature flags in a project
ldcli flags list --project default -o json

Lists feature flag definitions, variations, and targeting summaries for the default project.

Controlled Writes & Previews

Toggle a flag off in test environment
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 json output and LD_ACCESS_TOKEN auth fit headless agent loops.
  • + Semantic patch --instructions prevent unintended overwrites of unrelated flag rules.
  • + Explicit --environment scoping 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 update mutations.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI