Hypha
A Haskell-aware code/doc browser tuned for AI agents and humans alike.
AI agents don't browse Hackage. They fetch HTML pages and burn input tokens parsing chrome, navigation, and boilerplate just to find a signature or a Haddock paragraph. They also re-grep the local source tree on every follow-up question. Both are expensive.
hypha exists to make Haskell knowledge cheap to consume:
- Token economy. Every command emits compact, structured YAML by
default (or
--jsonfor machine pipelines). No HTML. Use--selectto drop the fields you don't need —hypha symbol … --select sig,haddockfor just the type and the docs — and--fullonly when you do. - Cache-aggressive, Hackage-friendly. Network responses are cached on
disk with ETag +
If-Modified-Sincerevalidation. The same project re-queried a thousand times produces a small handful of HTTP requests. The search index is persisted in SQLite and shared across every project on your machine — if two projects depend oncontainers-0.6.7, the second inherits the first's work. - Plan-aware, source-faithful. Reads your
dist-newstyle/cache/plan.jsonso answers reflect the exact versions you're building against — including your local project, and (in the doc-browser server) every caballibrary NAMEsub-library of every package in the plan. Symbols point to thefile:linewhere they're actually defined, not the re-export module — following a chain of re-exports across module and package boundaries, sobase's façades resolve intoghc-internal. CPP is preprocessed with the macros your build plan implies, so a#if-guarded declaration is read from the branch your compiler would compile; the few modules that still fail to parse are reported rather than guessed at. - One tool, two surfaces. The same library powers the CLI and the local doc-browser server, so agents and humans see the same data.
Where to next
- Installation — build from source or Nix.
- Quick Start — materialise a plan and run your first query.
- Claude Code Plugin — teach Claude to prefer
hypha. - Guide — identifier syntax, subcommands, flags, caching.
- Doc Browser Server — the visual surface.
- Design — the
cli-printing-pressethos and architecture.
Licensed under BSD-3-Clause.