
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
firestore-cli
Advanced tools
A lightweight command-line interface for interacting with Google Firestore, Firebase, and Google Cloud APIs. Streamline document management, queries, and administrative tasks directly from your terminal. **Note** This project is currently in its infancy!
A lightweight command-line interface for interacting with Google Firestore, Firebase, and Google Cloud APIs. Streamline document management, queries, and administrative tasks directly from your terminal. Note This project is currently in its infancy! Expect things not to work or breaking changes. I am open to suggestions and feedback, thank you.
This tool requires a Service Account Key for API access. Here’s how to obtain credentials:
firestore-cli
), assign Firestore Admin
/Editor
roles.service-account.json
).gcloud
)Install the Google Cloud SDK.
Authenticate and configure:
gcloud auth login
gcloud config set project YOUR_PROJECT_ID
Create Service Account and Key:
gcloud iam service-accounts create firestore-cli \
--display-name="Firestore CLI Service Account"
gcloud projects add-iam-policy-binding YOUR_PROJECT_ID \
--member="serviceAccount:firestore-cli@YOUR_PROJECT_ID.iam.gserviceaccount.com" \
--role="roles/datastore.user"
gcloud iam service-accounts keys create service-account.json \
--iam-account=firestore-cli@YOUR_PROJECT_ID.iam.gserviceaccount.com
Set your environment variable to point to the key:
export GOOGLE_APPLICATION_CREDENTIALS="/path/to/service-account.json"
(Add this to your shell profile (e.g., .bashrc
, .zshrc
) for persistence)
npm install -g firestore-cli # Requires Node.js v16+
firestore-cli [command] [options]
Command | Description | Example |
---|---|---|
get <doc-path> | Fetch a document | firestore-cli get users/alice |
set <doc-path> | Create/update a document (JSON) | firestore-cli set products/laptop '{price: 999}' |
query <collection> | Run a Firestore query | firestore-cli query orders --where "status==='shipped'" |
delete <doc-path> | Delete a document | firestore-cli delete inventory/old-item |
export <path> | Export data to JSON | firestore-cli export backups/ --all-collections |
--project <id>
: Specify a Google Cloud project ID.--emulator
: Connect to a local Firestore emulator (default port: 8080
).--debug
: Enable verbose logging.service-account.json
to version control! Add it to .gitignore
.roles/datastore.user
instead of roles/owner
).Contribute or extend functionality:
git clone https://github.com/your-repo/firestore-cli.git
cd firestore-cli
npm install
npm link # Test locally
Need Help?
Runfirestore-cli --help
or open an issue.
Built with ❤️ by Daniel Nyong | MIT License.
FAQs
A lightweight command-line interface for interacting with Google Firestore, Firebase, and Google Cloud APIs. Streamline document management, queries, and administrative tasks directly from your terminal. **Note** This project is currently in its infancy!
We found that firestore-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.