Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>Curie: Local PostgreSQL Text2SQLNew to Visual Studio Code? Get it now.
Curie: Local PostgreSQL Text2SQL

Curie: Local PostgreSQL Text2SQL

Curie Group

|
14 installs
| (0) | Free
Generate, review, and run PostgreSQL queries from natural language with a local Qwen model.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Curie — Local Text2SQL for PostgreSQL

Curie is a VS Code extension that turns natural-language questions into PostgreSQL queries. It runs a fine-tuned Qwen model locally, so schema context and query generation stay on your machine.

Curie was developed as a university project for local, understandable Text2SQL workflows.

What you can do

  • Connect to a PostgreSQL database from the Curie sidebar.
  • Inspect tables, columns, primary keys, and foreign-key relationships.
  • Select the tables that should be included in the model context.
  • View the selected schema as a table list or Mermaid ER diagram.
  • Generate PostgreSQL from questions written in natural language.
  • Review and edit generated SQL before running it.
  • Run a query and view up to 100 returned rows directly in VS Code.
  • Copy query results as tab-separated values for use in a spreadsheet.

For example, ask:

Which customers placed the most orders last month?

How it works

  1. Curie starts a managed, isolated Python environment on your computer.
  2. It installs the curie-backend package when needed and starts the local API on 127.0.0.1.
  3. You load and select the relevant PostgreSQL schema.
  4. Curie combines your question with that schema and generates SQL using the selected local Qwen model.
  5. You review the query and may run it against the configured database.

The initial setup can take several minutes: the Python backend, its dependencies, and the public Qwen base model may need to be downloaded. Subsequent starts use the locally stored environment and model cache.

Requirements

  • VS Code 1.105 or newer
  • Python 3.10 or newer
  • A reachable PostgreSQL database
  • Sufficient local memory and disk space for the selected Qwen model
  • Internet access for the initial backend installation and model download

Curie currently supports PostgreSQL only.

Get started

  1. Install the extension and open Curie from the Activity Bar.
  2. Wait until the backend status shows Running. If prompted, choose Install backend.
  3. In Database, enter the host, port, database, username, password, and SSL mode, then select Load schema.
  4. Select the tables relevant to your question.
  5. Enter a question and select Generate SQL.
  6. Review or edit the generated statement.
  7. Keep Read-only transaction enabled and select Run SQL when ready.

Privacy and safety

  • Model inference runs locally; Curie does not use a hosted inference service.
  • The backend listens only on 127.0.0.1.
  • Database credentials are stored with VS Code SecretStorage, not in the saved webview state.
  • Curie does not collect telemetry.
  • SQL execution accepts one statement per request and returns at most 100 rows.
  • Read-only transactions are enabled by default.

Generated SQL can be incorrect or unsafe for your data. Always review it before execution. Disable read-only mode only when you intentionally want to run a statement that changes the database.

Commands

Open the Command Palette and search for Curie:

  • Curie: Open Text2SQL Assistant
  • Curie: Start Backend Server
  • Curie: Stop Backend Server

Settings

Setting Default Description
dbAssistant.backendPort 8000 Local port for the Curie backend.
dbAssistant.autoStartBackend true Start the backend when the extension activates.
dbAssistant.backendPythonPath Auto-detected Optional Python 3.10+ interpreter used to create Curie's managed environment.

Troubleshooting

Python was not found

Set dbAssistant.backendPythonPath to a Python 3.10+ interpreter, for example:

/usr/local/bin/python3

The backend cannot start

Open View → Output, select Curie Backend, and inspect the installation or model-loading log. If the configured port is already in use, select a different dbAssistant.backendPort and restart the backend.

The database connection fails

Check the host, port, database name, username, password, and SSL mode. Also confirm that PostgreSQL accepts connections from the computer running VS Code.

The first start takes a long time

This is expected while Curie installs the backend dependencies or downloads the base model. Keep VS Code open and check Curie Backend output for progress.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft