mcc-mnc-tool
v1.0.6
Published
CLI tool to fetch and parse official Mobile Country Code (MCC) and Mobile Network Code (MNC) data from ITU-T E.212
Downloads
233
Readme
MCC/MNC Data Tool 📱
Simple CLI tool to fetch and parse the latest MCC/MNC data from ITU-T E.212 documents.
About
This tool automatically:
- Downloads the latest E.212 document from ITU website
- Extracts Mobile Country Codes (MCC) and Mobile Network Codes (MNC)
- Saves the data in a structured JSON format
Installation
# Clone repository
git clone https://github.com/username/mcc-tool.git
cd mcc-tool
# Install dependencies
npm install
Usage
Basic usage with default output path:
node index.mjs
Specify custom output path:
node index.mjs --output ./custom-path.json
Show help:
node index.mjs --help
Using npx:
npx mcc-mnc-tool
Output Format
The tool generates a JSON file with the following structure:
{
"metadata": {
"generated": "2024-03-15T12:34:56.789Z",
"source": "https://www.itu.int/...",
"etag": "\"abc123\""
},
"areas": {
"united states": [
{
"name": "Verizon Wireless",
"mcc": "310",
"mnc": "004"
}
]
},
"areaNames": [
"United States",
"Canada"
]
}
Requirements
- Node.js 18 or later
- Internet connection to fetch ITU documents
Development
To contribute:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
MIT License - see LICENSE file for details.
Author
Alexander Schrab