> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fujiflag.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fujiflag.com/_mcp/server.

# Quickstart

> Create a feature flag and read it from a JavaScript application.

# Quickstart

This guide creates a boolean flag, assigns it a production value, and evaluates
it in a JavaScript application.

## What you'll do

Create the smallest safe release control: a flag named `new-checkout` that is
off in production until your team is ready to enable it.

## When to use this guide

Use this guide when every user in an environment should receive the same value.
For rules based on user or request attributes, use the targeting guide once it
is available. For stable control/treatment variants, use an experiment instead.

## Before you begin

You need access to the FujiFlag dashboard and an application that can install
npm packages. Use a demo project or a non-production environment while learning.

## 1. Create a project and environment

In the FujiFlag dashboard, create a project for your application. Add the
environments where it runs, such as `development`, `staging`, and `production`.

## 2. Create a feature flag

Create a boolean flag with a clear, stable key such as `new-checkout`. Set its
value for each environment. Start with `false` in production until you are ready
to release the feature.

## 3. Create a read API key

Open the environment's API-key settings and create a read key. Client-side SDKs
use keys beginning with `ff-pk-`.

Treat API keys as environment-specific. Do not place a production key in source
control or reuse it outside its intended environment.

## 4. Install the JavaScript SDK

```bash
npm install @fujiflag/js
```

## 5. Evaluate the flag

```ts
import { createFujiFlagClient } from "@fujiflag/js";

const client = createFujiFlagClient({
  apiKey: "ff-pk-your-api-key-here",
  baseURL: "https://api.fujiflag.com",
});

const enabled = await client.getFlagValue<boolean>("new-checkout");

if (enabled) {
  // Render the new checkout experience.
}
```

## Verify the result

With the flag set to `false` in the selected environment, `enabled` should be
`false`. Change the environment value to `true`, then evaluate it again to
confirm your application receives the new value.

## Next steps

* Learn the [core concepts](/get-started/concepts).
* Add FujiFlag to a React application with the [React SDK](/sdks/react).
* Review [API-key guidance](/manage/api-keys) before going to production.