# ext:configure changes the params for an extension instance in your extensions manifest
$firebaseext:configuremy-bigquery-extension--local
# ext:update --local updates an instance in your extensions manifest# to the latest version of that extension
$firebaseext:updatemy-bigquery-extension--local
# You can also specify a version if you don't want to update to the latest version
$firebaseext:updatemy-bigquery-extensionfirebase/firestore-bigquery-export@0.1.10--local# ext:uninstall --local removes an instance from your extensions manifest
$firebaseext:uninstallmy-bigquery-extension--local
如需运行 Emulator Suite 并执行测试脚本,请运行以下命令:firebase emulators:exec my-test.sh
现在,如果您的清单中列出了扩展程序实例,则 Local Emulator Suite 会将这些扩展程序的源代码下载到 ~/.cache/firebase/extensions。下载完成后,系统将启动 Local Emulator Suite,然后您将能够触发扩展程序的任何后台触发函数,并将您的应用连接到 Emulator Suite 以测试这些函数与应用的集成。
[null,null,["最后更新时间 (UTC):2025-08-13。"],[],[],null,["\u003cbr /\u003e\n\nAn *extensions manifest* is a list of extension instances and their\nconfigurations. With the manifest, you can:\n\n- Share your extensions configuration with others\n- Copy your extensions configuration between different projects (such as from your staging project to your production project)\n- Deploy all your extensions at once\n- Test how your extensions work with your app using the Firebase Local Emulator Suite\n- Commit your extensions configuration to source control\n- Include extensions in your CI/CD pipeline\n\nAn extensions manifest has two parts:\n\n- The `extensions` section of your `firebase.json`, which is a map of instance\n ID to extension version reference. For example:\n\n {\n \"extensions\": {\n \"my-bigquery-extension\": \"firebase/firestore-bigquery-export@^0.1.18\",\n \"my-image-resizer\": \"firebase/storage-resize-images@^0.1.22\",\n }\n }\n\n- `.env` files containing the configuration for each of your extension\n instances, in the `extensions/` subdirectory of your Firebase project\n directory. For example, an instance of the `storage-resize-images` might have\n an `.env` file like the following:\n\n ```\n IMAGE_TYPE=jpeg\n LOCATION=us-central1\n IMG_BUCKET=${param:PROJECT_ID}.firebasestorage.app\n IMG_SIZES=100x100\n DELETE_ORIGINAL_FILE=false\n ```\n\n\u003cbr /\u003e\n\n| If you don't want to save configuration data for every extension instance, you can edit the `firebase.json` file and remove the unneeded entries from the `extensions` section.\n\n\u003cbr /\u003e\n\nCreate an extensions manifest\n\nThere are three ways to build an extensions manifest:\n\n- Manage your extensions manifest with the Firebase CLI\n- Export a project's extensions configuration\n- Edit the manifest files manually\n\nThe first two methods are explained below.\n\nManage your extensions manifest with the Firebase CLI\n\nYou can run most of the Firebase CLI's `ext:` commands with the `--local` option\nto update the extensions manifest without actually changing the project's\ncurrent configuration.\n\nFor example: \n\n```\nfirebase ext:install --local firebase/firestore-bigquery-export\n```\n\nRunning the above command will prompt you to configure the latest version of\n`firebase/firestore-bigquery-export` extension and save the configuration to\nthe manifest, but it won't deploy the configuration to your project.\n\nHere are some more examples of commands that modify the extensions manifest: \n\n # ext:configure changes the params for an extension instance in your extensions manifest\n $ firebase ext:configure my-bigquery-extension --local\n\n # ext:update --local updates an instance in your extensions manifest\n # to the latest version of that extension\n $ firebase ext:update my-bigquery-extension --local\n\n # You can also specify a version if you don't want to update to the latest version\n $ firebase ext:update my-bigquery-extension firebase/firestore-bigquery-export@0.1.10 --local \n\n # ext:uninstall --local removes an instance from your extensions manifest\n $ firebase ext:uninstall my-bigquery-extension --local\n\nExport a project's extensions configuration\n\nTo save a project's current extensions configuration to the manifest, do the\nfollowing:\n\n1. If you haven't already done so, [set up the Firebase CLI](/docs/cli#setup_update_cli)\n2. From a shell prompt, change to the project directory. (Your project directory contains the file `firebase.json`).\n3. Run the `ext:export` command: \n\n ```\n firebase ext:export\n ```\n\nThe `ext:export` command will add an `extensions` section to the `firebase.json`\nfile. Additionally, the `ext:export` command creates an `extensions` directory\ncontaining an `.env` file for each extension instance you've installed. These\nfiles contain the configuration parameters for each instance.\n\nTest an extensions configuration with the Firebase Local Emulator Suite\n\nOnce you've added some extension instances to your extensions manifest, you can\ntest them out using the Local Emulator Suite.\n\n1. [Install and configure the Local Emulator Suite](/docs/emulator-suite/install_and_configure).\n\n2. [Start the Local Emulator Suite](/docs/emulator-suite/install_and_configure#startup):\n\n - To run the Emulator Suite interactively, run: `firebase emulators:start`\n - To run the Emulator Suite and execute a test script, run: `firebase emulators:exec my-test.sh`\n\nNow, if you have extension instances listed in your manifest, the\nLocal Emulator Suite will download the source code of those extensions to\n`~/.cache/firebase/extensions`. Once they have been downloaded, the\nLocal Emulator Suite will start and you'll be able to trigger any of the\nextensions' background triggered functions and connect your app to the Emulator\nsuite to test their integration with your app.\n\n\u003cbr /\u003e\n\n| Emulated extension instances can potentially make live calls to third party APIs and unemulated Google APIs. Review each extension's post-install instructions before testing to make sure you are aware of any external calls it makes.\n\n\u003cbr /\u003e\n\nDeploy an extensions configuration to a project\n\nOnce you've added some extension instances to your extension manifest, you can\ndeploy it to a project using the Firebase CLI. When you deploy with an\nextensions manifest, you install, update, and configure all the extension\ninstances in the manifest into a project at once.\n\nTo deploy an extensions manifest:\n\n1. From a shell prompt, change to the directory that contains the saved extensions configuration. (This is the directory that contains `firebase.json`. If you just ran `ext:export`, you're already in the right directory.)\n2. Run the `deploy` command. If you want to deploy the extensions to a project other than the current one, also specify `--project=`: \n\n ```\n firebase deploy --only extensions –-project=YOUR_PROJECT_ID\n ```\n\nThe `deploy` command will validate each instance configuration, ask if you want\nto delete any extension instances from your destination project that are not\nlisted in `firebase.json`, and then deploy all of your extension instances.\n\nProject-specific extension configurations\n\nSaved extensions configurations can be used to deploy to multiple different\nprojects: for example, a staging project and a production project. When doing\nthis, some parameter values may need to be different for each project.\nProject-specific `.env` files make this possible:\n\n- Put parameter values that differ between projects in `extensions/`\u003cvar translate=\"no\"\u003eEXTENSION_INSTANCE_ID\u003c/var\u003e`.env.`\u003cvar translate=\"no\"\u003eYOUR_PROJECT_ID\u003c/var\u003e\n- Put shared parameter values in `extensions/`\u003cvar translate=\"no\"\u003eEXTENSION_INSTANCE_ID\u003c/var\u003e`.env`.\n\nSometimes, you may want to use a different parameter value when emulating your\nextensions: for example, you may want to provide a test API key instead of a\nproduction one. Put these parameters in a `.local` file:\n\n- Put non-secret parameters you want to use during emulation in `extensions/`\u003cvar translate=\"no\"\u003eEXTENSION_INSTANCE_ID\u003c/var\u003e`.env.local`\n- Put secret parameter values in `extensions/`\u003cvar translate=\"no\"\u003eEXTENSION_INSTANCE_ID\u003c/var\u003e`.secret.local`"]]