npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

fireshell

v1.2.0

Published

A shell for firebase realtime database and cloud firestore

Downloads

5

Readme

Fireshell

A shell for firebase realtime database and cloud firestore.

Fireshell is a CLI tool which can be used to execute realtime database and cloud firestore queries in your terminal.

Travis (.org) Codecov GitHub GitHub package.json version GitHub closed pull requests

Changelog v1.2.0

Release Highlights

  • Added commands for setting and resetting config file.
  • Added command for running multiple queries at once by taking input from a file.

Installation

To install fireshell, simply pull up your terminal and run the following command :-

npm install -g fireshell

NOTE: You need to have Node.js and Node Package Manager installed in order to install fireshell.

Running the shell

Connecting the shell with the database

To start the shell, simply run fireshell in your terminal. You will be prompted a few questions. These questions will be prompted the only the first you run the shell or when you reset the shell. The answers provided for these questions will be used for creating a config.json file.

First you'll have to choose the service you want to connect with :-

Then you have to provide the absolute path to your firebase config file. It has to be a JSON file that you get from firebase to connect your application with your firebase project.

Important Note:- Please make sure that the firebase config file has a key called "projectId". This key is very important in order to authenticate. If your config file has a key called "project_id", rename it to "projectId".

The last prompt will ask you to enter the reltime database url. If you chose firestore in the 1st prompt, then your can ignore this question. Otherwise, enter the url.

Note:- In versions >= 1.1.0 these prompts will be asked only once. After that, the shell will connect automatically using previously provided parameters.

Writing Queries

Your queries must start with the keyword db. This db is a variable that stores reference to the database object. You can chain the rest of your query as you normally do.

For realtime database, make sure that you end any read query or any query that returns some data with the once method and pass value as its argument.

Examples of realtime database queries

// Create operation
> db.ref().child('user').set({name: "Iron Man", "alter-ego": "Tony Stark"})
// Read operation
> db.ref().child('user').once('value')
// Update operation
> db.ref().child('user').update({name: "Batman", "alter-ego": "Bruce Wayne"})
// Delete operation
> db.ref().child('user').remove()

Examples of cloud firestore queries

// Create operation
> db.collection('user').add({name: "Spiderman", "alter-ego": "Peter Parker"})
// Read operation
> db.collection('user').get()
// Update operation
> db.collection('user').doc('some-id').update({name: "Flash", "alter-ego": "Barry Allen"})
// Delete operation
> db.collection('user').doc('some-id').delete()

For more help, check out Cloud Firestore and Realtime Database docs.

Running the CLI commands

There are 3 CLI commands that you can run :-

  1. set-config :- Used to set the config parameters.
fireshell set-config <absolute path to firebase config file> <database type> 

This command requires you to pass 2 additional arguments - absolute path to the firebase config json file and the database type. Database type will only take 'database' or 'firestore'. Additionally, if you are using realtime database, you need to pass the realtime database url as another optional argument as follows:-

fireshell set-config <absolute path to firebase config file> <database type> -u <realtime database url>
  1. reset :- Used to reset the config file.
fireshell reset

When you run this command, the previously provided config is deleted and you need to provide the config parameters again.

  1. firerun :- Used to run multiple database queries from a file and return output in a file.
fireshell firerun <input filepath> <output filepath>

You have to pass the path to input file and path to output file as arguments. Refer sample.txt to understand how to format the input file.

Contributors

Made with contributors-img.

License

MIT License @ Aayush Kurup