generate turso:// URLs for Turso databases - #1059
Merged
Merged
Conversation
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
approved these changes
Jul 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Databases identified as Turso (via the UUID type byte,
id[5] == 0x10) now displayturso://URLs instead oflibsql://indb list,db show, and the shell's connection banner. SQLite databases keeplibsql://.The built-in shell also accepts
turso://URLs: the scheme is rewritten tolibsqlright after parsing, sincelibsql-shell-goonly understandslibsql/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 aboutturso://.Instance URLs (
--instance-url) still uselibsql://, since instances are a sqld-only concept.Includes a new
TestGetDatabaseUrlcovering Turso, SQLite, and empty-ID cases, and updates the list test to expect the new scheme.🤖 Generated with Claude Code