Overview
Render a live graph of your Typesense collections and their interconnections directly in the terminal, using Unicode box‑drawing by default with an ASCII fallback.- Discovers collections and references from Typesense live schemas (fallback to local registry).
- Builds a forward graph (from referrer → referenced collection).
- Detects isolated collections and immediate cycles (A ↔ B).
- Renders:
ascii: layered boxes with labeled connectors when width allowsascii_compact: grouped list for narrow terminals
Usage
Output (layered)
Output (compact)
Notes
- Width is detected via
IO.console.winsize, thenENV[‘COLUMNS’], thenstty size; defaults to 100 if unknown. - Live discovery uses field
reference: “<collection>.<foreign_key>”from Typesense schemas; falls back to compiled model schemas when Typesense is unavailable. - Emits
search_engine.collections.graphwith counts and layout mode.
Mermaid
Use the returnedmermaid string to embed diagrams in docs:
You can also render images locally via @mermaid-js/mermaid-cli: