{"repo":"boxed-dev/cognidb","free":true,"listed":false,"github":"https://github.com/boxed-dev/cognidb","clone":"git clone https://github.com/boxed-dev/cognidb.git","description":"CogniDB is a Python-powered Natural Language to SQL interface that enables users to query databases like MySQL, PostgreSQL, MongoDB, and AWS RDS using plain English. It parses questions, understands schema, generates safe SQL, and returns results, empowering non-technical users to gain database insights without writing SQL.","language":"Python","stars":216,"topics":["anthropic","database","llm","mysql","nl2sql","openai","postgresql","python","security","sql"],"license":"MIT","category":"databases-storage","readme_excerpt":"CogniDB 4.0 Secure natural-language SQL for applications — a Python library , not a chat product. CogniDB turns natural language into SELECT-oriented SQL against PostgreSQL, MySQL, and SQLite. Security is the product: sanitize → generate → AST guard → allowlists → parameterized execute → audit. Secure by default: - Intent mode is the default — the LLM produces a structured QueryIntent , which is rendered deterministically with bound parameters (no value is ever interpolated into SQL). Raw free-form LLM SQL is opt-in behind allow dangerous sql=True . - A real SQL AST guard (sqlglot) enforces read/write policy structurally — data-modifying CTEs, UNION ALL , stacked statements, DDL/admin ( PRAGMA / ATTACH / COPY / VACUUM / GRANT ), and dangerous functions ( load file , pg read file , pg sleep , …) cannot be hidden by comments, casing, or quoting. - Read mode (SELECT) by default; write mode (INSERT/UPDATE/DELETE) opt-in. DDL is always rejected. Optional fail-closed table/column allowlists. Recommended backstop: run CogniDB against a least-privilege, GRANT SELECT -only database role. App-layer checks are defense-in-depth; the database engine is the real boundary. Install From source (for development): Quick start (offline SQLite, secure default) No network LLM — a FakeIntentGenerator supplies a canned QueryIntent ; the pipeline renders it with bound parameters : Free-form (opt-in). To let the LLM emit raw SQL strings instead of intents, pass generation mode=\"free form\", allow dang","default_branch":null,"files":null,"tree":[],"storefront":"/r/boxed-dev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/boxed-dev/cognidb/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}