Firestore Manager
Extension to easily explore and manage your Firebase Firestore database documents right inside your editor.

Features
- Activity Bar Integration: Navigate your Firestore collections and documents through a dedicated view in the Activity bar.
- Direct Editing: Open Firestore documents as JSON files. Edit them directly in the editor and save to push updates back to Firestore.
- Add & Delete: Create/Delete documents and collections directly from the tree view. Includes strict double-confirmations for deletions to prevent accidental data loss.
- Duplicate Document: Quickly clone an existing document into a new one (with custom or auto-generated ID).
- Subcollections Support: Easily navigate and manage subcollections within documents. Add new subcollections on the fly.
- Pagination: Browse large collections with ease. Customizable page size and "Load More" functionality.
- Advanced Querying: Filter documents within a collection using field-based queries (e.g.,
name == "John") and clear filters when needed.
- Refresh Support: Quickly refresh the Firestore tree to see the latest changes.
- Secure Configuration: Configurable via service account key path or environment variables.
- Custom Databases: Support for named Firestore database instances.
- Safety First: Explicit save and deletion confirmations, plus options to completely block document updates or deletions for view-only modes.
- Project and Database Context: Displays the configured project and database in the tree view.
Configuration
To use the extension, you need to provide a Firebase service account key from your Firebase project.
There are three ways to do this:
- Google Cloud Application Default Credentials (ADC): The recommended way if using the
gcloud CLI. Ensure you are logged in via gcloud auth application-default login and enable the firestoreManager.useGcloudAuth setting.
- Environment Variable: Set the
GOOGLE_APPLICATION_CREDENTIALS environment variable to the path of your JSON key. The extension will automatically use this.
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/key.json"
- VS Code Settings: Configure it through the Settings UI or
settings.json by setting firestoreManager.serviceAccountKeyPath to the path of your JSON key.
Settings
firestoreManager.useGcloudAuth: Set to true to use gcloud auth application-default login instead of a service account key.
firestoreManager.serviceAccountKeyPath: Absolute path to the service account JSON key (Only if not using useGcloudAuth or GOOGLE_APPLICATION_CREDENTIALS).
firestoreManager.projectId: The project ID for your Firebase app. When empty, it can be detected from the credentials.
firestoreManager.databaseId: The ID of the Firestore database. Defaults to (default).
firestoreManager.pageSize: Number of documents to show per page. Defaults to 10.
firestoreManager.disableSaveConfirmation: Set to true to disable the confirmation dialog when saving documents. Defaults to false.
firestoreManager.disableSecondDeletePrompt: Set to true to skip the secondary confirmation step when deleting documents or collections. Defaults to false.
firestoreManager.blockDocumentUpdate: Set to true to completely block the ability to update existing documents. Defaults to false.
firestoreManager.blockDocumentDelete: Set to true to completely block the ability to delete documents or collections. Defaults to false.
Usage
- Initialize: Run
Firestore Manager: Initialize from the Command Palette (Ctrl+Shift+P) or configure the settings directly.
- Configure credentials: Provide a service-account key path, set
GOOGLE_APPLICATION_CREDENTIALS, or enable firestoreManager.useGcloudAuth after running gcloud auth application-default login.
- Explore: Open the Firestore view in the Activity Bar. The tree displays the project, database, collections, documents, and subcollections.
- Manage documents:
- Select a document to open it as a JSON virtual file.
- Edit and save (
Ctrl+S) to write changes back to Firestore.
- Right-click a collection to add a document, delete the collection, or query its documents.
- Right-click a document to delete or duplicate it, or add a subcollection.
- Use Clear Query to remove an active collection filter.
- Use the Refresh icon in the view title to reload the tree.
- Use Load More... at the bottom of a collection to fetch another page of documents.
Querying Syntax
When using the Query Documents command, use the following format:
field operator value
Example:
isActive == true
age >= 21
name == "John"
score > 100
Supported operators: ==, !=, <, <=, >, >=, array-contains, in, not-in, array-contains-any.
Query values are parsed from the entered text. Use JSON-compatible values such as true, 21, arrays, or quoted strings where appropriate.
Compatibility
- VS Code 1.107.0 or higher
License
This project is licensed under the MIT License. See LICENSE.md for details.
Support
If you find this extension useful, consider supporting its development by buying me a coffee! Your support helps me continue improving and maintaining the extension.
