mlx-bun library API
    Preparing search index...
    Index
    db: Database
    • list(), collapsed to ONE record per repo: the canonical snapshot (refs/main, else most recently scanned). Upstream pushes create a new snapshots/ dir per revision and the old ones are never deleted, so raw list() shows a row per revision — this is the user-facing view (ls, /v1/models, /library). Order follows list() (size ascending).

      Parameters

      • filter: { maxBytes?: number; query?: string; vision?: boolean } | undefined = {}

      Returns ModelRecord[]

    • Resolve a fuzzy query to exactly one model (error listing candidates otherwise). Companion artifacts (isCompanion) are never selectable on their own, so they never count as candidates here.

      Parameters

      • query: string

      Returns ModelRecord

    • Index the hub cache (default hubCacheRoot()) and the configured plain model directories. Returns the number of records written.

      Parameters

      • hubDir: string = ...

      Returns Promise<number>