Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

tbls

$ tbls Community Low Risk
k1LoW · Database & Data · MIT · macos / linux / windows

tbls introspects PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, and more to generate Markdown docs, Mermaid/SVG ER diagrams, schema drift diffs (tbls diff), lint checks (tbls lint), and machine-readable JSON schemas (tbls out -t json).

FCRS-1.0 Score
91 /100
Excellent
Medium Confidence
Zero-Friction Install
brew install tbls
CLI vs MCP Decision CLI Preferred vs MCP

tbls out -t json --table <table> dumps exact relational metadata in one command without burning context on interactive SQL queries.

Agent-Readiness Checklist

✓ JSON Output
✓ Field Filtering
✓ Non-Interactive
— Dry-Run
✓ Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

First-class tbls out -t json with --table filtering, offline json:// DSN support, and CI-friendly exit codes on tbls diff and tbls lint.

  • Supports tbls out -t json and --table scoping
  • tbls diff and tbls lint exit non-zero in CI
Trust & Safety 24 / 25

Strictly read-only against target databases; only writes local documentation or diagram files when tbls doc or -o is used.

  • Never executes DDL/DML mutations against target databases
Setup & Portability 14 / 15

Single static Go binary available via Homebrew, go install, Docker, and GitHub releases across macOS, Linux, and Windows.

  • Zero-dependency Go binary via brew install tbls
Utility & Efficiency 14 / 15

Supports 15+ databases (Postgres, MySQL, SQLite, BigQuery, Snowflake, Redshift, DynamoDB) and outputs JSON, YAML, Mermaid, and SVG.

  • Multi-engine introspection and json:// offline analysis
Maintenance & Lineage 8 / 10

Well-maintained by k1LoW under MIT license (v1.89.0+ resolved earlier AGPL transitive dep).

  • Active k1LoW/tbls repository under MIT license
Docs & Verifiability 8 / 10

Detailed README, .tbls.yml schema examples, and clear --help flags per subcommand.

  • Comprehensive usage docs in k1LoW/tbls

Security, Auth & Guardrails

Auth Modes
Config File Env API Key
Credential Storage

Reads DSN and rules from .tbls.yml, TBLS_DSN env var, or positional [DSN] argument; supports reading from local json:// schema dumps offline.

Side Effects
Read-Only Local Write
Cost & Quotas

MIT open-source CLI (resolved prior dependency issue since v1.89.0); completely free.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# tbls Agent Rules
- Prefer `tbls out -t json --table <name>` when inspecting unfamiliar schemas to save context tokens.
- Never commit real DSN credentials into `.tbls.yml`; pass `TBLS_DSN` via environment variables.

Agent-Ready Command Recipes

Safe Read-Only Queries

Export full database schema as JSON
tbls out -t json postgres://user:pass@localhost:5432/mydb

Streams structured JSON containing tables, columns, indexes, and foreign-key relations to stdout.

Detect drift between live DB and docs
tbls diff postgres://user:pass@localhost:5432/mydb docs/schema

Exits non-zero and prints schema differences without modifying the database or doc files.

Controlled Writes & Previews

Generate Markdown docs and ER diagrams locally
tbls doc --rm-dist postgres://user:pass@localhost:5432/mydb docs/schema

Writes updated Markdown documentation and diagram files into docs/schema.

Strengths for Agents

  • + tbls out -t json turns any live database into a clean JSON schema graph for agents.
  • + Read-only database introspection eliminates accidental schema/data mutation risk.
  • + tbls diff and tbls lint enforce schema documentation hygiene in CI.

Caveats & Pitfalls

  • ! DSNs with inline passwords in .tbls.yml can leak secrets if accidentally committed—use env vars.
  • ! Versions v1.51.0–v1.88.0 had a transitive AGPL-3.0 dependency (fixed in v1.89.0+).

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI