Skip to content

cf dev --help lists --local and --persist-to, which cf dev rejects #834

Backlog

Description

@MattieTK

Summary

cf dev --help lists --local and --persist-to under Global flags, even though cf dev explicitly rejects both flags (following #22).

Reproduction

Run with cf@1.0.0-rc.4:

cf dev --help

Output includes:

Global flags
      --local       Use local resource simulations    [boolean] [default: false]
      --persist-to  Directory holding local persisted state (default:
                    .cloudflare/state next to cloudflare.config.ts)     [string]

Running either flag fails:

$ cf dev --persist-to ./local-state --dry-run
Error: --persist-to is not supported by cf dev.

$ cf dev --local --dry-run
Error: --local is not supported by cf dev.

Expected behaviour

Either omit --local and --persist-to from --help on commands that reject them (cf dev), or note in the --persist-to help description that it only applies with --local data commands and is not supported by cf dev.

Activity

  1. added this to the cf GA milestone on Dec 1, 2026
  2. darrellchee commented on Dec 2, 2026

    @darrellchee

    I have a fix for this on my fork: main...darrellchee:cf:fix/issue-834

    It hides --local and --persist-to in the cf dev builder, the same way cf workers triggers deploy and cf workers versions create already do, and adds "Local simulation (--local) is not supported by this command." to the cf dev help. The runtime rejection is unchanged. It includes a test in local-flags.test.ts and a patch changeset (3 files, +37/-2).

    I saw that PRs need a vouch during the RC phase. If you want this change, could a maintainer vouch for darrellchee so I can open the PR?

    Before and after (cf dev --help):

    compare.mp4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions