Skip to main content

mr search

Search across resources, notes, and groups using the server's full-text index. Results are ranked by FTS5 score; the response reports the total number of matches so callers can decide whether to broaden the query or page.

Use --types to restrict to a comma-separated subset of entity types (e.g. --types resources,notes). Use --limit to cap the number of rows returned (default 20). The query string supports FTS5 syntax — phrase queries with double-quoted tokens, boolean operators, and prefix matching with *.

Usage

mr search <query>

Positional arguments:

  • <query>

Examples

Simple keyword search across all entities

mr search "invoice"

Restrict to resources only

mr search "invoice" --types resources --json

Cap results and pipe into jq to read the total

mr search "report" --limit 5 --json | jq '.total'

Flags

FlagTypeDefaultDescription
--typesstring``Comma-separated entity types to search (e.g. resources,notes)
--limitint20Maximum number of results

Inherited global flags

FlagTypeDefaultDescription
--jsonboolfalseOutput raw JSON
--no-headerboolfalseOmit table headers
--pageint1Page number for list commands (default page size: 50)
--quietboolfalseOnly output IDs
--serverstringhttp://localhost:8181mahresources server URL (env: MAHRESOURCES_URL)

Output

Search response {query (string), total (int), results (array of {id, type, name, score, description, url, extra})}

Exit Codes

0 on success; 1 on any error

See Also