https://github.com/tddschn/questdb-shell
QuestDB Command Line Shell With Keyword and Table Name Auto-Completion
https://github.com/tddschn/questdb-shell
autocompletion questdb questdb-cli questdb-shell rlwrap
Last synced: 9 months ago
JSON representation
QuestDB Command Line Shell With Keyword and Table Name Auto-Completion
- Host: GitHub
- URL: https://github.com/tddschn/questdb-shell
- Owner: tddschn
- Created: 2025-04-01T00:32:29.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-04-01T00:42:00.000Z (9 months ago)
- Last Synced: 2025-04-01T01:31:39.658Z (9 months ago)
- Topics: autocompletion, questdb, questdb-cli, questdb-shell, rlwrap
- Language: Shell
- Homepage: https://teddysc.me/blog/rlwrap-questdb-shell
- Size: 0 Bytes
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# QuestDB Command Line Shell With Keyword and Table Name Auto-Completion
Web Console is nice, but I miss the terminal -
Write up and demo: https://teddysc.me/blog/rlwrap-questdb-shell
See also `questdb-rest` that provides the CLI this shell depends on:
- Write up and demo: https://teddysc.me/blog/questdb-rest
- GitHub: https://github.com/tddschn/questdb-rest
- PyPI: https://pypi.org/project/questdb-rest/
## Installation
- Install rlwrap with your package manager, for Homebrew it's `brew install rlwrap`
- `pipx install questdb-shell && qdb-cli gen-config`, edit the config if your db instance is not running on `localhost:9000` ([doc](https://github.com/tddschn/questdb-rest))
- Clone this repo and copy `questdb-shell` to your `$PATH`
Then run `questdb-shell` to start the shell, and test with `tables` query to see if it works.
## Screenshots


2nd screenshot shows autocompletion of both table names and SQL keywords. The `chhist_*` tables stores my chrome history dump for further analysis 🙃.
## Demo (1 min)
I use tab to trigger completion auggestions of table names and [SQL keywords](https://github.com/questdb/sql-grammar).
Half way through the demo, I accidentally made a query that returned 10 million rows (the `equities_1d` table), and I had to `Control-Z` to put the process in the background (since it wasn't responding to `Control-C`) and killed it with `kill %1` 😊.
https://www.youtube.com/watch?v=Z_36FI_DDDQ