litecli icon indicating copy to clipboard operation
litecli copied to clipboard

FR: Allow opening database readonly

Open ilyagr opened this issue 3 months ago • 1 comments

In sqlite3 CLI, this can be achieve with the --readonly CLI argument or with the .open command, .open --readonly /path/to/db.

litecli should support the same.

Let me know if there's another way to open a db readonly in litecli that I missed.

ilyagr avatar Sep 21 '25 22:09 ilyagr

We don't have the --readonly option yet.

In the meantime you can open a DB in readonly mode using the URI syntax. You need 1.17.0 for this to work

eg:

litecli "file:/absolute/path/to/dbname?mode=ro"

amjith avatar Sep 28 '25 21:09 amjith