OpenCtx CLI

The @openctx/cli package is a command-line interface for interacting with OpenCtx providers.


The OpenCtx CLI requires Node 22 or later (see known issues below).

$ npm install -g @openctx/cli@latest
$ export OPENCTX_CONFIG='{"enable":true,"debug":true,"providers":{"": true}}'
$ openctx meta
[{"name":"URLs", "annotations": {"selectors": []}, ...}]
$ openctx mentions
#1 Example Domain —
$ openctx items
#1 Example Domain —
- hover.text: Fetched from
- ai.content: (575 characters)

OPENCTX_CONFIG can be one of:

  • JSON object of config
  • Path to JSON config
  • Provider URI
  • Path to provider bundle

Known issues

  • Using providers from JavaScript bundles fetched over HTTPS requires Node 22 and running with the node --experimental-modules --experimental-network-imports option. These experimental flags are set in the openctx CLI when it invokes node, so you should not need to manually pass these.