security-io-cli
v1.0.0
Published
Interactive CLI for Security.io Library Documentation with Email Authentication
Maintainers
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
- Overview - General information about Security.io v0.1.1
- Installation Guide - Step-by-step installation instructions
- Usage Guide - How to use the library
- API Reference - Complete API documentation
- Troubleshooting - Common issues and solutions
- FAQ - Frequently asked questions
🚀 Quick Start
Prerequisites
- Node.js (v12 or higher)
- npm or yarn
- Internet connection (for email verification)
Installation
Clone or navigate to the project directory:
cd c:\Users\LENOVO\weather_to_gsheetsInstall dependencies:
npm installMake the script executable (Linux/Mac):
chmod +x index.js
Running the Application
npm startor
node index.js🔐 Email Authentication Flow
Enter Your Email
- Application prompts for your email address
- Email format is validated
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
Enter Token
- Copy the token from the email
- Paste it in the terminal prompt
- Maximum 5 attempts allowed
- Token expires after 10 minutes
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
➜ 🚪 ExitUse 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:
- Email: [email protected]
- Password: nucm mizw szlu oloq (Gmail App Password)
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 installEmail 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
- Email: [email protected]
🙏 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
