Reference

All 71 settings.

Generated from the NexQL 2.4.0 extension manifest. Open Settings in VS Code and search for “NexQL”, or paste a line from here into yoursettings.json. Settings marked Pro are part of NexQL Pro.

71 of 71 settings

Connections & safety 11

Add, edit, duplicate, pin, group and color connections, import one from a DATABASE_URL in a .env file or from a URL on the clipboard, and connect, reconnect or disconnect. Switch the connection or database a notebook uses, or set a default connection for the workspace. Sentinel settings control how the editor signals which environment you are on (title bar, status bar, notebook strip, tab badges), and the Production audit log is listed here too.

24 commands in this area →

  • postgresExplorer.connections

    Type
    array
    Default
    []
    Scope
    window (VS Code default)

    List of saved PostgreSQL connections

  • postgresExplorer.sentinel.chatEnvChip

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Show environment chip in the NexQL Bot context bar.

    "postgresExplorer.sentinel.chatEnvChip": true
  • postgresExplorer.sentinel.chromeAccent

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Tint workbench title bar, activity bar, and status bar chrome by environment.

    "postgresExplorer.sentinel.chromeAccent": true
  • postgresExplorer.sentinel.enabled

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Enable Sentinel environment signaling when a tagged .pgsql notebook is focused.

    "postgresExplorer.sentinel.enabled": true
  • postgresExplorer.sentinel.notebookContextStrip

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Show in-notebook connection context strip with environment chip.

    "postgresExplorer.sentinel.notebookContextStrip": true
  • postgresExplorer.sentinel.notifyOnTransition

    Type
    boolean
    Default
    false
    Scope
    window (VS Code default)

    Show a notification when the active notebook environment changes (e.g. staging → production).

    "postgresExplorer.sentinel.notifyOnTransition": false
  • postgresExplorer.sentinel.statusBarAccent

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Tint status bar connection items by environment (production, staging, development).

    "postgresExplorer.sentinel.statusBarAccent": true
  • postgresExplorer.sentinel.tabBadges

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Show [P]/[S]/[D] badges on open .pgsql notebook tabs for tagged connections.

    "postgresExplorer.sentinel.tabBadges": true
  • postgresExplorer.sentinel.themeSwap.enabled

    Type
    boolean
    Default
    false
    Scope
    window (VS Code default)

    Advanced: suggest or auto-switch the entire color theme by environment.

    "postgresExplorer.sentinel.themeSwap.enabled": false
  • postgresExplorer.sentinel.themeSwap.mode

    Type
    string
    Default
    "suggest"
    Scope
    window (VS Code default)

    How theme swap behaves when themeSwap.enabled is true.

    Allowed values

    • suggest
    • auto
    "postgresExplorer.sentinel.themeSwap.mode": "suggest"
  • postgresExplorer.sentinel.themeSwap.themes

    Type
    object
    Default
    {}
    Scope
    window (VS Code default)

    Map of environment (production, staging, development) to color theme label.

    "postgresExplorer.sentinel.themeSwap.themes": {}

Explorer & objects 4

Refresh the tree, search schema objects, add objects to favorites, and open properties, definitions and data for tables, views, functions, types, roles, foreign objects and more. The Definition Viewer (DDL viewer) settings control the SQL preview. Auto refresh settings control how often the tree and Notebooks panel poll PostgreSQL for changes.

59 commands in this area →

  • nexql.ddlViewer.enabled

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Enable SQL Preview (Definition Viewer) features and actions.

    "nexql.ddlViewer.enabled": true
  • nexql.ddlViewer.openOnSelection

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Open the Definition Viewer automatically when selecting supported tree items.

    "nexql.ddlViewer.openOnSelection": true
  • postgresExplorer.autoRefresh.enabled

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Enable automatic background refresh of the explorer tree and notebooks panel.

    "postgresExplorer.autoRefresh.enabled": true
  • postgresExplorer.autoRefresh.pollIntervalSeconds

    Type
    number
    Default
    30
    Scope
    window (VS Code default)
    Range
    10 to any

    How often (in seconds) to poll PostgreSQL for schema changes.

    "postgresExplorer.autoRefresh.pollIntervalSeconds": 30

Notebooks & queries 11

Create and organise notebooks, open them quickly, jump between sections, and open the Query Tool, Query Studio or a psql session. Settings cover the query timeout, what happens when a statement in a batch fails, prompted parameters, and the SQL formatter.

18 commands in this area →

  • postgresExplorer.formatter.formatOnSave

    Type
    boolean
    Default
    false
    Scope
    window (VS Code default)

    Automatically format .pgsql / .sql files on save.

    "postgresExplorer.formatter.formatOnSave": false
  • postgresExplorer.formatter.indentStyle

    Type
    string
    Default
    "standard"
    Scope
    window (VS Code default)

    Indent style used by the SQL formatter.

    Allowed values

    • standard
    • tabularLeft
    • tabularRight
    "postgresExplorer.formatter.indentStyle": "standard"
  • postgresExplorer.formatter.keywordCase

    Type
    string
    Default
    "upper"
    Scope
    window (VS Code default)

    Keyword case used by the SQL formatter.

    Allowed values

    • upper
    • lower
    • preserve
    "postgresExplorer.formatter.keywordCase": "upper"
  • postgresExplorer.formatter.linesBetweenQueries

    Type
    number
    Default
    1
    Scope
    window (VS Code default)
    Range
    0 to any

    Number of blank lines between SQL statements in the formatter output.

    "postgresExplorer.formatter.linesBetweenQueries": 1
  • postgresExplorer.formatter.tabWidth

    Type
    number
    Default
    2
    Scope
    window (VS Code default)
    Range
    1 to any

    Number of spaces per indent level in the SQL formatter.

    "postgresExplorer.formatter.tabWidth": 2
  • postgresExplorer.formatter.useTabs

    Type
    boolean
    Default
    false
    Scope
    window (VS Code default)

    Use tabs instead of spaces for SQL formatter indentation.

    "postgresExplorer.formatter.useTabs": false
  • postgresExplorer.parameters.cacheLastValues

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Remember the last entered SQL parameter values in this workspace.

    "postgresExplorer.parameters.cacheLastValues": true
  • postgresExplorer.parameters.nullSentinel

    Type
    string
    Default
    "NULL"
    Scope
    window (VS Code default)

    Exact input text that is sent as SQL NULL for prompted parameters. Set empty string to disable.

    "postgresExplorer.parameters.nullSentinel": "NULL"
  • postgresExplorer.query.defaultExperiencePro

    Type
    string
    Default
    "notebook"
    Scope
    window (VS Code default)

    Default SQL workspace when opening Query Tool (notebook or Query Studio).

    Allowed values

    • notebook
    • queryStudio
    "postgresExplorer.query.defaultExperience": "notebook"
  • postgresExplorer.query.executionFailureStrategy

    Type
    string
    Default
    "continue-on-error"
    Scope
    window (VS Code default)

    Strategy when a statement fails in multi-statement execution: 'continue-on-error' (execute remaining, show summary), 'fail-on-error' (stop immediately), 'prompt-on-error' (ask user per failure).

    Allowed values

    • continue-on-error
    • fail-on-error
    • prompt-on-error
    "postgresExplorer.query.executionFailureStrategy": "continue-on-error"
  • postgresExplorer.queryTimeout

    Type
    number
    Default
    0
    Scope
    window (VS Code default)

    Global query timeout in milliseconds (0 for no timeout). Can be overridden per connection.

    "postgresExplorer.queryTimeout": 0

Results & export 5

Export table data and notebooks, and toggle full dataset mode on a cell. Settings cover the automatic LIMIT, the default row limit, sliding-window streaming for large results, and how bytea columns are shown.

4 commands in this area →

  • postgresExplorer.performance.defaultLimit

    Type
    number
    Default
    1000
    Scope
    window (VS Code default)

    Default row limit for SELECT queries when auto-LIMIT is enabled.

    "postgresExplorer.performance.defaultLimit": 1000
  • postgresExplorer.performance.slidingWindowRowCap

    Type
    number
    Default
    100
    Scope
    window (VS Code default)
    Range
    10 to 500

    Maximum rows kept in the result grid at once when sliding-window streaming is active.

    "postgresExplorer.performance.slidingWindowRowCap": 100
  • postgresExplorer.performance.slidingWindowSelects

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Use a PostgreSQL SCROLL cursor for eligible SELECT queries (no SQL parameters): stream one window of rows into the cell and fetch more on scroll—bounded RAM on host and webview.

    "postgresExplorer.performance.slidingWindowSelects": true
  • postgresExplorer.query.autoLimitEnabled

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Automatically append LIMIT clause to SELECT queries that don't have one. Always enabled in read-only mode.

    "postgresExplorer.query.autoLimitEnabled": true
  • postgresExplorer.query.byteaDisplayFormat

    Type
    string
    Default
    "hex0x"
    Scope
    window (VS Code default)

    Display format for binary (bytea) columns in query results: 0x-prefixed hex, PostgreSQL \x hex, or JSON Buffer shape (debug).

    Allowed values

    • hex0x
    • postgresql
    • json
    "postgresExplorer.query.byteaDisplayFormat": "hex0x"

Saved queries & history 1

Save queries to a library, search, load, edit, copy and delete them, import and export the library, and see query recommendations. Query History entries can be opened, copied or deleted, and the whole history cleared.

17 commands in this area →

  • postgresExplorer.queryHistory.maxItems

    Type
    number
    Default
    200
    Scope
    window (VS Code default)
    Range
    10 to 1000

    Maximum number of query history entries to retain. Older entries are removed once the limit is reached.

    "postgresExplorer.queryHistory.maxItems": 200

Schema tools 2

Design tables visually, view entity-relationship diagrams, compare schemas, import data and DBML, and open the Migration Hub. The database index commands and settings build and manage the local index of your database structure.

13 commands in this area →

  • postgresExplorer.dbIndex.autoBuildPro

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Automatically build and keep the local database index up to date (structure only) in the background for connected databases. Requires Auto Database Indexing (Sponsor).

    "postgresExplorer.dbIndex.autoBuild": true
  • postgresExplorer.dbIndex.enableEmbeddingsPro

    Type
    boolean
    Default
    false
    Scope
    window (VS Code default)

    Enable vector embeddings generation for tables and views to support semantic search grounding in AI tools.

    "postgresExplorer.dbIndex.enableEmbeddings": false

Performance & Plan Studio 1

Run EXPLAIN and EXPLAIN ANALYZE on a query, view index usage, table activity, table profiles and column statistics. A setting sets the threshold for flagging a query as slow in history and results.

9 commands in this area →

AI / NexQL Bot 19

Open NexQL Bot in the sidebar or an editor tab, attach objects and queries to a chat, use Ask AI on a notebook cell, generate or optimize a query, and reveal an object in the explorer from the bot. Settings choose the provider and model for chat and notebooks, set the context budget, and configure the OpenCode integration.

9 commands in this area →

  • postgresExplorer.ai.agenticMaxStepsPro

    Type
    number
    Default
    20
    Scope
    window
    Range
    1 to 100

    Maximum agentic tool-loop steps per NexQL Bot run. Oldest history is trimmed first when context is tight.

    "postgresExplorer.ai.agenticMaxSteps": 20
  • postgresExplorer.ai.chat.model

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    Model for chat. Leave empty for provider default.

    "postgresExplorer.ai.chat.model": ""
  • postgresExplorer.ai.chat.provider

    Type
    string
    Default
    "nexql-free"
    Scope
    window (VS Code default)

    AI provider for the NexQL Bot chat panel

    Allowed values

    • nexql-free
    • vscode-lm
    • github
    • cursor
    • opencode
    • openai
    • anthropic
    • gemini
    • ollama
    • lmstudio
    • custom
    "postgresExplorer.ai.chat.provider": "nexql-free"
  • postgresExplorer.ai.maxContextTokens

    Type
    number
    Default
    8000
    Scope
    window (VS Code default)
    Range
    512 to any

    Approximate token budget for AI requests (system prompt + schema context + chat history). Oldest history is dropped first, then schema is trimmed, to keep requests within this budget.

    "postgresExplorer.ai.maxContextTokens": 8000
  • postgresExplorer.ai.notebook.model

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    Model for notebook AI features. Leave empty for provider default.

    "postgresExplorer.ai.notebook.model": ""
  • postgresExplorer.ai.notebook.provider

    Type
    string
    Default
    "nexql-free"
    Scope
    window (VS Code default)

    AI provider for notebook assist, dashboard, and saved-query AI

    Allowed values

    • nexql-free
    • vscode-lm
    • github
    • cursor
    • opencode
    • openai
    • anthropic
    • gemini
    • ollama
    • lmstudio
    • custom
    "postgresExplorer.ai.notebook.provider": "nexql-free"
  • postgresExplorer.aiApiKeyDeprecated

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    Deprecated: API keys are stored in Secret Storage per provider via AI Settings.

    "postgresExplorer.aiApiKey": ""
  • postgresExplorer.aiEndpoint

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    Custom API endpoint (optional)

    "postgresExplorer.aiEndpoint": ""
  • postgresExplorer.aiModelProDeprecated

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    Deprecated: use ai.notebook.model or ai.chat.model.

    "postgresExplorer.aiModel": ""
  • postgresExplorer.aiProviderProDeprecated

    Type
    string
    Default
    "vscode-lm"
    Scope
    window (VS Code default)

    Deprecated: use ai.notebook.provider or ai.chat.provider. Kept for migration.

    Allowed values

    • vscode-lm
    • github
    • cursor
    • openai
    • anthropic
    • gemini
    • custom
    "postgresExplorer.aiProvider": "vscode-lm"
  • postgresExplorer.opencodeAutoApprovePermissions

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Poll the OpenCode server and auto-approve any permission prompts during NexQL Bot requests.

    "postgresExplorer.opencodeAutoApprovePermissions": true
  • postgresExplorer.opencodeAutoServe

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Automatically start and reuse a local opencode serve instance for faster NexQL Bot requests.

    "postgresExplorer.opencodeAutoServe": true
  • postgresExplorer.opencodeCliPath

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    Optional path to the OpenCode CLI binary. Auto-detected from PATH and common install locations when empty.

    "postgresExplorer.opencodeCliPath": ""
  • postgresExplorer.opencodePreferSdk

    Type
    boolean
    Default
    false
    Scope
    window (VS Code default)

    When the OpenCode CLI is not found, fall back to @opencode-ai/sdk if installed.

    "postgresExplorer.opencodePreferSdk": false
  • postgresExplorer.opencodeServePort

    Type
    number
    Default
    0
    Scope
    window (VS Code default)
    Range
    0 to 65535

    Fixed port for auto-started opencode serve (0 = pick a free port).

    "postgresExplorer.opencodeServePort": 0
  • postgresExplorer.opencodeServeUrl

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    OpenCode server URL (opencode serve). Auto-populated when opencodeAutoServe starts a managed server.

    "postgresExplorer.opencodeServeUrl": ""
  • postgresExplorer.opencodeShowLog

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Show the OpenCode output channel while requests are running (View → Output → OpenCode).

    "postgresExplorer.opencodeShowLog": true
  • postgresExplorer.opencodeSkipPermissions

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Auto-allow OpenCode tool permissions for headless NexQL Bot runs (YOLO mode). Required when attaching to opencode serve.

    "postgresExplorer.opencodeSkipPermissions": true
  • postgresExplorer.opencodeWorkingDirectory

    Type
    string
    Default
    "" (empty)
    Scope
    window (VS Code default)

    Working directory for OpenCode serve/run. Defaults to the VS Code workspace folder, or ~/.nexql/opencode-wd when the host folder is an IDE install path.

    "postgresExplorer.opencodeWorkingDirectory": ""

MCP 4

These settings control the NexQL MCP server that the extension exposes to MCP clients: whether it is on, where its binary is, the row cap on AI tool queries, and which tools it offers. The MCP site documents the server itself.

  • postgresExplorer.mcp.binaryPathPro

    Type
    string
    Default
    "" (empty)
    Scope
    window

    Absolute path to a standalone nexql-mcp binary. Used as a fallback when Node.js/npx is not available. When empty, NexQL tries NEXQL_MCP_BIN, then PATH.

    "postgresExplorer.mcp.binaryPath": ""
  • postgresExplorer.mcp.enabledPro

    Type
    boolean
    Default
    true
    Scope
    window

    Expose NexQL's read-only database tools as an MCP server by spawning nexql-mcp via npx -y nexql-mcp@latest (stdio). VS Code Copilot and other MCP clients discover it via the extension registry. On by default.

    "postgresExplorer.mcp.enabled": true
  • postgresExplorer.mcp.maxRowsPro

    Type
    number
    Default
    500
    Scope
    window
    Range
    1 to 10000

    Maximum number of rows returned by AI tool queries (run_select). Results beyond this limit are truncated and flagged. Applies to both NexQL Bot and MCP clients.

    "postgresExplorer.mcp.maxRows": 500
  • postgresExplorer.mcp.toolProfilePro

    Type
    string
    Default
    "full"
    Scope
    window

    Tool surface exposed to the NexQL Bot MCP client. full (default) sends all tools; meta sends a small core set plus discover_tools; query/dba are intent-scoped subsets.

    Allowed values

    • meta
    • query
    • dba
    • full
    "postgresExplorer.mcp.toolProfile": "full"

Sync 5

Set up sync, run it on demand or pause it, pull or push only, preview what would change, and resolve conflicts. Share items with a workspace, invite members and choose items to leave out. Repair, rebuild-index and diagnostics commands are listed too. Settings cover automatic sync, the notebook folder, the pull interval and the API endpoint.

21 commands in this area →

  • postgresExplorer.sync.apiEndpointPro

    Type
    string
    Default
    "https://nexql.astrx.dev/api"
    Scope
    machine

    Base URL for NexQL account and cloud sync API.

    "postgresExplorer.sync.apiEndpoint": "https://nexql.astrx.dev/api"
  • postgresExplorer.sync.autoPro

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Enable automatic sync (pull on activation, debounced push, periodic pull).

    "postgresExplorer.sync.auto": true
  • postgresExplorer.sync.notebookFolderPro

    Type
    string
    Default
    "~/NexQLNotebooks"
    Scope
    window (VS Code default)

    Folder for synced .pgsql notebooks (supports ~ for home directory).

    "postgresExplorer.sync.notebookFolder": "~/NexQLNotebooks"
  • postgresExplorer.sync.postgresConnectionIdPro

    Type
    string
    Default
    "" (empty)
    Scope
    machine

    Connection ID for optional team Postgres sync backend (nexql_sync schema).

    "postgresExplorer.sync.postgresConnectionId": ""
  • postgresExplorer.sync.pullIntervalMinutesPro

    Type
    number
    Default
    5
    Scope
    window (VS Code default)
    Range
    1 to any

    Interval in minutes for periodic sync pulls.

    "postgresExplorer.sync.pullIntervalMinutes": 5

Diagnostics 8

Turn on verbose logging to the NexQL Debug output channel, choose a telemetry mode (off, basic or detailed) and tune what is sent, and show a database's configuration.

5 commands in this area →

  • postgresExplorer.debug

    Type
    boolean
    Default
    false
    Scope
    machine

    Write verbose diagnostic logging to the NexQL Debug output channel. Off by default to keep SQL, schema, and AI payloads out of logs.

    "postgresExplorer.debug": false
  • postgresExplorer.telemetry.allowPerformance

    Type
    boolean
    Default
    false
    Scope
    window (VS Code default)

    Allow anonymized performance telemetry (duration/result-size buckets).

    "postgresExplorer.telemetry.allowPerformance": false
  • postgresExplorer.telemetry.allowUsage

    Type
    boolean
    Default
    true
    Scope
    window (VS Code default)

    Allow anonymous usage telemetry (commands/features/session counters).

    "postgresExplorer.telemetry.allowUsage": true
  • postgresExplorer.telemetry.flushIntervalMs

    Type
    number
    Default
    10000
    Scope
    window (VS Code default)
    Range
    1000 to any

    Telemetry flush interval in milliseconds.

    "postgresExplorer.telemetry.flushIntervalMs": 10000
  • postgresExplorer.telemetry.maxBatchSize

    Type
    number
    Default
    25
    Scope
    window (VS Code default)
    Range
    1 to 100

    Maximum number of events per telemetry batch.

    "postgresExplorer.telemetry.maxBatchSize": 25
  • postgresExplorer.telemetry.mode

    Type
    string
    Default
    "basic"
    Scope
    window (VS Code default)

    Telemetry collection mode. off disables telemetry. basic sends anonymous usage counters. detailed adds anonymized performance buckets.

    Allowed values

    • off
    • basic
    • detailed
    "postgresExplorer.telemetry.mode": "basic"
  • postgresExplorer.telemetry.posthogApiKey

    Type
    string
    Default
    built in
    Scope
    window (VS Code default)

    PostHog project API key. Keep empty to disable remote telemetry sink.

    "postgresExplorer.telemetry.posthogApiKey": ""
  • postgresExplorer.telemetry.posthogHost

    Type
    string
    Default
    "https://us.i.posthog.com"
    Scope
    window (VS Code default)

    PostHog ingestion host used for telemetry transport.

    "postgresExplorer.telemetry.posthogHost": "https://us.i.posthog.com"