KosmoKrator

devtools

LaunchDarkly CLI for AI Agents

Use the LaunchDarkly CLI from KosmoKrator to call LaunchDarkly tools headlessly, return JSON, inspect schemas, and automate workflows from coding agents, scripts, and CI.

7 functions 6 read 1 write Bearer token auth

LaunchDarkly CLI Setup

LaunchDarkly can be configured headlessly with `kosmokrator integrations:configure launchdarkly`.

# Install KosmoKrator first if it is not available on PATH.
curl -fsSL https://raw.githubusercontent.com/OpenCompanyApp/kosmokrator/main/install.sh | bash

# Configure and verify this integration.
kosmokrator integrations:configure launchdarkly --set access_token="$LAUNCHDARKLY_ACCESS_TOKEN" --set project_key="$LAUNCHDARKLY_PROJECT_KEY" --enable --read allow --write ask --json
kosmokrator integrations:doctor launchdarkly --json
kosmokrator integrations:status --json

Credentials

Authentication type: Bearer token bearer_token. Configure credentials once, then use the same stored profile from scripts, coding CLIs, Lua code mode, and the MCP gateway.

KeyEnv varTypeRequiredLabel
access_token LAUNCHDARKLY_ACCESS_TOKEN Secret secret yes Access Token
project_key LAUNCHDARKLY_PROJECT_KEY Text text yes Project Key
url LAUNCHDARKLY_URL URL url no API Base URL

Call LaunchDarkly Headlessly

Use the generic call form when another coding CLI or script needs a stable universal interface.

kosmo integrations:call launchdarkly.launchdarkly_list_flags '{
  "project_key": "example_project_key",
  "limit": 1,
  "offset": 1,
  "env": "example_env"
}' --json

Use the provider shortcut form for shorter human-facing commands.

kosmo integrations:launchdarkly launchdarkly_list_flags '{
  "project_key": "example_project_key",
  "limit": 1,
  "offset": 1,
  "env": "example_env"
}' --json

Agent Discovery Commands

These commands return structured output for coding agents that need to inspect capabilities before choosing a function.

kosmo integrations:docs launchdarkly --json
kosmo integrations:docs launchdarkly.launchdarkly_list_flags --json
kosmo integrations:schema launchdarkly.launchdarkly_list_flags --json
kosmo integrations:search "LaunchDarkly" --json
kosmo integrations:list --json

All CLI Functions

Every function below can be called headlessly. The generic form is stable across all integrations; the provider shortcut is shorter but specific to LaunchDarkly.

launchdarkly.launchdarkly_list_flags

Read read

List feature flags in a LaunchDarkly project. Returns flag keys, names, descriptions, and their on/off state per environment.

Parameters
project_key, limit, offset, env

Generic CLI call

kosmo integrations:call launchdarkly.launchdarkly_list_flags '{"project_key":"example_project_key","limit":1,"offset":1,"env":"example_env"}' --json

Provider shortcut

kosmo integrations:launchdarkly launchdarkly_list_flags '{"project_key":"example_project_key","limit":1,"offset":1,"env":"example_env"}' --json

launchdarkly.launchdarkly_get_flag

Read read

Get detailed information about a specific LaunchDarkly feature flag, including targeting rules, variations, and per-environment state.

Parameters
feature_flag_key, project_key, env

Generic CLI call

kosmo integrations:call launchdarkly.launchdarkly_get_flag '{"feature_flag_key":"example_feature_flag_key","project_key":"example_project_key","env":"example_env"}' --json

Provider shortcut

kosmo integrations:launchdarkly launchdarkly_get_flag '{"feature_flag_key":"example_feature_flag_key","project_key":"example_project_key","env":"example_env"}' --json

launchdarkly.launchdarkly_toggle_flag

Write write

Turn a LaunchDarkly feature flag on or off in a specific environment. Use this to enable or disable a feature flag.

Parameters
feature_flag_key, enabled, environment_key, project_key

Generic CLI call

kosmo integrations:call launchdarkly.launchdarkly_toggle_flag '{"feature_flag_key":"example_feature_flag_key","enabled":true,"environment_key":"example_environment_key","project_key":"example_project_key"}' --json

Provider shortcut

kosmo integrations:launchdarkly launchdarkly_toggle_flag '{"feature_flag_key":"example_feature_flag_key","enabled":true,"environment_key":"example_environment_key","project_key":"example_project_key"}' --json

launchdarkly.launchdarkly_list_environments

Read read

List all environments for a LaunchDarkly project. Returns environment keys, names, and their SDK keys for reference.

Parameters
project_key

Generic CLI call

kosmo integrations:call launchdarkly.launchdarkly_list_environments '{"project_key":"example_project_key"}' --json

Provider shortcut

kosmo integrations:launchdarkly launchdarkly_list_environments '{"project_key":"example_project_key"}' --json

launchdarkly.launchdarkly_list_projects

Read read

List all LaunchDarkly projects. Returns project keys, names, and the number of environments in each project.

Parameters
none

Generic CLI call

kosmo integrations:call launchdarkly.launchdarkly_list_projects '{}' --json

Provider shortcut

kosmo integrations:launchdarkly launchdarkly_list_projects '{}' --json

launchdarkly.launchdarkly_get_project

Read read

Get detailed information about a specific LaunchDarkly project, including its environments and settings.

Parameters
project_key

Generic CLI call

kosmo integrations:call launchdarkly.launchdarkly_get_project '{"project_key":"example_project_key"}' --json

Provider shortcut

kosmo integrations:launchdarkly launchdarkly_get_project '{"project_key":"example_project_key"}' --json

launchdarkly.launchdarkly_get_current_user

Read read

Get information about the currently authenticated LaunchDarkly user. Useful for verifying API credentials.

Parameters
none

Generic CLI call

kosmo integrations:call launchdarkly.launchdarkly_get_current_user '{}' --json

Provider shortcut

kosmo integrations:launchdarkly launchdarkly_get_current_user '{}' --json

Function Schemas

Use these parameter tables when building CLI payloads without calling integrations:schema first.

launchdarkly.launchdarkly_list_flags

List feature flags in a LaunchDarkly project. Returns flag keys, names, descriptions, and their on/off state per environment.

Operation
Read read
Schema command
kosmo integrations:schema launchdarkly.launchdarkly_list_flags --json
ParameterTypeRequiredDescription
project_key string no The project key (defaults to the configured project).
limit integer no Maximum number of flags to return (default: 20, max: 100).
offset integer no Offset for pagination (default: 0).
env string no Environment key to filter results (e.g., "production", "staging").

launchdarkly.launchdarkly_get_flag

Get detailed information about a specific LaunchDarkly feature flag, including targeting rules, variations, and per-environment state.

Operation
Read read
Schema command
kosmo integrations:schema launchdarkly.launchdarkly_get_flag --json
ParameterTypeRequiredDescription
feature_flag_key string yes The feature flag key (e.g., "enable-new-dashboard").
project_key string no The project key (defaults to the configured project).
env string no Environment key to filter results (e.g., "production", "staging").

launchdarkly.launchdarkly_toggle_flag

Turn a LaunchDarkly feature flag on or off in a specific environment. Use this to enable or disable a feature flag.

Operation
Write write
Schema command
kosmo integrations:schema launchdarkly.launchdarkly_toggle_flag --json
ParameterTypeRequiredDescription
feature_flag_key string yes The feature flag key (e.g., "enable-new-dashboard").
enabled boolean yes Set to true to turn the flag on, false to turn it off.
environment_key string yes The environment key (e.g., "production", "staging", "development").
project_key string no The project key (defaults to the configured project).

launchdarkly.launchdarkly_list_environments

List all environments for a LaunchDarkly project. Returns environment keys, names, and their SDK keys for reference.

Operation
Read read
Schema command
kosmo integrations:schema launchdarkly.launchdarkly_list_environments --json
ParameterTypeRequiredDescription
project_key string no The project key (defaults to the configured project).

launchdarkly.launchdarkly_list_projects

List all LaunchDarkly projects. Returns project keys, names, and the number of environments in each project.

Operation
Read read
Schema command
kosmo integrations:schema launchdarkly.launchdarkly_list_projects --json
ParameterTypeRequiredDescription
No parameters.

launchdarkly.launchdarkly_get_project

Get detailed information about a specific LaunchDarkly project, including its environments and settings.

Operation
Read read
Schema command
kosmo integrations:schema launchdarkly.launchdarkly_get_project --json
ParameterTypeRequiredDescription
project_key string yes The project key (e.g., "default", "my-backend-project").

launchdarkly.launchdarkly_get_current_user

Get information about the currently authenticated LaunchDarkly user. Useful for verifying API credentials.

Operation
Read read
Schema command
kosmo integrations:schema launchdarkly.launchdarkly_get_current_user --json
ParameterTypeRequiredDescription
No parameters.

Permissions

Headless calls still follow the integration read/write permission policy. Configure read/write defaults with integrations:configure. Add --force only for trusted automation that should bypass that policy.