dbcli / litecli

CLI for SQLite Databases with auto-completion and syntax highlighting
https://litecli.com
BSD 3-Clause "New" or "Revised" License
2.06k stars 67 forks source link

Feature comparison with SQLite CLI special commands (dot commands) #161

Closed lordgrenville closed 4 months ago

lordgrenville commented 10 months ago

Hi, apologies if this appears somewhere and I couldn't find it, but it would be helpful to see a list of which of the "dot-commands" in the SQLite CLI are implemented by litecli, and which aren't. (For example, .mode works, but not .backup.) I would imagine that many of these would be non-goals for this project, either because it accomplishes them in other ways or because they're outside of the scope, but it would be helpful to have a list in any case.

Thanks for making this great tool!

j-bennet commented 10 months ago

@lordgrenville

Thank you for using litecli! To see all commands in litecli, you can do \?:

test.db> \?
+------------+----------------------------+------------------------------------------------------------+
| Command    | Shortcut                   | Description                                                |
+------------+----------------------------+------------------------------------------------------------+
| .databases | .databases                 | List databases.                                            |
| .exit      | \q                         | Exit.                                                      |
| .import    | .import filename table     | Import data from filename into an existing table           |
| .indexes   | .indexes [tablename]       | List indexes.                                              |
| .load      | .load path                 | Load an extension library.                                 |
| .mode      | \T                         | Change the table format used to output results.            |
| .once      | \o [-o] filename           | Append next result to an output file (overwrite using -o). |
| .open      | .open                      | Change to a new database.                                  |
| .read      | \. filename                | Execute commands from file.                                |
| .schema    | .schema[+] [table]         | The complete schema for the database or a single table     |
| .status    | \s                         | Show current settings.                                     |
| .tables    | \dt                        | List tables.                                               |
| \G         | \G                         | Display current query results vertically.                  |
| \e         | \e                         | Edit command with editor (uses $EDITOR).                   |
| \f         | \f [name [args..]]         | List or execute favorite queries.                          |
| \fd        | \fd [name]                 | Delete a favorite query.                                   |
| \fs        | \fs name query             | Save a favorite query.                                     |
| help       | \?                         | Show this help.                                            |
| nopager    | \n                         | Disable pager, print to stdout.                            |
| notee      | notee                      | Stop writing results to an output file.                    |
| pager      | \P [command]               | Set PAGER. Print the query results via PAGER.              |
| prompt     | \R                         | Change prompt format.                                      |
| quit       | \q                         | Quit.                                                      |
| rehash     | \#                         | Refresh auto-completions.                                  |
| system     | system [command]           | Execute a system shell commmand.                           |
| tee        | tee [-o] filename          | Append all results to an output file (overwrite using -o). |
| watch      | watch [seconds] [-c] query | Executes the query every [seconds] seconds (by default 5). |
+------------+----------------------------+------------------------------------------------------------+

I agree that it would be nice to have a documentation page comparing the litecli vs sqlite commands. If you feel like making one, you can also contribute to the litecli website:

https://github.com/dbcli/litecli.com