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

shellmancer

v2.1.4

Published

A simple AI based CLI helper tool

Readme

shellmancer

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 questions and receive responses directly in your terminal.
Persistent API Key Storage – The Gemini API key is stored in ~/.shell-sage-config.json, so you don't have to re-enter it.
Modern UI – Features a colorful ASCII banner and stylish prompts using figlet and chalk.
Real-time API Calls – Uses axios for seamless communication with Gemini 2.0 Flash.
Command Line Flags – Includes useful commands:

  • --help → Show available commands
  • --version → Show the current version
  • --model → Display the current Gemini model
  • --remove-api → Remove the stored API key
  • --update → Update shellmancer to the latest version

🛠️ New Basic Commands:

| Command | Description | |---------|------------| | shellmancer explain "<shell command>" | Get a beginner-friendly explanation of a shell command | | shellmancer generate-script "<description>" | Generate a bash/zsh script based on a description | | shellmancer system-info | Display system information (OS, CPU, Memory, etc.) | | shellmancer set-model <model> | Set the default Gemini model (gemini-2.0-flash, gemini-2.0-pro) |

📥 Installation

Install via npm:

npm install -g shellmancer

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

Or Clone the Repository Manually:

git clone https://github.com/yourusername/shellmancer.git
cd shellmancer
npm install

📌 Usage

🔹 Run the CLI

shellmancer

On the first run, you'll be prompted to enter your Gemini API key. The key is stored persistently in a hidden config file (~/.shell-sage-config.json) and automatically loaded on future runs.

🔹 Available Commands

shellmancer --help       # Show available commands
shellmancer --version    # Show current version
shellmancer --model      # Show the current Gemini model
shellmancer --remove-api # Remove the stored API key
shellmancer --update     # Update shellmancer to the latest version

🔹 Basic Commands

shellmancer explain "<shell command>"       
# Get an explanation of a shell command

shellmancer generate-script "<description>"  
# Generate a bash/zsh script

shellmancer system-info                     
# Display system information

shellmancer set-model <model>               
# Change the Gemini model (e.g., gemini-2.0-flash, gemini-2.0-pro)

🔹 Interactive Chat Mode

Run shellmancer without any arguments and type 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

Built using:

this project was created before gemini-cli was announced.