Help with headless use cases: context in the CLI client

@sqs - i really enjoyed your talk yesterday at AIEWF, i’m disappointed i didn’t have time to come say hi!

i’m very interested in using openctx to give context to ai coding agents. while i “get it” when the client is a browser/IDE, and i can see the value of the hyperlinks to reference context, i’m more interested in a headless CLI version.

this page of the documentation is not clear to me: CLI | OpenCtx

could someone explain how the the context is listed/traversed in the CLI client? a simple demo using GitHub and/or Sourcegraph as the provider(s) would help me wrap my head around it.

for example, let’s say i want to get the definition of a function that is mentioned in a github issue - how would that happen in the CLI client?

maybe better i start with cody-agent instead? Feedback on Cody CLI (experimental feature) - #8 by sqs

Thanks for being at the talk! Glad you liked it.

OpenCtx currently only fetches context that comes from the providers you are using. You can see a list of the context providers at

Right now, things like function definitions and references are not available via an OpenCtx provider. There’s no reason why they couldn’t be, it’s just that we haven’t built that yet. (Sourcegraph and Cody have a lot of built-in code context support that we built before OpenCtx existed.)

The OpenCtx CLI is helpful if you want to get data from context providers, such as pulling Linear issues or GitHub PR comments.