Cloning existing flags
Read time: 2 minutes
Last edited: Aug 16, 2024
Overview
You can create new flags by cloning existing flags. When you clone a flag, LaunchDarkly makes a new flag and copies the original flag's targeting configuration for all environments, including default values and whether the flag is toggled on or off. You can then modify the clone's configuration if needed.
To clone a flag:
- Navigate to the Flags list and open the flag you wish to clone.
- Click the gear icon. The flag's "Settings" page appears.
- In the "Clone flag" section, click Clone this flag.
- The "Clone feature flag" dialog appears:
![The "Clone feature flag" dialog.](/static/1725648931859.4363522669/6af66/flag-clone-details.auto.png)
- Enter a unique, human-readable Name.
- (Optional) Update the unique flag Key. You'll use this key to reference the flag in your code. A suggested key auto-populates from the name you enter, but you can customize it if you wish.
- (Optional) Enter a Description of the new flag. A brief, human-readable description helps your account members understand what the flag is for.
- (Optional) Click into the Tags menu and choose one or more tags for your flag.
Tags sort flags into groups
Tags are useful for managing flag permissions using custom roles. For example, you can tag a flag as "Marketing" and "DevOps," and then use these tags to determine who has read or write access for the flag. To learn more, read Custom roles.
- Click Save flag. You are taken to the new flag's targeting page.
The new flag appears in the Flags list.
You can also use the REST API: Copy feature flag