Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

eshepelyuk/pykli

Repository files navigation

pyKLI

Ruff Poetry PyPI - Version PyPI - Python Version PyPI - License

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 Pygments SQL.

  • Pretty tabular output with highlighting based on Pygments themes.

  • Supported KSQL commands.

    • SHOW, LIST
    • DESCRIBE, without EXTENDED
    • DROP
    • CREATE
    • RUN SCRIPT
    • TERMINATE
    • SELECT for Pull queries
    • INSERT
    • DEFINE, UNDEFINE

TODO (prioritized)

  • Push queries, i.e. with EMIT CHANGES for SELECT statement
  • PAUSE / RESUME
  • KSQL syntax support with Pygments
  • DESCRIBE ... EXTENDED
  • EXPLAIN
  • 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 WITH blocks
  • In-place KSQL editing with default editor
  • Internal help
  • More configuration options and configuration file
    • pygments theme
    • server profiles
    • etc etc