Neat, this is much nicer than the stock sqlite3 CLI client! The pager behavior is a bit annoying, actually, since if my SELECT has more columns than can fit on screen, the pager switches to an alternate screen and when I quit, my results are hidden from me. Is it possible to turn this behavior off?
[append] Off for a specific query, I mean. I think I'd prefer to leave it on by default.
We use `less -XRF` by default. You can change this to whatever you want via the config file `~/.config/litecli/config`. Just uncomment the line that says `# pager = "less -SXRF".
Adding the `-S` to the list of options will make it much better. It will not wrap long lines but instead it will enable horizontal scrolling (using arrow keys).
Check for pager section on this page for some details: https://litecli.com/output/
The other option is to set the `auto_vertical_output = True` in the config file.
This option will cause results to be displayed vertically if they are too wide for the current window.
Thanks! I didn't even realize there was a documentation section. Looking closer, I probably missed it because it's called "Features" rather than "Documentation". I'll definitely use this for my daily SQLite work!
Doesn't seem to support sqlite3 dot commands such as .mode/.separator/.import/.output/.headers... (these are really implemented in sqlite3 CLI and not part of the sqlite library). These are, at least for me, among the main reasons to use the CLI in conjunction with SQLite. (The SQLite CLI is very good for massaging CSV data into the correct shape; as far as I know there is no canonical file extension for CLI scripts, I use .sqs, and the CLI has no parameter to run scripts directly, so you have to start the CLI manually and do .read foo.sqs).
Pip3 is usually a sign that you're installing into your system python packages instead of a virtualenv. The usual best practice is to use a virtualenv.
I see that this is based off of pgcli and the link above is from pgcli's blog page; presumably ownership is same between these two projects. What is the difference between LiteCLI and pgcli? I could not find it in the blog post nor the web page
DBCLI (https://www.dbcli.com/) is an open source org that made pgcli, mycli, mssql-cli etc.
LiteCLI is part of that org. So you can think of it as a clone of mycli that happens to work with SQLite.
The code base is largely similar between mycli and litecli. The changes are to support the SQLite backend and to support the dot commands (like .tables, .mode etc).
So the feature set should be same.
The DBCLI tools are not created by a single individual (anymore). We have a team of core devs and the lead maintainer for pgcli, mycli and litecli are all different people.
I have been using pgcli itself for many years and it is a fantastic piece of software. If you're a terminal user that deals with Postgresql, I highly recommend you try out pgcli!
Very cool. I tried it on Windows 8.1 and it works with some issues. For instance, I downloaded the SQLite sample DB (http://www.sqlitetutorial.net/sqlite-sample-database/). For some tables (albums, artists), doing a select * from table results in :
'charmap' codec can't encode character u'\xe3' in position 2052: character maps to <undefined>
Feature request: allow for snippet expansion. For instance, when I type 'ssf' + tab, it should expand to Select * From and show the table dropdown.
Personally I like to use ptipython (think a better version of the CLI for ipython) and SQLAlchemy whenever I'm debugging my SQLite databases. It's light, can install most places, and has my JEDI autocomplete.
It covers the powerful features of the prompt-toolkit library that is used to make this client.