GUIDES

Web REPL

Browser-based SQL console for interactive data exploration and prototyping.

Starting the REPL

The Web REPL launches a local HTTP server and opens a browser-based SQL console connected to the TeideDB engine via WebSocket.

npm run build    # first time only
npm run repl     # start server (open browser manually)
node bin/teide.js  # start server + auto-open browser

The REPL opens at http://127.0.0.1:3141. If port 3141 is busy, the server automatically increments to the next available port. Stop the server with Ctrl+C.

Interface Overview

The REPL interface is organized into several regions:

Loading Data

Use the .load dot-command to import CSV files. The table name defaults to the file’s base name, or you can specify one explicitly with as:

.load /path/to/sales.csv
.load /path/to/data.csv as mydata

You can also load data using SQL with read_csv():

SELECT * FROM read_csv('/path/to/sales.csv');
CREATE TABLE sales AS SELECT * FROM read_csv('/path/to/sales.csv');

Specifying Column Types

By default, column types are auto-detected. To override them, pass a comma-separated type list as a second argument:

.load data.csv types i32,sym,f64,i64
.load data.csv as sales types i32,sym,f64,i64

Or in SQL:

SELECT * FROM read_csv('data.csv', 'i32,sym,f64,i64');
CREATE TABLE t AS SELECT * FROM read_csv('data.csv', 'i32,sym,f64,i64');

Valid types: bool, u8, i16, i32, i64, f64, sym, date, time, timestamp. The type list must match the number of columns in the CSV.

Running Queries

Type SQL in the editor and press Ctrl+Enter to execute. Results appear in the Output tab below the editor.

SELECT * FROM sales;

SELECT category, SUM(price) AS total
FROM sales
GROUP BY category;

SELECT * FROM sales
WHERE price > 100
ORDER BY price DESC
LIMIT 10;

Dot-Commands

Dot-commands are special directives that control the REPL environment. They are not SQL statements and do not require a semicolon.

Command Description
.helpShow available dot-commands and usage information.
.tablesList all tables currently loaded in the session.
.schema [table]Show the column names and types for a table, or all tables if no argument is given.
.load <path> [as name] [types t1,t2,...]Load a CSV file into a table, optionally specifying column types.
.save <table> <path>Export a table to a CSV file on disk.
.timerToggle query execution timing display.
.clearClear the output pane.

Autocomplete

The editor provides context-aware SQL autocomplete powered by the server:

Bottom Pane Tabs

Output

Displays query results as a formatted table with virtual scrolling for large result sets. Column headers show the column name and data type. Dashed separators divide the header from the data rows. Use the toolbar buttons to Download CSV, Download JSON, or Copy the results to the clipboard.

Log

An append-only query log that records every executed statement with its timestamp, success/error status, and execution time in milliseconds.

Console

A JavaScript REPL for ad-hoc scripting. Type any JavaScript expression and press Enter to evaluate it. Use the Up and Down arrow keys to navigate through command history.

Keyboard Shortcuts

Shortcut Action
Ctrl+EnterExecute the current query in the editor.
TabAccept the selected autocomplete suggestion.
EscapeDismiss the autocomplete popup.
Double-click tabRename a bottom pane tab.
Up / Down (in Console)Navigate through Console command history.