tbls connects to many SQL and document databases, generates schema docs, ER diagrams, and lint rules. A single binary fits continuous integration workflows.
Overview
tbls is a command-line tool that documents database schemas from live connections or exported schema files. You add a configuration file to your project, point it at a data source, and run commands to emit documentation, compare schema to docs, or enforce comment and structure rules.
It supports a long list of relational and cloud data sources, including PostgreSQL, MySQL, SQLite, BigQuery, Spanner, Redshift, SQL Server, DynamoDB, Snowflake, MongoDB, ClickHouse, and others. Optional TLS settings map to common client verification modes, and external drivers can extend support through executables on your PATH.
Generated output can be Markdown, JSON, YAML, Excel, DOT, PlantUML, Mermaid, or images, with ER diagrams produced alongside table docs. Configuration covers labels, viewpoints, virtual relations, custom templates, table filters, and lint exclusions. Continuous integration workflows typically commit generated docs, change schemas in development, then run diff or lint in CI.
The tool also measures documentation coverage for descriptions and comments, loads prior JSON schema as a datasource, and integrates with GitHub Actions and Docker for installation. Database linting runs against rules you define in the same config file used for documentation.
Key features
- Single-binary CI-oriented workflow
- Many built-in database connectors
- Schema linting and coverage metrics
- Schema-to-document diff checking
- ER diagrams in several formats
- Custom documentation templates
- Viewpoints and virtual relations
- Pluggable external database drivers
Use cases
- Keep schema docs in sync with CI
- Lint database comments and structure
- Publish ER diagrams with table docs
- Document cloud warehouse schemas