Kimberlite Getting started

Quick Start

On this page

Get Kimberlite running and execute your first SQL queries in 5 minutes.

Prerequisites

  • kimberlite binary installed — see Start

Step 1: Create a Project and Start the Dev Environment

# Interactive wizard — prompts for path and template
kimberlite init

# Or skip the wizard:
kimberlite init my-app
cd my-app
kimberlite dev

This starts:

  • Database server at 127.0.0.1:5432
  • Studio UI (if not using --no-studio)

Step 2: Open the REPL

In a new terminal:

kimberlite repl --tenant 1

You should see the Kimberlite REPL prompt:

◆ Kimberlite SQL REPL

  Server: 127.0.0.1:5432
  Tenant: 1

Type .help for help, .exit to quit. Tab for completion.

sql>

Step 3: Create a Table

CREATE TABLE patients (
    id BIGINT,
    name TEXT,
    dob TEXT,
    PRIMARY KEY (id)
);

Step 4: Insert Data

INSERT INTO patients VALUES (1, 'Jane Doe', '1980-01-15');
INSERT INTO patients VALUES (2, 'John Smith', '1992-07-22');
INSERT INTO patients VALUES (3, 'Alice Johnson', '1975-03-08');

Step 5: Query Data

-- All patients
SELECT * FROM patients;

-- Single patient by ID (point lookup)
SELECT * FROM patients WHERE id = 1;

-- Filter by name pattern
SELECT * FROM patients WHERE name LIKE 'J%';

Expected output:

 id  name           dob
 1   Jane Doe       1980-01-15
 2   John Smith     1992-07-22
 3   Alice Johnson  1975-03-08
(3 rows)

Step 6: Time-Travel Query

Kimberlite stores every change as an immutable log entry. Query the database at any past state:

-- Query at the current state (latest)
SELECT * FROM patients;

-- Insert a new record
INSERT INTO patients VALUES (4, 'Bob Williams', '1988-11-30');

-- Query at offset 3 (before the insert)
SELECT * FROM patients AT OFFSET 3;

What’s Next