VS Code

VS Code Extension β€” WoWSQL Docs

VS Code Extension

WoWSQL database management and development tools for VS Code

Official extension: View on VS Code Marketplace β†’

Introduction

The WoWSQL VS Code Extension brings all database operations directly into your IDE, creating a seamless, integrated development experience. Eliminate context switching and manage your WoWSQL databases, migrations, and storage without leaving VS Code.

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for "WoWSQL"
  4. Click Install

From VSIX File

Install from a local VSIX file:

code --install-extension wowsql-1.3.0.vsix

Features

Database Explorer

Browse tables, views, and columns in a visual tree view. See your database structure at a glance without leaving the editor.

Migration Management

View and manage database migrations. See migration status (applied, pending, rolled back) and apply or rollback migrations.

Storage Browser

Browse and manage storage files. View file sizes, storage quota, and organize your files directly from VS Code.

Query Execution

Execute SQL queries directly from VS Code. Test queries instantly and see results without switching tools.

TypeScript Type Generation

Generate TypeScript types from your database schema automatically. Keep your types in sync with your database.

Integrated Workflow

All database operations in one place. No context switching, faster development, better focus.

Configuration

Configure the extension through VS Code settings:

Settings

Open VS Code Settings (File β†’ Preferences β†’ Settings) and configure:

SettingDescriptionDefault
wowsql.apiUrl WoWSQL API URL https://api.wowsql.com
wowsql.projectSlug Default project slug ""

Configuration via settings.json

You can also configure via settings.json:

{
  "wowsql.apiUrl": "https://api.wowsql.com",
  "wowsql.projectSlug": "my-project"
}

Getting Started

Step 1: Connect to WoWSQL

  1. Open Command Palette (Ctrl+Shift+P / Cmd+Shift+P)
  2. Type "WoWSQL: Connect"
  3. Enter your API URL (or use default)
  4. Enter your API key (get it from WoWSQL Dashboard)
  5. Enter your project slug

Step 2: Browse Your Database

Once connected, you'll see the WoWSQL sidebar with three views:

  • WoWSQL Database - Browse tables and columns
  • WoWSQL Migrations - View and manage migrations
  • WoWSQL Storage - Browse storage files

Step 3: Execute Queries

Right-click on any table in the Database Explorer and select "Execute Query" to run a quick query:

SELECT * FROM users LIMIT 10

Step 4: Generate TypeScript Types

Generate TypeScript types from your database schema:

  1. Open Command Palette
  2. Type "WoWSQL: Generate TypeScript Types"
  3. Select output location
  4. Types are generated automatically

Available Commands

Access commands via Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

CommandDescription
WoWSQL: Connect Connect to a WoWSQL project
WoWSQL: Disconnect Disconnect from WoWSQL
WoWSQL: Logout Logout from WoWSQL
WoWSQL: Refresh Database Refresh the database explorer
WoWSQL: Execute Query Execute a SQL query
WoWSQL: Generate TypeScript Types Generate TypeScript types from schema
WoWSQL: Apply Migration Apply a pending migration
WoWSQL: Rollback Migration Rollback the last migration

Database Explorer

The Database Explorer provides a visual tree view of your database structure:

  • Tables - Expand to see columns
  • Columns - View column types and details
  • Right-click Menu - Execute queries, view table data

Table Operations

Right-click on any table to access:

  • Execute Query - Run a quick SELECT query
  • View Table Data - Browse table rows
  • Generate Types - Create TypeScript types for the table

Migration Management

View and manage database migrations in the Migrations view:

  • Migration List - See all migrations with status indicators
  • Status - Applied, Pending, or Rolled Back
  • Apply Migration - Right-click to apply pending migrations
  • Rollback Migration - Rollback the last applied migration

Storage Browser

Browse and manage your storage files:

  • File List - View all files in your storage
  • File Sizes - See file sizes displayed
  • Storage Quota - Monitor your storage usage
  • Folder Structure - Navigate through folders

TypeScript Type Generation

Automatically generate TypeScript types from your database schema:

  1. Connect to your WoWSQL project
  2. Open Command Palette
  3. Run "WoWSQL: Generate TypeScript Types"
  4. Select output file location
  5. Types are generated matching your database schema
Type Safety: Generated types ensure type-safe database operations, catch errors at compile time, and provide IDE autocomplete for database types.

Workflow Benefits

Before Extension

  1. Write code in VS Code
  2. Switch to terminal β†’ Run CLI commands
  3. Switch to web dashboard β†’ Check database
  4. Switch to SQL client β†’ Execute queries
  5. Switch back to VS Code β†’ Continue coding

Time: ~5-10 minutes per operation | Friction: High

After Extension

  1. Write code in VS Code
  2. Click sidebar β†’ Browse database
  3. Right-click table β†’ Execute query
  4. Generate types β†’ Continue coding

Time: ~30 seconds per operation | Friction: Low

Result: 10-20x faster for common operations! No context switching means faster development and better focus.

Troubleshooting

Extension Not Appearing

  • Ensure VS Code version is 1.80.0 or higher
  • Reload VS Code window (Ctrl+R / Cmd+R)
  • Check if extension is enabled in Extensions view

Connection Issues

  • Verify your API URL is correct
  • Check that your API key is valid
  • Ensure your project slug is correct
  • Check your internet connection

Commands Not Available

  • Make sure you're connected to a WoWSQL project
  • Check that the extension is activated
  • Try reloading the VS Code window

Development

To contribute or build from source:

# Clone the repository
git clone https://github.com/WoWSQL/cli.git
cd cli/vscode-extension

# Install dependencies
npm install

# Compile TypeScript
npm run compile

# Watch for changes (development)
npm run watch

# Package extension
npm run package

Support

For issues, feature requests, or questions: