ruleset-id-extractor
Version:
CLI tool to extract and convert Jumio ruleset IDs and names to CSV
125 lines (84 loc) โข 2.46 kB
Markdown
# 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.