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 🙏

© 2026 – Pkg Stats / Ryan Hefner

shell-sage

v2.3.6

Published

![Node.js](https://img.shields.io/badge/Node.js-18%2B-green?logo=node.js) ![JavaScript](https://img.shields.io/badge/JavaScript-ES6%2B-yellow?logo=javascript) ![Gemini API](https://img.shields.io/badge/Gemini-API-blue?logo=google)

Downloads

52

Readme

shell-sage

Node.js JavaScript Gemini API

A minimalistic terminal chatbot for interacting with Google's Gemini 2.0 Flash API. This CLI tool allows you to query the Gemini API using your API key, which is stored persistently on your system.

Features

  • Interactive Chat: Ask your questions and receive responses directly in your terminal.
  • Persistent API Key Storage: Your Gemini API key is saved in a hidden file in your home directory (.gemini_api_key), so you don’t need to re-enter it every time.
  • Modern UI: Enjoy a colorful, gradient ASCII banner and helpful prompts using figlet and chalk.
  • Real-time API Calls: Interact with the Gemini 2.0 Flash API using axios.
  • Command Line Flags: Includes helpful commands like --help, --version, --model, --remove-api, and --update.
  • Automatic Updates: Easily update to the latest version with shell-sage --update.

Installation

Install via npm:

npm install -g shell-sage

This will install shell-sage globally, allowing you to run it from anywhere in your terminal.

Or Clone the repository manually:

git clone https://github.com/yourusername/shell-sage.git
cd shell-sage
npm install

Usage

Run the CLI with:

shell-sage

On the first run, you'll be prompted to enter your Gemini API key. The key will be saved persistently in a hidden file in your home directory. Once stored, the CLI will load the key automatically on subsequent runs.

Available Commands:

shell-sage --help       # Show available commands
shell-sage --version    # Show current version
shell-sage --model      # Show the current model (default: gemini-2.0-flash)
shell-sage --remove-api # Remove the stored API key
shell-sage --update     # Update shell-sage to the latest version

Interactive Chat Mode:

Simply run shell-sage and type your queries when prompted. To exit, type exit.

API Integration

This CLI interacts with the Gemini API using the following endpoint:

https://generativelanguage.googleapis.com/v1/models/gemini-2.0-flash:generateContent?key=YOUR_API_KEY

The API expects a JSON payload structured like this:

{
  "contents": [
    {
      "parts": [
        { "text": "Your query goes here" }
      ]
    }
  ]
}

The API key is dynamically inserted into the URL at runtime.

Acknowledgements

This project is built using:

License

This project is licensed under the MIT License.