![Logo](https://raw.githubusercontent.com/francis-du/iotdb-rs/main/iotdb-rs.png)

iotdb-cli

(WIP) Apache IotDB CLI Client written in Rust

[![License](https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square&color=%23E5531A)](https://github.com/francis-du/iotdb-cli/blob/main/LICENSE) [![Rust Build](https://img.shields.io/github/workflow/status/francis-du/iotdb-cli/cargo-test?label=build&style=flat-square)](https://github.com/francis-du/iotdb-cli/actions?query=workflow%3Acargo-test) [![Crates Publish](https://img.shields.io/github/workflow/status/francis-du/iotdb-cli/cargo-publish?label=publish&style=flat-square)](https://github.com/francis-du/iotdb-cli/actions?query=workflow%3Acargo-publish)

Installation

shell cargo install iotdb-cli

Usage

shell iotdb -h

```shell

▀██▀ ▄▄█▀▀██ █▀▀██▀▀█ ▀██▀▀█▄ ▀██▀▀█▄ ██ ▄█▀ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀▀█▄ ██ ▀█▄ ██ ██ ██ ██ ██ ██ ▄██▄ ▀▀█▄▄▄█▀ ▄██▄ ▄██▄▄▄█▀ ▄██▄▄▄█▀ 0.0.1

USAGE: iotdb [FLAGS] [OPTIONS] [sql] [SUBCOMMAND]

FLAGS: -d, --debug Enable debug mode -h, --help Prints help information -V, --version Prints version information

OPTIONS: --endpoint Set server endpoint, eg: host:port -H, --host Set server hostname or IP --log-level Set logger level -p, --password Set user password -P, --port Set server port -t, --timezone Set timezone, eg: UTC+8 -u, --user Set user name

ARGS: Execute sql like iotdb "SHOW STORAGE GROUP"

SUBCOMMANDS: file TODO: Execute sql from file help Prints this message or the help of the given subcommand(s)

```

  1. Connect to server

shell iotdb -u root -p root --endpoint 127.0.0.1:6667 -t UTC+8

  1. Exec SQL

shell $ iotdb "SHOW STORAGE GROUP" +---------------+ | storage group | +---------------+ | root.ln | | root.sg1 | +---------------+

```shell $ iotdb -u root -p root --endpoint 127.0.0.1:6667 -t UTC+8

▀██▀ ▄▄█▀▀██ █▀▀██▀▀█ ▀██▀▀█▄ ▀██▀▀█▄ ██ ▄█▀ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██▀▀▀█▄ ██ ▀█▄ ██ ██ ██ ██ ██ ██ ▄██▄ ▀▀█▄▄▄█▀ ▄██▄ ▄██▄▄▄█▀ ▄██▄▄▄█▀

IOTDB#(127.0.0.1:6667)> SHOW STORAGE GROUP +---------------+ | storage group | +---------------+ | root.ln | | root.sg1 | +---------------+ ```