Ground Truth for AI Coding Agents.
LintBase gives AI agents real-time knowledge of your database schema, security rules, and architecture so they stop hallucinating your codebase.
Real-time Firestore schema context for AI coding agents. Stop hallucinating field names.
2026-11-09
ดาว
—
เครื่องมือ
—
อัปไทม์
—
Why LintBase?
Developers are constantly feeding context files to AI tools like Cursor, Windsurf, Copilot Workspace, and Claude Code.
If your agent doesn't understand your real database schema, it writes code that fails in production.
LintBase acts as the bridge. It connects directly to your database, reads the ground truth of your live documents, and generates structured context optimized for AI.
🤖 Stops AI Hallucinations — Generates exact schema, field presence rates, and types.
📐 Catches Schema Drift — CI protection with lintbase check against schema snapshots.
🔒 Security Context — Highlights missing rules or exposed PII before your AI writes queries.
💸 Cost Awareness — Prevents AI from writing unbounded queries on 2M+ document collections.
🍃 Universal NoSQL — Works effortlessly with Firestore and MongoDB.
Why not just let the agent read the code?
Because in document databases, the code lies. The real schema is whatever your live documents actually contain, and that drifts away from the code with every half-finished migration, every renamed field, and every previous AI session that wrote in a hurry. An agent inferring the schema from TypeScript interfaces writes plausible queries against a database that no longer exists. The failure is silent: empty results, undefined values, a new field variant living alongside the old one. LintBase reads the documents, not the code.
Limitations (honest ones)
Firestore and MongoDB only. Postgres is the obvious gap and it is next.
Large collections are sampled, not fully scanned. Presence rates are estimates on multi-million-document collections.
The MCP server is newer than the CLI. Expect rough edges there first.
🤖 AI Context Export (For Cursor, Claude, Windsurf)
The fastest way to give your AI agent perfect database knowledge.
Drop the lintbase-context folder into your AI's context window, or mention it in .cursorrules. Your agent will now write perfect, drift-free database queries.
Quick Start
1. Get a service account key
Firebase Console → Project Settings → Service Accounts → Generate new private key
Save the JSON file. Never commit it to git.
2. CI Pipeline Protection (Schema Drift)
LintBase acts as "Version Control for your Schema". Run the snapshot command to create a baseline:
Using Cursor, Claude Desktop, or Windsurf? Install lintbase-mcp to give your AI agent real-time Firestore schema context — so it stops hallucinating field names.
Email, phone, SSN fields without encryption markers
world-readable
Documents with overly permissive security rules
💸 Cost
Rule
What it detects
large-collection
Collections with 100k+ docs and high read cost
unbounded-query
Queries without limit() that scan entire collections
missing-index
Filter combinations that fall back to full collection scans
debug-collection
Collections that look like temporary data that was never cleaned up
📐 Schema Drift
Rule
What it detects
type-inconsistency
Field stored as different types across documents
missing-required-field
Field present in 90%+ of docs but absent in some
nullable-id
Reference fields that are sometimes null
⚡ Performance
Rule
What it detects
deep-nesting
Document fields nested > 3 levels deep
large-document
Documents approaching the 1MB Firestore limit
hot-document
Single document updated by many users simultaneously
no-pagination
Collections without a standard pagination field
Options
lintbase <command> <database> [options]
Commands:
scan <database> Scan a database and print diagnostic report
export-context <database> Export schema to markdown/JSON for AI agents
snapshot <database> Generate local schema snapshot for CI comparison
check <database> Run in headless CI mode (fails on schema drift)
Options:
--key <path> Path to Firebase service account JSON
--uri <uri> MongoDB connection URI
--limit <n> Max documents to sample per collection [default: 100]
--max-depth <n> Firestore: tiers to recurse into subcollections
(1 = top-level only) [default: 2]
--fail-on <lvl> Fail pipeline if issues exceed severity (error, warning, info)
--save <url> Dashboard URL to save results
--token <token> API token for dashboard (from lintbase.com)
--collections Comma-separated list of collections to scan
-h, --help Show help
Dashboard
The CLI is free forever. The dashboard visualizes your scan results as an interactive schema map — your credentials never leave your machine.
What Pro gets you via --save:
⬡ Schema Map — every collection as a draggable card, with real field names, types, presence rates, and issue badges
◎ Health Radar — per-collection spider chart across Schema, Security, Performance, and Cost axes
⊕ Priority Quadrant — 2×2 bubble chart of Impact vs. Ease of Fix — tells you what to fix first
≋ Drift Timeline — stored history across scans so you can replay your schema architecture over time.
CLI Local Tooling: 100% Free · Pro: $39/month — unlimited history, dashboards, and shared team workflow.
Security
Your service account key never leaves your machine — it is only read locally
Document sampling is hard-capped at --limit (default 100) to prevent accidental read costs
The --save flag only sends the scan summary and issue list — never raw document data