@openctx/cli
v0.0.17
Published
OpenCtx CLI
Downloads
81
Readme
OpenCtx CLI
The @openctx/cli
package is a command-line interface for interacting with OpenCtx providers.
Usage
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":{"https://openctx.org/npm/@openctx/provider-web": true}}'
$ openctx meta
[{"name":"URLs", "annotations": {"selectors": []}, ...}]
$ openctx mentions https://example.com
#1 Example Domain — https://example.com
$ openctx items https://example.com
#1 Example Domain — https://example.com
- hover.text: Fetched from https://example.com
- 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 theopenctx
CLI when it invokesnode
, so you should not need to manually pass these.
Development
- Source code
- Docs
- License: Apache 2.0