Shield Base

Shield Base

CLI and programmatic toolkit for compiling offline-ready IP intelligence databases from BGP, GeoIP, Tor, FireHOL, and other public threat feeds into MMDB and LMDB formats.

@riavzon/shield-base aggregates, processes, and compiles network intelligence data from multiple public sources into offline binary formats. It fetches BGP routing tables, geographic location databases, threat intelligence lists, verified crawler IP ranges, and more, then consolidates them into ready-to-use MMDB and LMDB databases for security analysis and traffic filtering.

The tool works both as an interactive CLI powered by Consola and as a fully typed programmatic library.

Shield Base is the data layer that powers the Bot Detector module. All MMDB and LMDB databases it compiles are read directly by the bot detection pipeline.

Features

Interactive Wizard
Choose only the databases you need or compile them all. Supports flag-based execution for CI/CD environments.
Dual Compiler
Compiles IP range data into MMDB format via mmdbctl, and key-value data into LMDB .mdb databases with no external binary required.
13 Built-in Sources
BGP/ASN, City, Country, Tor, Proxy, FireHOL threat levels (L1-L4 + Anonymous), verified crawlers, suspicious user-agents, and disposable emails.
Type Generation
Automatically generates fully typed TypeScript interfaces from any JSON input, for both custom data and built-in datasets.
LMDB Reader
Inspect any .mdb database from the command line with the lm-read subcommand, including get, range, prefix, count, exists, stats, and drop operations.
Programmatic API
Every data source and compiler is exported as a typed function you can call directly from your build scripts or application code.

Documentation

Getting Started
Install Shield Base, run the wizard, and produce your first databases.
CLI Reference
Every flag, subcommand, and example for the shield-base command.
Data Sources
Every built-in data source, what it produces, and links to the upstream providers.
Programmatic Usage
Use Shield Base as a library in your own scripts and build pipelines.
Custom Data Sources
Compile your own JSON data into MMDB or LMDB databases with full type generation.
API Reference
Complete reference for all exported functions and the LMDB reader utilities.
TypeScript Types
All exported type definitions and how to generate types from any JSON data.
Logo