nxp-monkey search

design / cli / search

Purpose

Search parts by name or family root. The local SQLite index is used when present; otherwise search falls back to the NXP portfolio map. Partial matches (prefix and substring) are supported by default; pass --fuzzy to also rank by edit-ratio similarity for typos.

Usage

nxp-monkey search QUERY [--fuzzy] [--limit N]

Arguments

Arg / flagEffect
QUERYCase-insensitive search string. May be a prefix or a concrete orderable MPN.
--fuzzyAdd edit-ratio matches above 0.55 similarity.
--limit NMaximum number of hits (default 50).

Output

Tab-separated rows with columns part, family, score, matched. Ranked descending by score. Returns exit code 1 when no index or portfolio match is found.

Scoring

MatchScore
exact part match1.00
concrete orderable alias for a masked key0.98
exact family match0.95
part prefix0.90
family prefix0.85
part substring0.70
family substring0.65
fuzzy ratio0.6 × ratio (when above threshold)

--json mode

With the global --json flag, search writes search.json to the working directory (query, hits with part / family / score / matched) and prints that path on stdout instead of the table.

Library equivalent

nxp_monkey.search("MCXA", fuzzy=False, limit=50)

Tests