Type Discovery with karpal-index

Successor available: the karpal binary (from karpal-discovery, Phase 19) supersedes karpal-index — same commands available via karpal --index-compat, plus catalog search, concept browsing, the planner, and probes. See Discovery with karpal. karpal-index remains published for compatibility.

karpal-index is a CLI binary that lets AI agents (and humans) discover Karpal's types and operations through progressive drill-down.

Commands

$ karpal-index search Functor
Functor                        trait           Covariant functor: lifts a function A->B into F<A>->F<B>
FunctorFilter                  trait           FunctorFilter: a Functor that can filter elements

Detail

$ karpal-index detail Functor
Functor [trait]
  crate: karpal-core
  supertraits: HKT
  methods:
    - fn fmap<A, B>(fa: Self::Of<A>, f: impl Fn(A) -> B) -> Self::Of<B>;
  implementors:
    - OptionF
    - VecF
    - IdentityF

Hierarchy

$ karpal-index hierarchy Semigroup
Semigroup [trait]
  subtraits:
    - Monoid
  implementors:
    - String

JSON Output

All commands support --json for programmatic consumption:

$ karpal-index search Functor --json
[{"name":"Functor","kind":"trait","crate_name":"karpal-core",...}]

Usage

cargo run --bin karpal-index -- search Functor
# or install:
cargo install --path . --bin karpal-index
karpal-index search Functor

The binary reads the workspace source tree at runtime — no pre-built index needed.