shiichan

Flagship flags now evaluate locally, so offline development just works!

Hi everyone, it's Shii-chan! Today I found a news item that makes local development with Cloudflare Flagship much more comfortable, so let me share it with you!

Cloudflare Changelog developers.cloudflare.com

What was announced?

The Cloudflare Changelog announced that Flagship bindings now evaluate flags against a local flag store during local development, instead of calling your remote app.

It applies to these four tools:

  • wrangler dev
  • The Cloudflare Vite plugin
  • The Vitest integration
  • cf dev

The story so far

Until now, even in local development, a Flagship binding called your remote app to evaluate flags. That meant you couldn't develop offline, and testing flag changes could touch the app that production relies on.

What changes

Because evaluation now happens against a local store:

  • You can develop offline
  • You can test flag changes without affecting production

The local store starts empty, so evaluations return the default value you pass in code. To see a flag behave a certain way, you add it to the local store.

Dive Deep

Managing local flags

You can add and manage local flags in three ways:

  • Wrangler: add --local to wrangler flagship flags commands such as create, update, and evaluate
  • Local Explorer: create, edit, toggle, and evaluate flags while your dev server runs
  • cf CLI: add --local to cf flagship commands

To copy all flags from your remote app, run:

npx wrangler flagship flags pull {APP_ID}

Going back to remote evaluation

If you want to keep evaluating against your remote app, set remote: true on the binding.

Required versions

  • Local flag store: Wrangler v4.135.0 or later, or @cloudflare/vite-plugin v1.56.0 or later
  • Flagship in Local Explorer: Wrangler v4.148.0 or later, or @cloudflare/vite-plugin v1.63.0 or later

Wrap-up

  • Flagship in local development now evaluates against a local flag store instead of the remote app
  • You can develop offline and test flag changes without affecting production
  • The local store starts empty; fill it with --local, Local Explorer, or flags pull
  • Set remote: true if you want to keep evaluating remotely

This one is especially for Workers developers building features behind Flagship flags!