pyKLI
August 8, 2023 ยท View on GitHub
Interactive command line client for ksqlDB with autocompletion and syntax highlighting written in Python.
Inspired by and also borrowed some code from the great family of CLI tools https://www.dbcli.com/.
The project is in early stage, but usable for supported functionality.
All your PRs and suggestions are welcome.
Installation
- Latest released version
pip install pykli
- From latest source code
pip install -U git+https://github.com/eshepelyuk/pykli@main
Features
-
Command history and search, history based autosuggestion.
-
KSQL command keywords autocompletion.
-
Run multiple commands from local file.
-
Partial KSQL syntax highlighting based on
PygmentsSQL. -
Pretty tabular output with highlighting based on
Pygmentsthemes. -
Supported KSQL commands.
SHOW,LISTDESCRIBE, withoutEXTENDEDDROPCREATERUN SCRIPTTERMINATESELECTfor Pull queriesINSERTDEFINE,UNDEFINE
TODO (prioritized)
- Push queries, i.e. with
EMIT CHANGESforSELECTstatement PAUSE/RESUME- KSQL syntax support with Pygments
DESCRIBE ... EXTENDEDEXPLAIN- Auto detect when needed output via pager
- Metadata autocompletion
- table ans stream names
- column names and functions in queries
- topic and connector names
- session variables
- attributes of
WITHblocks
- In-place KSQL editing with default editor
- Internal help
- More configuration options and configuration file
- pygments theme
- server profiles
- etc etc