Bowmark AIdocs

Browse a local database GUI's tables

Turns the HTML of a local database GUI (Adminer, phpMyAdmin, pgAdmin, Drizzle Studio, mongo-express, or anything similar running on the caller's own…

Turns the HTML of a local database GUI (Adminer, phpMyAdmin, pgAdmin, Drizzle Studio, mongo-express, or anything similar running on the caller's own localhost) into typed tables and a candidate table list — Bowmark cannot navigate a caller-private address itself, so this takes the page the caller's own agent already has and structures it. Read-only; nothing here can submit or modify a row.

Also known as: database gui, db gui, local database gui, database admin panel, sql browser, table browser, localhost database, adminer, phpmyadmin, pgadmin, drizzle studio, mongo express, database viewer

Call it

bowmark.db_gui.browse(html: string, options?: DbGuiBrowseOptions): Promise<DbGuiBrowseResult>

Functions

FunctionWhat it does
browseParses the HTML of a local database GUI page (e.g. the caller's own agent read it off http://localhost:&#60;port&#62; — Bowmark cannot reach that address itself) and returns every <table> on the…

Types

interface DbGuiTable {
  name: string | null       // a <caption>, the nearest preceding heading, or an
                            // aria-label/data-testid naming it — null if nothing does
  columns: string[]          // "col_1", "col_2", … when the table has no header row
  rows: Record<string, string>[]
  rowCount: number           // the real count, even when rows[] was cut
  truncated: boolean
}
interface DbGuiBrowseOptions {
  maxTables?: number         // default 25
  maxRowsPerTable?: number   // default 200
}
interface DbGuiBrowseResult {
  tables: DbGuiTable[]
  navLinks: string[]         // candidate table/collection names from a sidebar-shaped nav
  warnings: string[]
}

Examples

// The caller's own agent already has the page — e.g. it read
// http://localhost:5433 (this repo's own db-gui port) into a string. Bowmark
// cannot fetch that address itself, so it structures the HTML you hand it.
const { tables, navLinks } = await bowmark.db_gui.browse(pageHtml);
for (const t of tables) log(`${t.name ?? "(unnamed)"}: ${t.rowCount} rows, columns ${t.columns.join(", ")}`);
log(`sidebar shows: ${navLinks.join(", ")}`);
// Keep results small for a wide page with many grids.
const { tables } = await bowmark.db_gui.browse(pageHtml, { maxTables: 5, maxRowsPerTable: 20 });
return tables.map(t => ({ name: t.name, columns: t.columns, sample: t.rows.slice(0, 3) }));

Providers behind it

None — this capability needs no site. It computes the answer, or reads a public API that publishes it.