Drafts
Drafts are local, profile-scoped, and independent for client and server templates. They let several targeted commands compose into one reviewed publication.
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. Invalid draft envelopes remain visible so they can be recovered or discarded.
Create or extend a draft
Any supported mutation can use --draft:
fbrcm update payments_enabled \
--project '=staging' \
--type boolean \
--value true \
--draft
fbrcm groups add payments \
--project '=staging' \
--description 'Payment configuration' \
--draftLater mutations compose onto the same target-specific draft.
Inspect and export
fbrcm draft show staging
fbrcm draft show staging --to candidate.json
fbrcm draft show staging --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 staging --against base
# Live preview: current Firebase → rebased candidate.
fbrcm draft diff staging --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 staging 'Prepare payments launch'
fbrcm draft change-note staging --clearThe note is stored with the draft and sent as the published Firebase version description. draft publish --change-note can override it for one invocation.
Publish
fbrcm draft publish staging
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 staging
fbrcm draft discard --allDiscarding is a local deletion. Human mode shows the base-to-draft diff before confirmation; --yes accepts the confirmation non-interactively.