libSQL Client (TypeScript)

The TypeScript/JavaScript driver for libSQL and Turso databases

SDK
npm
v0.17.4
574stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
57/100Fair
Development Activity36
Maintenance32
Community68
Maturity52
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
76/100Good
Architecture80
Code Quality76
Innovation78
Learning Curve68

@libsql/client is the official TypeScript/JavaScript driver for libSQL, the open-source fork of SQLite that powers Turso’s distributed database platform. A single createClient({ url }) call gives you a promise-based API (execute, batch, transaction) that works identically whether you’re pointed at a local SQLite file, a remote Turso database over HTTP/WebSocket, or an offline-first “embedded replica” that syncs periodically with a remote primary.

The client automatically selects the right transport based on the connection URL scheme — native SQLite bindings for local files, WebSocket (Hrana protocol) or HTTP for remote databases — so application code stays the same regardless of deployment target. It’s built on the shared @libsql/core package (config parsing, error types, SQL value conversion) alongside sibling packages for WASM (@libsql/client-wasm) and edge/serverless runtimes.

What You Get

  • A unified Client API (execute, batch, transaction) that works the same for local files, remote Turso databases, and in-memory databases
  • Embedded Replicas support — a local SQLite file that periodically syncs with a remote Turso primary via syncUrl/syncInterval, enabling offline reads with eventual sync
  • Encryption-at-rest support for local database files
  • Native integration with Turso’s AI/vector search features for similarity queries directly from SQL
  • Runtime-specific entry points (node.ts, web.ts, plus a companion @libsql/client-wasm package) so the same driver works in Node.js, browsers, and edge runtimes like Vercel/Netlify/Lambda

Common Use Cases

  • Building serverless/edge applications (Vercel, Netlify, Lambda) that need a lightweight SQL database without managing connection pools
  • Multi-tenant SaaS apps that provision one SQLite/Turso database per tenant instead of sharing rows in a single large database
  • Offline-first apps that read/write to a local SQLite file via Embedded Replicas while syncing changes to a remote Turso primary in the background
  • Adding vector similarity search alongside relational data in the same SQLite-compatible database

Under The Hood

ArchitecturecreateClient (packages/libsql-client/src/node.ts) inspects the config’s URL scheme and dispatches to one of three internal client implementations: _createSqlite3Client for local file:/in-memory databases (native SQLite bindings, sqlite3.ts, ~620 lines), _createWsClient for the Hrana WebSocket protocol (ws.ts/hrana.ts, together ~930 lines), or _createHttpClient for HTTP-based remote access (http.ts, ~340 lines) — all three conform to the same Client interface defined in the shared @libsql/core package, so callers never touch transport-specific code directly.

Tech Stack — TypeScript for the driver logic (65% of the repo) with a Rust/native component underneath for local SQLite file access, plus supporting Python tooling (29%) for the monorepo’s test/CI infrastructure. The workspace splits into @libsql/core (shared config/error/value-conversion types), @libsql/client (this package, Node-oriented), and @libsql/client-wasm (browser/edge-oriented, no native bindings).

Code Quality — Core logic is covered by __tests__/ unit tests (uri.test.ts, config.test.ts, client.test.ts) plus a separate smoke_test/ directory with real deployment smoke tests against Vercel and Cloudflare Workers runtimes — a meaningful signal given the package’s explicit goal of working correctly across multiple JS runtimes, not just Node. Release history is thin on GitHub Releases (only one tagged release) despite frequent npm publishes and ~3 commits/month, suggesting versions are cut more informally than via GitHub’s release flow.

API Design — The single createClient(config) entry point with a uniform execute/batch/transaction API across three different transports is a deliberately low-friction design — switching a project from local SQLite to a remote Turso database (or adding Embedded Replicas) is a config change, not a code rewrite. The trade-off is that Config’s scheme-based dispatch (file:, http(s):, ws(s):) is implicit “magic” that developers need to learn from docs rather than the type system alone.

Used by 14 apps in this directory

TypeScript
84%
MIT

Amical

Note Taking · AI Assistants

1,495

Local-first AI dictation that understands your active app — private, offline, and built for speed.

View details
79
Repo Health
82
Technical
67
Dependency
Built with
TypeScript84%
Updated 3 weeks ago
TypeScript
92%
GPL 3.0

Blinko

Knowledge Management · Note Taking

10,880

A self-hosted, AI-powered card note-taking tool that lets you capture fleeting thoughts instantly and retrieve them with natural language search.

View details
83
Repo Health
69
Technical
65
Dependency
Built with
TypeScript92%
Updated 2 weeks ago
TypeScript
99%
Apache 2.0

Bubble Lab

Automation · AI Development

1,095

Open-core workflow engine for building AI-powered automations in TypeScript that run natively inside Slack — no context switching required.

View details
35
Repo Health
78
Technical
72
Dependency
Built with
TypeScript99%
Updated 3 months ago
TypeScript
72%
Other

Epicenter

Knowledge Management · Note Taking · Developer Tools

4,761

A local-first monorepo led by Whispering, an open-source speech-to-text app, built on an MIT toolkit that turns your data into plain Markdown and SQLite files you own instead of a database you rent.

View details
88
Repo Health
90
Technical
68
Dependency
Built with
TypeScript72%
Svelte15%
Updated today
TypeScript
93%
Apache 2.0

flue

AI Agents · Developer Tools

7,953

Build autonomous AI agents and powerful workflows with a programmable TypeScript harness that gives any model sessions, tools, sandboxes, and durable execution.

View details
67
Repo Health
82
Technical
75
Dependency
Built with
TypeScript93%
Updated 1 weeks ago
MDX
50%
Apache 2.0

Formizee

Forms Surveys

183

An open-source form backend and builder platform — design forms, collect submissions, and get analytics without hosting your own server, positioned as an alternative to Formspree and Typeform.

View details
28
Repo Health
59
Technical
68
Dependency
Built with
MDX50%
TypeScript49%
Updated 1 years ago
TypeScript
99%
Apache 2.0

Mastra Code

AI Code Assistants

27,294

"A coding agent that never compacts" — a terminal-based AI coding agent built on the Mastra framework, with Observational Memory instead of context compaction, multi-model support, and OAuth login for Claude Max or ChatGPT Plus.

View details
88
Repo Health
73
Technical
66
Dependency
Built with
TypeScript99%
Updated today
JavaScript
94%
AGPL 3.0

MyApi

AI Agents

23

A privacy-first personal API gateway for AI agents — connect your services once, issue scoped tokens to agents like OpenClaw, Hermes, or Claude Code, and keep a full audit trail instead of scattering raw credentials across .env files.

View details
32
Repo Health
64
Technical
74
Dependency
Built with
JavaScript94%
Updated yesterday
TypeScript
96%
MIT

open-seo

Marketing · Developer Tools

12,596

Pay-as-you-go open source SEO platform with MCP integration — keyword research, rank tracking, backlinks, site audits, and AI brand visibility in one self-hosted tool.

View details
83
Repo Health
79
Technical
78
Dependency
Built with
TypeScript96%
Updated today

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search