Skip to main content
The context-* commands pull data from your Unblocked workspace — code, pull requests, issues, documentation, and messaging — and return it as plain JSON you can pipe into scripts, editors, CI jobs, and other automation. Every command returns a single JSON document on stdout.
These commands hit your Unblocked workspace, so they require an authenticated session (see Authenticate) or an Unblocked API token in the environment.

When to use which command

context-research

Runs a multi-source research query across code, pull requests, docs, issues, and messaging. Returns synthesized context with citations. Use --effort to trade latency for thoroughness.
Inputs Output

context-search commands

The search commands run semantic search scoped to a single source type. They share the same inputs and output shape.
Inputs Output

context-query commands

Retrieve issues or pull requests using a structured natural-language query. Scope the results with --projects and --user-name for more precise matches.
Inputs Output
The content field carries the raw record (issue fields, PR metadata, etc.) encoded as a JSON string so the shape can evolve per provider without breaking the envelope.

context-get-urls

Fetch and return the content behind one or more URLs. Useful when you already have specific links — pull requests, issues, docs, message threads — and want to resolve them to full content.
Pass --urls once per URL. Space-separated values after a single --urls will be rejected.
Inputs Output

Scripting tips

  • Pipe the JSON output into jq to extract fields, for example: unblocked context-search-prs --query "..." | jq '.sources[].url'.
  • Errors are returned as { "error": "CODE", "message": "..." } with a non-zero exit code — check for the error key in scripts.
  • For CI usage, authenticate with an API token (see Headless auth).