Sqlime - Αn Online SQLite Playground
Written by Nikos Vaggalis   
Tuesday, 28 January 2025

SQLite lives in the browser thanks to WebAssembly. With Sqlime you can run your workload online with no need of setting up anything. On top of that ask questions on your data with AI enabled CLI utilities. 

WebAssembly paved the way. Thanks to it we have DBMSs like PostgreSQL and DuckDB in the browser, and
now it's time for SQLite to join them. In fact, the port of SQLite to WebAssembly was done in 2022 and Sqlime utilizes that to provide an online playground for quickly debugging and sharing SQL snippets, all inside your browser. That means you get a local-first, no data ever leaves your browser, disposable SQLite instance without the hassle of having to set anything up

The twist here is that you can conveniently also import a binary database as a file and not just a SQL schema which then you have to build and afterwards load data into it.

Sqlime provides a full-featured SQL implementation, including indexes, triggers, views, transactions, CTEs, window functions and execution plans.

It also includes essential SQLite extensions, from math statistics and regular expressions to hash functions and dynamic SQL;
other than that there's zero third-party dependencies.

 

In order to use the sharing capability, the database and queries need to be stored somewhere so that you can share a link to the prepared playground.

Fortunately, there is a GitHub Gist API that perfectly fits all criteria. All the user needs is to specify the Github API token, GitHub credentials are stored locally and queries are saved as private GitHub gists within your account.

You can also connect an OpenAI account to get help with your queries using ChatGPT, which can explain, teach, and troubleshoot your SQL. OpenAI credentials are stored locally as well.

If you want to experience it without having to load your own database first, there's already one pre-loaded for you to fiddle, in try-before-buy fashion. Well the 'buy' does not apply in this case because the playground provided for free!

As far as asking questions on SQLite databases using LLMs, there's also a new utility out that runs in your terminal and works on local sqlite installations. This is the new plugin sqlite-utils-ask for the sqlite-utils CLI tool.

After you install it:

 sqlite-utils install sqlite-utils-ask

you can straight up ask questions on your SQLite databases as well as CSV/JSON files inside your terminal:

 curl -O https://datasette.io/content.db

 sqlite-utils ask content.db "how many sqlite-utils pypi   downloads in 2024?"

It picks up API keys from an OPENAI_API_KEY environment variable, or you can install LLM and use llm keys set openai to store a key in a configuration file.

Sqlime is not just available as an online playground, but can also be self-hosted by cloning its Github repo. Enjoy!

sqllimelogo

More Information

Sqlime
Sqlime on Github
sqlite-utils-ask

Related Articles

database.build - In Browser Postgres Sandbox With AI Assistance

DuckDB + Webassembly = WhatTheDuck

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Ingres vs Postgres MVCC Explained With Neo4j's LLM Knowledge Graph Builder
14/04/2025

LLM Knowledge Graph Builder is an application designed to turn
unstructured data such as pdfs, text documents, YouTube videos, and web pages, into a knowledge graph stored in Neo4j, promising much bet [ ... ]



Action Figure Craze Overruns OpenAI
13/04/2025

If you're on social media, you'll probably have seen a lot of 'action figure' posts, where people show off images of themselves, their dog or their cat in the form of an action figure, complete with s [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Wednesday, 29 January 2025 )