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
  • Overview
  • Prerequisites
  • Set up the IntelliJ IDEA plugin
  • Give your API access token the required permissions
  • Create a role and add it to an API access token
  • Add the Writer role to your personal access token
  • Configure the LaunchDarkly extension in IntelliJ IDEA
  • Code references in the IntelliJ IDEA plugin
Get startedGet startedDeveloper toolsIDE connectors and agents

IntelliJ IDEA

Was this page helpful?
Previous

LaunchDarkly extension for GitHub Copilot

Next
Built with

Overview

This topic explains how to configure the LaunchDarkly IntelliJ IDEA plugin and use it to interact with feature flags from within IntelliJ integrated development environments (IDEs).

Use this plugin with your favorite compatible products from JetBrains including IntelliJ IDEA, PyCharm, WebStorm, GoLand, and many others. A full compatibility list is available on the JetBrains Marketplace’s plugin listing.

With the extension, you can:

  • Autocomplete feature flag keys
  • View a tooltip with feature flag details when you hover over a flag key in your source code
  • Open to specific feature flags in LaunchDarkly from your code editor
  • View a list of feature flags and their settings in the LaunchDarkly tool window
  • Update a flag’s state, fallback value, and default off variation

Prerequisites

To complete this procedure, you must have the following prerequisites:

  • The IntelliJ IDEA plugin from the JetBrains Marketplace. The version must be compatible with your IDE.
  • A personal access token. To learn more, read API access tokens.

Set up the IntelliJ IDEA plugin

To set up the IntelliJ IDEA plugin, you must complete the following steps:

  1. Give your API access token the required permissions:
  • You can create a role with appropriate permissions, then add the role to a personal access token, or
  • you can add the Writer base role to your personal access token.
  1. Configure the LaunchDarkly extension in IntelliJ IDEA with the API access token.

Give your API access token the required permissions

You can create a role with appropriate permissions then add the role to a personal, or you can add the Writer base role to your personal access token.

Create a role and add it to an API access token

Expand Create a role and add it to an API access token
Creating your own roles is available to customers on select plans

Creating your own roles is only available to customers on select plans. To learn more, read about our pricing. To upgrade your plan, contact Sales.

The following example policy allows read access to all projects and write access to the minimal set of fields the plugin is able to update.

To create a role for the API access token:

  1. Click the gear icon in the left sidenav to view Organization settings. The General settings page appears.

  2. Click Roles.

  3. Click New role. The “New role” page appears.

  4. Enter a human-readable Name for the role.

  5. Enter a Key for the role.

  6. (Optional) Enter a Description to explain what the role does.

  7. In the “Edit policy” panel, click View JSON to open the advanced editor.

  8. Enter this policy in the “Editor” field:

    Read access to all and write access to some projects
    1[
    2 {
    3 "effect": "allow",
    4 "actions": ["viewProject"],
    5 "resources": ["proj/*"]
    6 },
    7 {
    8 "effect": "allow",
    9 "actions": ["updateOn", "updateFallthrough", "updateOffVariation"],
    10 "resources": ["proj/*:env/*:flag/*"]
    11 }
    12]
  9. Click Create role.

Add the Writer role to your personal access token

Expand Add the Writer role to your personal access token

To toggle flags from your IDE, you must generate the access token with a Writer base role. A Reader base role is sufficient for updating flag information.

To add the Writer base role to a personal access token:

  1. Click the gear icon in the left sidenav to view Organization settings. The General settings page appears.
  2. Click Authorization.
  3. Find the personal access token you want to add permissions to and select “Edit token” from its overflow menu. The “Edit” dialog appears.
  4. In the Role menu, select “Writer.”
  5. Click Save token.

Your personal token now has the Writer base role.

Configure the LaunchDarkly extension in IntelliJ IDEA

With your access token, you can finish configuring the LaunchDarkly extension in the “LaunchDarkly” menu option in the IntelliJ IDEA “Preferences” dialog.

You will need to grant IntelliJ IDEA access to system’s default credential store. This is to securely store your access token with IntelliJ’s Credential Store API. You can then provide your access token and select the project and environment associated with your IntelliJ project.

The IntelliJ IDEA "Preferences" dialog.

The IntelliJ IDEA "Preferences" dialog.

Code references in the IntelliJ IDEA plugin

The LaunchDarkly IntelliJ IDEA plugin supports code references. Configuring aliases for projects with code references makes the hover card available wherever that alias is used. To learn more, read Find flag aliases.