Open MercatoDocsSearch docsAPI reference

CLI

mercato module search

Search the module catalog from the terminal before building a feature yourself. Open a result's details to check its package and installation instructions.

yarn mercato module search asks the Open Mercato Modules catalog whether a module for your need already exists. Modules built into Open Mercato core come first, then official, community and third-party packages that the catalog has verified on your app's Open Mercato version. yarn mercato module info shows one module: its levels per release line, the agent policy, what it adds to your app and the install line to copy.

Both commands only read. They never install, enable or change anything; use module enable or module add with the printed command when you decide to install.

Usage

yarn mercato module search [<query>] [--category <id>] [--kind <kind>] [--all-lines] [--limit <n>] [--json]
yarn mercato module info <package-or-module-id> [--json]

Examples:

yarn mercato module search "exchange rates"
yarn mercato module search ksef --json
yarn mercato module search --category payments-finance
yarn mercato module info @fastwhitecat/integration-ksef-direct
yarn mercato module info currencies

Options

OptionDescriptionDefault
<query>What you need, in plain words (send invoices to KSeF, exchange rates) or a name (stripe, data_sync). Several words are joined into one query. Maximum 200 characters. Filler words such as when, use or for are ignored. Leave it out to list what --category or --kind picks.required without a filter
--category <id>Only modules in one catalog category, for example payments-finance or integrations-sync.all
--kind <kind>Only these kinds, comma-separated: module, provider, library, tool, built-in.all
--all-linesAlso show modules that the catalog has not verified on your app's Open Mercato line.false
--limit <n>How many catalog modules to show, 1 to 20. Built-in matches are shown in addition (at most 5).10
--jsonPrint machine-readable JSON (see below) instead of text.false

module info

OptionDescription
<package-or-module-id>An npm name (@open-mercato/gateway-stripe, a version suffix is ignored), a catalog locator (npm:@scope/name, github:owner/repo) or a module ID (currencies, integration_ksef_direct). A module ID that is built into core resolves to the core module.
--jsonPrint machine-readable JSON instead of text.

Output

Already in Open Mercato core:
  currencies  Currencies   yarn mercato module enable @open-mercato/core --module currencies

@fastwhitecat/integration-ksef-direct 0.1.8   VERIFIED · 0.9   community · MIT
  Sends and receives Polish structured e-invoices through the KSeF API v2.
  matched: provider KSeF · agent policy: ask (third-party)
  install: yarn mercato module add @fastwhitecat/[email protected] --allow-third-party && yarn db:migrate
  more: https://modules.openmercato.com/m/@fastwhitecat/integration-ksef-direct

yarn mercato module search "web research" on a 0.9 app lists a provider the catalog has not run on 0.9, with the library it needs in the same yarn add:

@open-mercato/web-research-model 0.9.0   LISTED · untested on 0.9   official · MIT
  Web search through the native search tool of the agent LLM on Anthropic, OpenAI or Azure OpenAI. On by default.
  matched: name, summary, tag web-search · agent policy: ask (not-verified)
  install: yarn add @open-mercato/[email protected] @open-mercato/[email protected] && yarn generate
  more: https://modules.openmercato.com/m/@open-mercato/web-research-model

JSON output

--json prints the same cards as the catalog's search_modules and get_module tools (contract tools@1), so agents get the same answer from the CLI and the website, and from the catalog's MCP server once it is live. The ranking is the catalog's own.

module search --json:

FieldDescription
schemaVersionAlways 1. New fields are only added, never renamed or removed.
queryThe query as searched.
lineCatalog line of the app (0.9, next), or null when the app's version is not tested.
omVersionThe Open Mercato version read from the app, or null.
builtInMatching core modules: id, title, description, category, enabled (true/false from src/modules.ts, null when unknown), install, page, matchedOn, presetNote (what a new app on line has, or null when a new app has it off).
resultsModule cards: locator, path, title, summary, whenToUse, type, kind, category, license, tier, omQuality, verifiedOn, line, status, agentPolicy, installableFrom, install, matchedOn, card. install is the bare command of tools@1, without the yarn generate and yarn db:migrate steps of the text output. On a line whose new app already registers the package, install is that sentence, and presetNote and installEmptyPreset (the command for an app from the empty preset, or null) are set.
totalAll catalog modules that matched, on any line.
hiddenHow many modules (kind module) were left out because they are not verified on line (always 0 with --all-lines).
dataVersion, generatedAtVersion and time of the catalog data.
receiptSourceWhere the install receipts come from: ci, preview (a preview run, not CI) or null.
didYouMeanPresent when nothing matched the query and the results are for this spelling of it.

module info --json returns schemaVersion, line, entry (the catalog entry as published in modules.json, or null for a core module), candidates, warnings and card (the Markdown card with the install plan). anatomy and untrusted stay null in the CLI; read the card for the full plan. An unknown module prints { "schemaVersion": 1, "error": "...", "candidates": [...] } and exits with code 1.

Network, cache and offline use

The commands download https://modules.openmercato.com/modules.json and built-in.json (timeout 4 seconds, one retry) and keep a copy in .mercato/cache/modules-index.json. For 10 minutes the copy is used as it is, without a request and without a message. After that the copy is revalidated with its ETag; when that fails (no connection, an error from the server), the older copy is used and the command prints Using cached module index from <date>. on stderr. Without a copy it prints Module index unavailable. Check your connection or set OM_MODULES_INDEX_URL. and, on a second line, the reason (for example Reason: https://mirror.example.com/nope.json answered 404), and exits with code 2.

Environment variableDescription
OM_MODULES_INDEX_URLAnother modules.json, for example a mirror inside your network. built-in.json is read from the same folder.
OM_MODULES_BUILTIN_URLAnother built-in.json, when it is not next to modules.json.

The commands send no telemetry; the only requests are the two downloads above.

Exit codes

CodeMeaning
0Success, also when nothing matched.
1Wrong usage, or module info found no such module.
2The module index is unavailable and there is no cached copy.

See also

Previous: mercato module enable · Next: CLI Overview