> For the complete documentation index, see [llms.txt](https://docs.reflag.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.reflag.com/integrations/cursor.md).

# Cursor

### Rule

Create a Project Rule called `.cursor/rules/featureflags.md`. Here's a template you can use:

```markdown
We use Reflag (https://reflag.com) for feature flagging and feature management.

Reflag's documentation is located at https://docs.reflag.com
You can create feature flags using the CLI (@reflag/cli).

If installed, you can use the the Reflag MCP to create flags.
Alternatively, try this command to use the Reflag CLI: npx reflag new
```

### Slash Command

Create a slash command called `.cursor/commands/flag.md` Here's a template you can use:

```
Feature flag the changes

1. Create a feature flag with Reflag with an appropriate name
2. Update the code to ensure changes are flagged

The Reflag documentation is located at https://docs.reflag.com
If installed, use the CLI to create a feature flag using the command: npx reflag new
If the Reflag MCP is installed, you can create a flag through the Reflag MCP
```

### MCP

See [MCP](/api/mcp.md) page for Cursor instructions


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reflag.com/integrations/cursor.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
