AskDB is a CLI tool that converts natural-language questions into validated SQL queries for configured SQL dialects (e.g., PostgreSQL). It connects to a local or remote database, uses an LLM (OpenAI by default) to generate SQL, and returns results or a dry-run of the query. Currently at version 1.0.0-beta.20, it requires Node >=20 and is under active beta development. Key differentiators: it validates generated SQL against the database schema, supports dry-run mode, and focuses on CLI-first interaction.
npm install askdbNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes AskDB configuration and then asks a natural-language question to generate SQL.
Pin to exact version and test upgrades.
Ensure 'askdb init' completes and database is accessible.
Set OPENAI_API_KEY in your environment or configure another LLM provider.
Rename or migrate configuration file to new format.
Use 'npx askdb' for CLI or import AskDB from 'askdb' in ESM context.
export OPENAI_API_KEY=your_key_here
Run 'npx askdb init' with correct database credentials.
No dependency data recorded yet.