Hanzo AI

Code

The `hanzo code` commands.

Also for this capability: API · CLI · MCP · SDKs

Search and symbols across your repos, for you and your agents.

API reference →

hanzo code file

Every command takes --json for the raw response and --help for its own flags. Sign in once with hanzo auth login; the commands below use that session, and the org they act in is the one it carries.

CommandWhat it does
hanzo code contextPacks the most relevant code for a query into a token budget — THE primitive for a coding agent that has to decide what…
hanzo code fileReturns the INDEXED content of one file — read_file over the chunks the search tiers hold, for pulling up code an agent…
hanzo code index(re)indexes a repository for the caller's org, incrementally: files whose content hash is unchanged are skipped, so…
hanzo code searchFinds code in the caller org's index across three orthogonal retrieval tiers fused by reciprocal-rank fusion: lexical…
hanzo code treeReturns one repository's file structure with a per-file symbol count — get_repo_structure over the org's own index,…

ask

CommandWhat it does
hanzo code ask createIs askGet with the question in the request BODY, for a question too long or too awkward to put in a URL.
hanzo code ask getAnswers a question about the caller org's code with a CITED answer: retrieval packs grounding context, then the…

How is this guide?

On this page