Using OpenCtx in Sourcegraph

  1. Join our Discord and ask an admin to enable the openctx feature flag for your user account on Sourcegraph.com.

  2. Visit a file on Sourcegraph that has OpenCtx items. Examples:

  3. Toggle on the button in the file header.

  4. Look for and hover OpenCtx items, such as this one for a Prometheus metric:

    Screenshot of OpenCtx annotations in VS Code
  5. (Optional) If you're using VS Code, you can add Sourcegraph as an OpenCtx provider to get the same context in your editor. Install the VS Code extension and add the following provider in your VS Code settings:


    "openctx.providers": {
    // ...other providers...
    "https://sourcegraph.com/.api/openctx": true,
    },