UNPKG

ruleset-id-extractor

Version:

CLI tool to extract and convert Jumio ruleset IDs and names to CSV

125 lines (84 loc) โ€ข 2.46 kB
# Jumio Ruleset ID Extractor **Jumio Ruleset ID Extractor** is an interactive and lightweight CLI tool that converts Jumio ruleset JSON files into well-structured CSV files โ€” perfect for audits, reviews, and analysis. --- ## ๐Ÿš€ Quick Start (No Installation Needed) You can run the tool instantly using `npx`: ```bash npx jumio-extractor ``` --- ## ๐Ÿ“ฆ Installation (Optional) If you prefer to install it globally: ```bash npm install -g jumio-ruleset-extractor ``` Then run it from anywhere: ```bash jumio-extractor ``` --- ## ๐Ÿ›  How It Works When you run the tool, you'll be prompted with two simple questions: 1. **How do you want to provide your ruleset JSON?** - **Upload from file**: Drag & drop the `.json` file into the terminal, or manually type the full file path. - **Paste JSON directly**: Paste raw JSON content into the prompt (validated before processing). 2. **Output File Name** - Provide the name for your output file (e.g., `name-rules-v4`) - A `.csv` file will be generated in your current working directory --- ## ๐Ÿ“ Example Input JSON ```json { "rules": [ { "id": "12345", "name": "ID Match", "description": "Checks if ID matches the provided data." }, { "id": "67890", "name": "DOB Check", "description": "Verifies if Date of Birth matches." } ] } ``` --- ## ๐Ÿ“ค Output CSV ```csv Order Serial,Rule Name,Rule ID,Description 1,ID Match,12345,"Checks if ID matches the provided data." 2,DOB Check,67890,"Verifies if Date of Birth matches." ``` --- ## ๐ŸŽฏ Features - โœ… Drag-and-drop or path-based file selection - โœ… Paste JSON directly into the terminal - โœ… `.csv` file auto-naming and validation - โœ… Cleanly formatted, ready-to-use output - โŒ No internet access required โ€” runs entirely offline --- ## ๐Ÿ–ฅ Requirements - Node.js v16 or higher To check your version: ```bash node -v ``` --- ## ๐Ÿงพ Project Structure ``` jumio-ruleset-extractor/ โ”œโ”€โ”€ bin/ โ”‚ โ””โ”€โ”€ cli.js # CLI logic & prompts โ”œโ”€โ”€ src/ โ”‚ โ””โ”€โ”€ convert.js # CSV generation logic โ”œโ”€โ”€ package.json โ””โ”€โ”€ README.md ``` --- ## ๐Ÿ‘จโ€๐Ÿ’ผ Author Made with โค๏ธ by **William Christopher (Jumio)** ๐Ÿ”— [LinkedIn](https://www.linkedin.com/in/sirwillchris) --- ## ๐Ÿ” Disclaimer This CLI tool runs 100% locally. Your data never leaves your machine, and no information is transmitted online.