Extension to easily explore and manage your Firebase Firestore database documents right inside your editor.
- 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"). - 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: Overwrite protection warnings, explicit save confirmations, and options to completely block document updates or deletions for view-only modes.
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
gcloudCLI. Ensure you are logged in viagcloud auth application-default loginand enable thefirestoreManager.useGcloudAuthsetting. - Environment Variable: Set the
GOOGLE_APPLICATION_CREDENTIALSenvironment 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/Antigravity Settings: Configure it via settings (UI or
settings.json) setfirestoreManager.serviceAccountKeyPathto the path of your JSON key.
firestoreManager.useGcloudAuth: Set totrueto usegcloud auth application-default logininstead of a service account key.firestoreManager.serviceAccountKeyPath: Absolute path to the service account JSON key (Only if not usinguseGcloudAuthorGOOGLE_APPLICATION_CREDENTIALS).firestoreManager.projectId: The project ID for your Firebase app (usually auto-detected from the key or ADC).firestoreManager.databaseId: The ID of the Firestore database. Defaults to(default).firestoreManager.pageSize: Number of documents to show per page. Defaults to10.firestoreManager.disableSaveConfirmation: Set totrueto disable the confirmation dialog when saving documents. Defaults tofalse.firestoreManager.disableSecondDeletePrompt: Set totrueto skip the secondary confirmation step when deleting documents or collections. Defaults tofalse.firestoreManager.blockDocumentUpdate: Set totrueto completely block the ability to update existing documents. Defaults tofalse.firestoreManager.blockDocumentDelete: Set totrueto completely block the ability to delete documents or collections. Defaults tofalse.
- Initialize: Run the
Firestore Manager: Initializecommand from the Command Palette (Ctrl+Shift+P). - Setup: Provide the path to your Service Account JSON if not already set via environment variables.
- Explore: Open the Firestore panel in the Activity Bar to see your collections.
- Manage Documents:
- Click a document to open it as JSON.
- Edit and Save (
Ctrl+S) to update the document in Firestore. - Right-click a collection to Add Document, Delete Collection, or Query Documents.
- Right-click a document to Delete Document, Duplicate Document, or Add Collection (subcollection).
- Use the Refresh icon in the view title to reload the tree.
- Use Load More... at the bottom of a collection list to fetch more documents.
When using the Query Documents command, use the following format:
field operator value
Example:
isActive == trueage >= 21name == "John"score > 100
Supported operators: ==, !=, <, <=, >, >=, array-contains, in, not-in, array-contains-any.
- VS Code 1.107.0 or higher
- Antigravity Version: 1.20.6 or higher
This project is licensed under the MIT License - see the LICENSE.md file for details.
