Welcome! Let's get started. We'll do the following:
- Create your first flag.
- Install the Reflag SDK.
- Set flag access rules and/or remote config.
- Enable Toolbar for local testing
- Monitor your flag launch.
Now let's create your first flag.
{% tabs %} {% tab title="CLI" %}
npx @reflag/cli new
See CLI docs. {% endtab %}
{% tab title="UI" %}
- Sign up in the app
- Click
New flagin the sidebar. - Give your flag a name, and we'll suggest a
flag key.
{% tab title="MCP" %} You can create flags from your code editor via our MCP. {% endtab %}
{% tab title="Linear" %}
You can create flags from within Linear by mentioning the @reflag agent.
{% endtab %}
{% endtabs %}
Next, let's set up a Reflag SDK for your language and framework.
Find the supported languages below:
{% include ".gitbook/includes/sdks.md" %}
If you've installed the React SDK and created a flag called my-new-flag, getting started looks like this:
import { useFlag } from "@reflag/react-sdk";
const MyFlag = () => {
const { isEnabled } = useFlag("my-new-flag");
return isEnabled ? "You have access!" : null;
};You can now use isEnabled to gate access to the flag.
Head back to your dashboard, select your flag, and open the Access tab.
From here, you can define segments, companies, and users that will access your flag.
In the frontend SDK, enable the Toolbar to toggle flags locally.
In the React SDK, you enable it with toolbar:
<ReflagProvider
publishableKey=""
context={}
toolbar={true}
>On the Monitor tab, you can track real-time flag exposure, adoption, and user feedback.
The Exposed chart shows companies that have been exposed to your flag. This means they were checked for flag access against your targeting rules and the check returned enabled.
To track whether exposed companies are also interacting with your flag, use track.
See the code example below.
To get feedback from your users, you can add a static "Feedback" button or you can trigger a survey, at the right time.
Here's an example with a static feedback button.
import { useFlag } from "@reflag/react-sdk";
const MyFlag = () => {
const { isEnabled, track, requestFeedback } = useFlag("my-new-flag");
if (!isEnabled) {
return null;
}
return (
<>
<button onClick={() => track()}>Try it</button>
<button
onClick={() => requestFeedback({ title: "How do you like this new release?" })}
>
Give feedback
</button>
</>
);
}- Need some help? Chat with us
- Latest product updates? See Changelog
- Create account: Sign up



