firebase-remote-config
Provides atomic operations for managing Firebase Remote Config templates (including client and server namespaces) using REST API, CLI, or scripts. Supports fetch, list keys, create/update parameters & conditions, merge, validate, publish, rollback, import/export JSON, percent rollouts, deletion, diff, and recommended condition generation.
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Firebase Remote Config Skill
This skill exposes atomic operations for Firebase Remote Config templates based on the official API. Use an access token with appropriate IAM role (cloudconfig.admin) to make changes.
Inputs
| Input | Description |
|---|---|
project_id |
Firebase project ID |
namespace |
Template namespace (firebase for client, firebase-server for server) |
access_token |
OAuth2 Bearer token with remoteconfig scope (use gcloud auth application-default print-access-token) |
template_file |
Local path for export/import |
parameter_key |
Feature flag/parameter identifier |
parameter_values |
JSON of default + conditional values |
condition_name |
Name of a condition |
condition_expr |
Expression logic for condition |
version_number |
Template version number to rollback |
percent |
Rollout percentage |
base_template |
Local path (diff base) |
new_template |
Local path (diff new) |
etag |
Latest ETag from fetch for safe publish |
OPERATIONS
Fetch Current Template
Retrieve the active Remote Config template for a namespace.
Shell (curl)
bash scripts/fetch-template.sh \
"{access_token}" "{project_id}" "{namespace}" "{output_file}"
List Parameters & Conditions
List keys in template.json:
Shell
bash scripts/list-keys.sh template.json
Create / Update Parameters
Modify template JSON locally using jq, then merge.
Create / Update Conditions
Modify template JSON locally using jq, then merge.
Merge Template JSON
Use Node script to merge changes safely.
node scripts/merge-template.js \
--base="{base_template}" \
--updates="{updates_file}" \
--out="{output_file}"
Validate Template
Validation is implicit on publish; external orchestrator should ensure JSON correctness.
Validate JSON before publishing:
jq '.' template.json > /dev/null && echo "Valid" || echo "Invalid"
Publish Template
Replace the template using PUT.
Important: Remove version field before publishing (Firebase auto-generates it).
# Prepare template (remove version)
jq 'del(.version)' template.json > template-publish.json
# Publish using script (etag="*" for force update)
bash scripts/publish-template.sh \
"{access_token}" "{project_id}" "{namespace}" "*" "template-publish.json"
Note: Using etag="*" forces an update. Firebase Remote Config API doesn't return ETag in headers, so force update is the standard approach.
Rollback Template
Rollback to a previous version.
bash scripts/rollback-template.sh \
"{access_token}" "{project_id}" "{namespace}" "{version_number}"
Import / Export JSON
Export: fetch template to file Import: publish from file
Generate Percentage Rollout Condition
Create a conditional expression with percentage logic.
bash scripts/generate-percent-condition.sh "{condition_name}" "{percent}"
Delete Parameter
Remove parameter from template JSON then publish.
bash scripts/delete-parameter.sh "{template_file}" "{parameter_key}" "{output_file}"
Diff Templates
Show diff between two template files.
bash scripts/diff-templates.sh "{base_template}" "{new_template}"
Generate Recommended Conditions
Given a feature metadata object, produce a set of environment conditions.
Notes
- Namespace parameter added for REST calls so client/server templates can be managed separately.
- All operations are stateless and accept full inputs for each call.
- No built-in workflow sequencing — external planner must orchestrate calls.
- Scripts provided for shell/curl and Node merge logic.
- Progressive disclosure: agents can load scripts or reference docs only when needed.
Supporting References
- API-reference-summary.md - REST API endpoints and schemas
- example-feature-metadata-schema.json - Example feature metadata
- Remote Config Conditional Expression Reference - Canonical syntax for condition expressions. https://firebase.google.com/docs/remote-config/condition-reference
- RemoteConfig REST API - Template schema and fields. https://firebase.google.com/docs/reference/remote-config/rest/v1/RemoteConfig
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-01-20
- 索引更新时间
- 2026-01-26
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!