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 MCP server
        • LaunchDarkly developer toolbar
        • LaunchDarkly agent skills
        • Vega
        • IDE connectors and agents
          • IntelliJ IDEA
          • LaunchDarkly extension for GitHub Copilot
          • Visual Studio Code (VSCode)
          • Flag cleanup custom agent for GitHub Copilot
      • 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
  • Flag Actions command
  • Dashboard Shortcuts command
  • Code references in the VSCode extension
  • Quick targeting in the VSCode extension
  • Targets
  • Rules
  • Telemetry
Get startedGet startedDeveloper toolsIDE connectors and agents

LaunchDarkly extension for GitHub Copilot

Was this page helpful?
Previous

Visual Studio Code (VSCode)

Next
Built with
The LaunchDarkly extension for GitHub Copilot is available to customers on select plans

The LaunchDarkly extension for GitHub Copilot on Visual Studio Marketplace is available only in conjunction with the LaunchDarkly VSCode extension. The VSCode extension is only available to customers on select plans. To learn more, read about our pricing. To upgrade your plan, contact Sales.

The LaunchDarkly extension for GitHub Copilot on Visual Studio Marketplace provides GitHub Copilot functionality for managing the lifecycle of a feature flag from within Visual Studio Code (VSCode).

To enable @LaunchDarkly commands in GitHub Copilot, confirm that you are using the latest version of VSCode and that you are using the GitHub Copilot Chat extension for VSCode.

In your GitHub Copilot prompt, you can use the following @LaunchDarkly commands:

CommandDefinitionExample
@LaunchDarkly /createFlagGitHub Copilot creates a LaunchDarkly feature flag based on your prompt@LaunchDarkly /createFlag I need a new feature flag for the account-migration project
@LaunchDarkly /explainGitHub Copilot asks you to select a flag, and then provides a summary of the flag, its variations, and its release pipeline status. If the flag is ready for cleanup, the summary will mention that, and the Problems tab will include a message that the flag is ready for cleanup.@LaunchDarkly /explain
@LaunchDarkly /cleanupGitHub Copilot asks you to select a flag, and then determines whether or not the selected flag is ready for cleanup. It provides details on each criteria that must be met. To learn more about when a flag can be archived, read Archiving flags.@LaunchDarkly /cleanup

Flag Actions command

Use the LaunchDarkly: Flag Actions command to bring up a menu of options that you can choose from to interact with your feature flags.

Dashboard Shortcuts command

Use the LaunchDarkly: Dashboard Shortcuts command to open a list of your shortcuts for the configured project.

Code references in the VSCode extension

The LaunchDarkly VSCode extension supports code references. If you use code references, configuring aliases makes the informational hover available wherever an alias appears in your code. Aliases appear under the flag entry in the Explorer view. To learn more, read Find flag aliases.

Flag searches across the workspace also include flag references.

Quick targeting in the VSCode extension

The LaunchDarkly VSCode extension supports quick targeting. This is useful if you use a consistent targeting context key or rule when coding with feature flags.

It will look for a yaml file, rules.yaml, located in the .launchdarkly subdirectory of your home directory. The full path is: ~/.launchdarkly/rules.yaml.

Here’s an example:

Example Targeting YAML
1targets:
2 - name: Target Me in Context
3 values: example-context-key
4 - name: Target Me in Account Context
5 contextKind: account
6 values: account-1234
7rules:
8 - name: My Test Organization
9 clauses:
10 - contextKind: user
11 attribute: organization
12 op: in
13 negate: false
14 values:
15 - org-1234

Targets

You can define targets with the following attributes:

  • Name: A descriptive name for the target.
  • ContextKind (Optional): The kind of context for account-related targeting, for example, account. If not provided, defaults to user.
  • Values: An array of specific keys or identifiers for targeting.

Rules

Rules are conditions set for targeting. Each rule has:

  • Name: A descriptive name for the rule.
  • Clauses: Conditions under which this rule applies. Each clause can specify:
    • ContextKind: The context kind, such as user, to which the clause applies.
    • Attribute: The specific attribute within the context to evaluate, such as organization.
    • Operation (op): Defines the operation to apply for the clause’s condition. Supported operations include: in, endsWith, startsWith, matches, contains, lessThan, semVerEqual, semVerLessThan, semVerGreaterThan, before, and after.
    • Negate: A boolean indicating if the condition should be inverted. If true, the rule applies when the condition is not met.
    • Values: An array of values to compare the attribute against based on the operation.

Telemetry

LaunchDarkly collects information about your use of this extension in accordance with the LaunchDarkly privacy policy.

You can opt out at any time in the extension settings by navigating to LaunchDarkly > Enable Telemetry and unchecking the box. We also respect the VSCode Telemetry setting.