Minr is a command-line data mining tool developed by SCANOSS, written in C, that serves multiple purposes in source code analysis and component identification. The tool is designed to download, index, and import source code metadata into a knowledge base while also functioning as a local analysis utility for detecting licenses, copyrights, cryptographic algorithms, and code quality issues within source code repositories.
The core functionality of minr operates in several distinct modes. In its primary mining mode, minr accepts two arguments: a target metadata file in CSV format containing vendor, component, version, release date, license, and PURL information, and a target URL pointing to either a downloadable archive or local folder. The tool then processes this data to create a structured mined directory containing various output files and metadata. For local analysis, minr can scan directories recursively using specific flags: the -L option searches for license declarations, -C identifies copyrights, -Q analyzes code quality, and -Y detects cryptographic algorithms with their coding strength ratings.
The mining process in minr follows a multi-stage workflow. URL mining downloads components and expands files while preserving component metadata and source code in specialized .mz archives. Snippet mining then extracts snippet fingerprints from these archives using the -z parameter. The extracted data can subsequently be imported into an LDB (Linked-list database), which serves as the knowledge base for component matching and scanning operations. Minr requires several system dependencies including coreutils, gzip, tar, 7z, unrar, unzip, xz-utils, ruby, and curl, with additional requirements for scancode mode including jq and scancode.
The output structure generated by minr is comprehensive and organized. The mined directory contains multiple CSV files including url.csv for component metadata, file tables split across 256 files for scalability, pivot.csv for file-to-URL relationships, dependency.csv for declared dependencies, and purl.csv for component-level information and PURL relations. Snippet data is stored in binary format across 256 .bin files using the winnowing algorithm to generate 32-bit identifiers. Source code archives are preserved in 65536 .mz files within the sources directory, designed for efficient concatenation and extraction.
According to GitGenius activity tracking, the repository shows median issue and pull request response latency of 2.7 hours with a mean of 43.2 hours across tracked items. The most active contributors and triagers are isasmendiagus and mscasso-scanoss, each with three recorded events. The repository shares overlapping contributors with scanoss/engine, indicating collaborative development across related SCANOSS projects.
Minr supports joining multiple mined directory structures through concatenation of CSV, binary snippet, and compressed archive files, with built-in validation for .bin and .mz file integrity. The tool is released under the GPL 2.0 license and integrates with the broader SCANOSS ecosystem for comprehensive open source inventory management and compliance checking.