id = "ldcli"
name = "LaunchDarkly CLI"
homepage = "https://github.com/launchdarkly/ldcli"
description = "The official command line interface for managing LaunchDarkly feature flags."
executables = ["ldcli"]
[dotfiles]
paths = ["[configHome]/ldcli/config.yml"]
secret = []
[[dotfiles.secret_paths]]
file = "[configHome]/ldcli/config.yml"
format = "yaml"
match = { key_path = ["access-token"] }
[commands]
format = 1
label = "ldcli"
description = "Create a LaunchDarkly feature flag through the CLI. Other resource commands, dev-server and config are left out. The access token is usually stored with ldcli config, so it is optional here."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false }
[[commands.subcommand]]
path = ["flags", "create"]
label = "Create a flag"
description = "Create a feature flag in a project from a JSON body."
[[commands.subcommand.source]]
id = "readme"
kind = "help"
url = "https://github.com/launchdarkly/ldcli/blob/main/README.md"
revision = "2026-10"
evidence = """
ldcli flags create --access-token <access-token> --project default --data '{"name": "My Test Flag", "key": "my-test-flag"}'
When you do not pass `--output` or `--json`, the default format depends on whether standard output is a terminal: **plaintext** in an interactive terminal, **json** when stdout is not a TTY
**`--json`** (if set, wins over `--output` when both are present), then **`--output`**
"""
[[commands.subcommand.field]]
id = "project"
label = "Project key"
type = "string"
option = ["--project"]
suggestions = [{ value = "default", label = "default" }]
sources = ["readme"]
[[commands.subcommand.field]]
id = "data"
label = "Flag JSON body"
description = "For example {\"name\": \"My Test Flag\", \"key\": \"my-test-flag\"}."
type = "string"
option = ["--data"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "access_token"
label = "Access token"
description = "Leave empty to use the token saved by ldcli config. A token typed here stays in shell history."
type = "string"
option = ["--access-token"]
sources = ["readme"]
[[commands.subcommand.field]]
id = "output"
label = "Output format"
type = "enum"
option = ["--output"]
choices = [{ value = "plaintext", label = "Plain text" }, { value = "json", label = "JSON" }]
sources = ["readme"]
[[commands.subcommand.field]]
id = "json"
label = "JSON output"
type = "boolean"
option = ["--json"]
sources = ["readme"]
[[commands.subcommand.task]]
id = "create_flag"
label = "Create a flag"
fields = ["project", "data", "access_token"]
required = ["project", "data"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["project", "data"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["access_token", "output", "json"]