Skip to content

generate turso:// URLs for Turso databases - #1059

Merged
penberg merged 1 commit into
mainfrom
turso-url-scheme
Jul 27, 2026
Merged

generate turso:// URLs for Turso databases#1059
penberg merged 1 commit into
mainfrom
turso-url-scheme

Conversation

@glommer

@glommer glommer commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

Databases identified as Turso (via the UUID type byte, id[5] == 0x10) now display turso:// URLs instead of libsql:// in db list, db show, and the shell's connection banner. SQLite databases keep libsql://.

The built-in shell also accepts turso:// URLs: the scheme is rewritten to libsql right after parsing, since libsql-shell-go only understands libsql/ws/wss/http/https. The shell library is quite legacy at this point and the CLI should be moving to the tursodb binary anyway, so for now the rewrite is just hacked in on the CLI side rather than teaching the library about turso://.

Instance URLs (--instance-url) still use libsql://, since instances are a sqld-only concept.

Includes a new TestGetDatabaseUrl covering Turso, SQLite, and empty-ID cases, and updates the list test to expect the new scheme.

🤖 Generated with Claude Code

Databases identified as Turso (via the UUID type byte) now display
turso:// URLs instead of libsql:// in db list, db show, and the shell
banner. The built-in shell also accepts turso:// URLs, rewriting the
scheme to libsql before handing it to libsql-shell-go, which only
understands libsql/ws/http schemes.

The shell library is quite legacy at this point, and we should be
moving the CLI to the tursodb binary anyway, so for now we just hack
the scheme rewrite here rather than teaching the library about
turso://.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@penberg
penberg merged commit f10150c into main Jul 27, 2026
1 check passed
@penberg
penberg deleted the turso-url-scheme branch July 27, 2026 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants