# axon anchor-search

Source: https://usecns.dev/axon-cli-anchor-search/

[Start here](https://usecns.dev/manual-axon/)
[CLI commands](https://usecns.dev/commands-axon/)
[Configuration & integration](https://usecns.dev/axon-topics/)

```
axon anchor-search <query> [--limit <count>] [--granularity <node|file>]
  [--embed-provider <provider>] [--embed-url <endpoint>] [--embed-model <model>]
  [--rerank] [--rerank-url <endpoint>] [--rerank-model <model>]
  [--include-tests] [--json]
```

Defaults: limit 10, granularity `node`, provider `auto`, rerank false, include-tests false. Only the exact granularity string `file` groups by file; other strings become `node` rather than failing enum validation. Provider names are case-insensitive: `auto`, `local` (also `local-hash`), `thalamus`, `http`. Endpoint/model flags have no built-in remote defaults. Environment: `AXON_EMBED_URL` then `THALAMUS_URL`; `AXON_EMBED_MODEL`; `AXON_RERANK_MODEL`. Rerank URL inherits the explicit embedding URL when not given, then endpoint environment configuration. Thalamus/auto may discover an embedding model through `/v1/models`; HTTP requires a configured model. Auto can use endpoint environment configuration, but an explicit `--embed-url` with auto/local is refused. Use local explicitly to prohibit remote inference. Search refusal prints a JSON refusal envelope with `--json` or an error message otherwise and exits 1; successful empty results exit 0. See [provider boundaries](https://usecns.dev/axon-topic-prepare-concept-search-safely/) for stage fallback/provenance and transport constraints.

See [CLI conventions](https://usecns.dev/axon-cli-usage/) for shared configuration and exit behavior, or [browse all commands](https://usecns.dev/commands-axon/).