hypha logo

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 --json for machine pipelines). No HTML. Use --select to drop the fields you don't need — hypha symbol … --select sig,haddock for just the type and the docs — and --full only when you do.
  • Cache-aggressive, Hackage-friendly. Network responses are cached on disk with ETag + If-Modified-Since revalidation. 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 on containers-0.6.7, the second inherits the first's work.
  • Plan-aware, source-faithful. Reads your dist-newstyle/cache/plan.json so answers reflect the exact versions you're building against — including your local project, and (in the doc-browser server) every cabal library NAME sub-library of every package in the plan. Symbols point to the file:line where they're actually defined, not the re-export module — following a chain of re-exports across module and package boundaries, so base's façades resolve into ghc-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.

hypha CLI — default YAML output   hypha server — doc browser UI

Where to next


Licensed under BSD-3-Clause.