Purpose codeDB Lens is used to perform free, read-only health checks on SQL Server and PostgreSQL instances, helping users discover problems that the database "does not show." It installs no server-side agent, executes no DDL/DML, and always works in read-only mode.
Key capabilities
- Evidence-based rule checks: every finding shows the collected value, the query that produced it, and the time, rather than subjective opinions.
- Honest confidence labeling: every finding is labeled as Confirmed, Hint, or No data; rules lacking permissions are not shown as a false "OK" but instead reduce coverage.
- Report output: generates self-contained HTML + JSON reports with A–F ratings and a coverage stamp (the proportion of rules that actually ran).
- Rules as data: each rule is a YAML file plus a SQL query, so contributing rules requires no changes to engine code.
- Multilingual: the application, CLI, and reports support English and Brazilian Portuguese.
- Rule documentation: each rule has a documentation page explaining what is checked, why it matters, recommended actions, and limitations.
- v0.8 features: check (with an executive summary and --redact for sharing), compare, and record + report, which can observe an instance for up to 24 hours; 26 rules in total, plus 8 used for recording.
How to use
- Windows graphical interface: open codeDB Lens from the Start menu, select the engine, enter the server, and run diagnostics. Connection configurations are saved, and passwords are stored in Windows Credential Manager.
- Command line (Windows and Linux): passwords are never accepted as command-line arguments; integrated authentication, environment variables, or saved configurations can be used.
- Working with AI (MCP): codedb-lens mcp is a read-only MCP server that AI clients start on the user's computer using saved configurations. In diagnostic mode, the AI uses Lens's minimal login permissions to run health checks, read recordings, and explain what needs fixing, without reading business data; in data mode, using a login with permission to read the selected tables, the AI lists and describes tables and answers questions one SELECT at a time within row and time limits. The in-app AI (MCP) interface provides commands that can be copied directly.
Use cases
- Need a quick understanding of SQL Server or PostgreSDevelopers or DBAs of QL instance health.
- Scenarios where you want an AI assistant to help analyze database health issues without exposing business data.
- Teams that need to generate shareable database health reports (with --redact).
- Scenarios that require short-term (up to 24 hours) observation of an instance and report generation.
Limitations and notes
- Only SQL Server and PostgreSQL are supported; the specific supported versions are not yet detailed in the materials.
- The Windows binary is open source but not yet code-signed, so SmartScreen may show a warning; certificates cost money and the project is free.
- No telemetry. There are only two types of network calls: an optional once-daily GitHub Releases version check (no data is sent; can be disabled with --no-update-check or CODEDB_LENS_NO_UPDATE=1), and a registration request sent only once when the user applies for a free key, containing the name and email entered (on renewal, only the current key is sent).
- Lens only provides snapshots; for continuous monitoring (history, baselines, Teams/Slack/email alerts), the separate codeDB SaaS product is required.
- The code is licensed under Apache 2.0; codeDB SaaS and its API are separate closed-source products.
- The specific contents of the minimum permission requirements and supported versions are not yet provided in the materials.