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

security-io-cli

v1.0.0

Published

Interactive CLI for Security.io Library Documentation with Email Authentication

Readme

Security.io Documentation CLI

A complete interactive terminal application with email authentication, ASCII art animations, colored boxes, spinners, and a menu-driven interface for accessing Security.io library documentation.

✨ Features

  • 🎨 ASCII Art Animations - Figlet-based welcome banners with gradient effects
  • 📧 Email Authentication - Secure email verification with random token generation
  • 🎁 Interactive Menus - Inquirer-based menu selection with styled choices
  • 💫 Spinners & Loaders - Ora spinners for smooth loading animations
  • 📦 Styled Boxes - Boxen-based decorative borders and containers
  • 🌈 Colored Text - Chalk-based syntax highlighting and color coding
  • 📚 Complete Documentation - 6 comprehensive sections about Security.io
  • Token Expiration - 10-minute token expiration for security

📋 Documentation Sections

  1. Overview - General information about Security.io v0.1.1
  2. Installation Guide - Step-by-step installation instructions
  3. Usage Guide - How to use the library
  4. API Reference - Complete API documentation
  5. Troubleshooting - Common issues and solutions
  6. FAQ - Frequently asked questions

🚀 Quick Start

Prerequisites

  • Node.js (v12 or higher)
  • npm or yarn
  • Internet connection (for email verification)

Installation

  1. Clone or navigate to the project directory:

    cd c:\Users\LENOVO\weather_to_gsheets
  2. Install dependencies:

    npm install
  3. Make the script executable (Linux/Mac):

    chmod +x index.js

Running the Application

npm start

or

node index.js

🔐 Email Authentication Flow

  1. Enter Your Email

    • Application prompts for your email address
    • Email format is validated
  2. Receive Verification Token

    • A random 6-character token is generated
    • Token is sent to your email inbox via Gmail SMTP
    • Email contains the token in a formatted HTML message
  3. Enter Token

    • Copy the token from the email
    • Paste it in the terminal prompt
    • Maximum 5 attempts allowed
    • Token expires after 10 minutes
  4. Access Documentation

    • After verification, full access to documentation menu
    • Browse all 6 documentation sections
    • Interactive menu navigation

🎮 Usage

Main Menu Navigation

After authentication, you'll see the main menu with options:

➜ 📖 Overview
➜ 💾 Installation Guide
➜ 🚀 Usage Guide
➜ 🔧 API Reference
➜ 🔍 Troubleshooting
➜ ❓ FAQ
➜ 🚪 Exit

Use arrow keys to navigate and Enter to select.

Viewing Documentation

  • Select any section to view full documentation
  • Content is color-coded for readability
  • Press Enter to return to main menu
  • Repeat as needed

Exiting

Select "🚪 Exit" to close the application with a goodbye message.

📦 Dependencies

  • chalk (^4.1.2) - Terminal color and styling
  • ora (^5.4.1) - Elegant terminal spinners
  • boxen (^5.1.2) - Terminal box drawing
  • figlet (^1.6.0) - ASCII art text generation
  • inquirer (^8.2.5) - Interactive command line prompts
  • nodemailer (^6.9.7) - Email sending functionality
  • cli-table3 (^0.6.3) - Terminal table formatting

🔧 Configuration

Email credentials are embedded in the application:

To change email credentials, edit the EMAIL_CONFIG object in index.js:

const EMAIL_CONFIG = {
  service: "gmail",
  auth: {
    user: "[email protected]",
    pass: "your-app-password",
  },
};

🚨 Security Notes

  • The app uses Gmail SMTP with App Passwords (recommended)
  • Tokens expire after 10 minutes
  • Maximum 5 verification attempts per session
  • Email addresses are validated before sending tokens
  • All credentials should be stored securely in production

🐛 Troubleshooting

"Cannot find module" Error

npm install

Email Not Sending

  • Verify Gmail App Password is correct
  • Enable "Less secure app access" if using regular password
  • Check internet connection
  • Review error message in terminal

Invalid Email Format

  • Ensure email follows format: [email protected]
  • No spaces or special characters in email address

Token Expired

  • New token expires after 10 minutes
  • Request a new token by restarting the app

Too Many Failed Attempts

  • Maximum 5 attempts per session
  • Restart the application to retry

📝 File Structure

weather_to_gsheets/
├── index.js              # Main application file
├── package.json          # Dependencies and metadata
└── README.md            # This file

🎯 Features in Detail

ASCII Art Welcome Banner

  • Figlet-based "Welcome To" text
  • "Louati Mahdi" personalized greeting
  • Gradient effect using chalk colors

Email Verification

  • Validates email format with regex
  • Generates cryptographically secure 6-character token
  • Sends HTML-formatted email via nodemailer
  • Tracks token with timestamp for expiration

Interactive Menu

  • Inquirer.js for beautiful prompt styling
  • List-based selection with arrow keys
  • Color-coded menu options
  • Smooth transitions between screens

Documentation Display

  • Syntax highlighting based on content type
  • Color-coded sections (commands, issues, solutions)
  • Bordered sections with custom styling
  • Press Enter to navigate back to menu

Loading Animations

  • Ora spinners for async operations
  • Smooth transitions
  • Success/failure indicators

🤝 Contributing

For contributions or bug reports, please contact the developer.

📄 License

MIT License - Feel free to use and modify as needed.

👤 Author

Louati Mahdi

🙏 Support

For issues or questions about the Security.io library, refer to the documentation sections within the CLI or contact the library provider.


Version: 1.0.0
Last Updated: December 2024
Status: Production Ready