sqlite-utils icon indicating copy to clipboard operation
sqlite-utils copied to clipboard

Ability to pass a URI to the CLI tools

Open simonw opened this issue 9 months ago • 1 comments

Thread: https://mastodon.xyz/@Profpatsch/114083481108799334

Goal is to support something like:

sqlite-utils query foo.db?inmutable=1 "select * from bar"

Might need a --uri option?

simonw avatar Mar 01 '25 23:03 simonw

Relevant docs: https://www.sqlite.org/uri.html

simonw avatar Mar 01 '25 23:03 simonw

Came here to complain about:

$ sqlite-utils --version
sqlite-utils, version 4.0a0

$ sqlite-utils tables 'file:store.sqlite?mode=ro&immutable=1'
Usage: sqlite-utils tables [OPTIONS] PATH
Try 'sqlite-utils tables -h' for help.

Error: Invalid value for 'PATH': File 'file:store.sqlite?mode=ro&immutable=1' does not exist.

$ sqlite3 'file:store.sqlite?mode=ro&immutable=1' .schema
[dumps schema as expected]

Happy to see that this already has an issue (now secretly pushed a bit).

fry69 avatar Oct 10 '25 11:10 fry69