Drafts
A draft stores unpublished edits in the active profile. Client and server templates have separate drafts. Later mutation commands add their edits to the same target's draft.
Examples use example-project-id as a physical Firebase project ID.
List drafts
fbrcm draft list
fbrcm draft list --filter '^prod'The list includes the canonical target, base version, update time, change counts, status, and optional change note. fbrcm keeps invalid draft envelopes visible so you can recover or discard them.
Create or extend a draft
Any supported mutation can use --draft:
fbrcm update payments_enabled \
--project '=example-project-id' \
--type boolean \
--value true \
--draft
fbrcm groups add payments \
--project '=example-project-id' \
--description 'Payment configuration' \
--draftLater mutations compose onto the same target-specific draft.
Inspect and export
fbrcm draft show example-project-id
fbrcm draft show example-project-id --to candidate.json
fbrcm draft show example-project-id --raw --to draft-envelope.jsonNormal output is the validated working Remote Config candidate. --raw emits the stored envelope including its immutable base and can recover content even when normal draft decoding fails.
Review changes
# Purely local: base → stored draft.
fbrcm draft diff example-project-id --against base
# Live preview: current Firebase → rebased candidate.
fbrcm draft diff example-project-id --against currentAdd parameter, group, expression, or search filters to focus a large diff. A diff command returns status 1 when the filtered result contains differences and status 0 when it does not.
Set the Firebase change note
fbrcm draft change-note example-project-id 'Prepare payments launch'
fbrcm draft change-note example-project-id --clearfbrcm stores the note with the draft and sends it as the published Firebase version description. draft publish --change-note can override it for one invocation.
Publish
fbrcm draft publish example-project-id
fbrcm draft publish --all --dry-runPublication fetches current state, merges local intent, displays the effective candidate, validates with Firebase, and publishes with ETag protection. Conflicts preserve the draft. Batch operations continue after independent target failures and report every outcome.
Discard
fbrcm draft discard example-project-id
fbrcm draft discard --allDiscarding is a local deletion. Human mode shows the base-to-draft diff before confirmation; --yes accepts the confirmation non-interactively.
When the draft is ready for an approval or execution handoff, create an exact publication plan with draft publish --plan-out <path>.