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


European Robotics Hackathon 2025 Open For Entries
17/01/2025

ENRICH 2025, the European Robotics Hackathon, is open now for team entries. To be held at the Zwentendorf Nuclear Power Plant in Austria, the aim is to develop robots that can carry out tasks in a nuc [ ... ]



Robot Vacs Move Towards Real Robots
12/01/2025

Robot vacuum cleaners swept the floor at CES 2025 and while this might not seem very exciting, think again. Adding AI to these everyday home helpers has already made them more efficient at what they d [ ... ]


More News

espbook

 

Comments




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

Last Updated ( Wednesday, 29 January 2025 )