nxp-monkey search

design / cli / search

Purpose

Search the local nxp_monkey index for parts by name or family root. 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.
--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 with a hint when the index is empty.

Scoring

MatchScore
exact part match1.00
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