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.
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.
Output
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.
Output
context-get-rules
Returns the coding rules Unblocked extracts from a repository’s instruction files, such as AGENTS.md, CLAUDE.md, and .cursorrules. Rules are sorted by severity, must first, and the command returns the first 20 by default. Pass --task and --paths to get the rules that apply to your files, and --max-rules to get more.
Output
Each rule is one source.
content holds its description, severity, category, tasks, languages, and source file, and url links to the source file. totalMatched is how many rules matched before the limit. When it is larger than the number of sources, the output also includes a note that says how to get more.
sources array means Unblocked found no rules for the repository, or none matched the filters. A repository that doesn’t exist and one you can’t access both return a not-found error.
Scripting tips
- Pipe the JSON output into
jqto 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 theerrorkey in scripts. - For CI usage, authenticate with an API token. See Headless authentication.