> ## Documentation Index
> Fetch the complete documentation index at: https://theagenticguy.github.io/opencodehub/llms.txt
> Use this file to discover all available pages before exploring further.
> Scoped bundles: [user-guide](https://theagenticguy.github.io/opencodehub/_llms-txt/user-guide.txt) · [mcp](https://theagenticguy.github.io/opencodehub/_llms-txt/mcp.txt) · [contributing](https://theagenticguy.github.io/opencodehub/_llms-txt/contributing.txt)

# Your first query

All three commands below run locally against the index at `.codehub/`.
None of them open sockets once the index is built (add `--offline` to
`analyze` to also prove zero network during indexing).

:::note[Examples assume `codehub` is on your PATH]
Run `mise run cli:link` (or `mise run cli:install-global`) once from a
checkout — see [Install](/opencodehub/start-here/install/). If you
haven't linked the CLI, replace `codehub` with
`node packages/cli/dist/index.js` in every command below.
:::

## Hybrid search: `query`

`codehub query` fuses BM25 lexical search with HNSW vector search (when
embeddings are present) to find symbols related to a natural-language
concept.

```bash title="find symbols related to an auth flow"
codehub query "auth token refresh"
```

Expected shape (abridged):

```
process: auth.refresh_token  — 7 steps, 4 files
1. refreshToken (src/auth/handler.ts:42)
2. validateRefreshToken (src/auth/validate.ts:18)
3. ...

process: oauth.rotate_session — 5 steps, 3 files
1. rotateSession (src/oauth/rotate.ts:12)
2. ...
```

Results are grouped by **process** (an execution flow the indexer
detected during clustering), not a flat symbol list. Use `--limit`,
`--bm25-only`, or `--granularity file` to change the shape.

## 360-degree context: `context`

`codehub context <symbol>` returns callers, callees, and the processes
the symbol participates in.

```bash title="context for a single symbol"
codehub context PaymentProcessor
```

Expected shape:

```
PaymentProcessor (Class, src/payments/processor.ts:24)
  callers:
    - checkout.charge (src/checkout/charge.ts:88)
    - subscriptions.renew (src/subscriptions/renew.ts:56)
  callees:
    - validateCard, stripeClient.createCharge, auditLog.write
  processes:
    - payments.checkout (12 steps)
    - payments.renewal (8 steps)
  ACCESSES edges:
    - ProcessorConfig (read), AuditLog (write)
```

Pass `--json` to get the structured envelope that the MCP `context`
tool returns.

## Blast radius: `impact`

`codehub impact <symbol>` reports how many symbols, files, and
processes depend on the target, plus a **risk tier** (`LOW` / `MEDIUM`
/ `HIGH` / `CRITICAL`).

```bash title="depth-2 blast radius"
codehub impact validateUser --depth 2
```

Expected shape:

```
impact(target = validateUser, depth = 2)
  direct callers: 14
  transitive callers (depth 2): 37
  affected processes: 3
  risk tier: HIGH
  confidence: 0.82
```

`--direction up` restricts to dependents (who calls me), `--direction
down` restricts to dependencies (who do I call), and `--direction both`
(the default) returns both in one response.

## Next

- [MCP tools overview](/opencodehub/mcp/overview/) for the full server
  capabilities (29 tools across exploration, federation, scan, HTTP,
  and meta).
- [Using with Claude Code](/opencodehub/guides/using-with-claude-code/)
  to let the agent run these tools for you.

## See also

* [CLI reference](/opencodehub/reference/cli/)
* [MCP tools](/opencodehub/mcp/tools/)
* [Indexing a repo](/opencodehub/guides/indexing-a-repo/)
