Read-only SDK for the Uniforge entity graph. Zero dependencies — uses Node 18+ built-in fetch.
npm install uniforge-exploreOr copy index.mjs directly into your project.
import { Explorer } from 'uniforge-explore';
const uf = new Explorer(); // reads UNIFORGE_API_KEY + UNIFORGE_URL from env
const g = await uf.entityGraph(); // all tables + links
const p = await uf.paths(src, tgt); // find link path between tables
const link = await uf.viewLink(linkId); // link detail
const rows = await uf.sql(`SELECT ...`); // read-only SQL| Variable | Required | Description |
|---|---|---|
UNIFORGE_API_KEY |
Yes | API key (starts with uf_) |
UNIFORGE_URL |
No | Base URL (default: http://localhost:8000) |
| Method | Description |
|---|---|
entityGraph() |
All tables and links (the map) |
paths(src, tgt, {maxHops}) |
Find link path(s) between two tables |
neighbors(tableId) |
Tables directly linked to one table |
viewLink(linkId) |
Full link definition (matcher type, columns) |
tables() |
List all tables |
schema(tableId) |
Columns, types, PK, sample values |
sample(tableId, n) |
Preview rows |
search(tableId, query, opts) |
Fuzzy entity lookup (BM25 + vector) |
sql(query, limit) |
Read-only SELECT (table IDs auto-rewritten) |
All errors extend ExploreError:
AuthError— missing or invalid API keyTableNotFound— unknown table IDBadSQL— invalid SQL (non-SELECT, syntax error)NoSuchLink— unknown link IDSearchFailed— search backend errorRateLimited— server busy, retry later
MIT