Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zhangyuan/lindorm-cli
Unoffical Lindorm CLI for TSDB, written in Go and with better developer experience and less bugs.
https://github.com/zhangyuan/lindorm-cli
Last synced: 21 days ago
JSON representation
Unoffical Lindorm CLI for TSDB, written in Go and with better developer experience and less bugs.
- Host: GitHub
- URL: https://github.com/zhangyuan/lindorm-cli
- Owner: zhangyuan
- License: mit
- Created: 2024-01-24T09:08:30.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-01-26T09:08:09.000Z (11 months ago)
- Last Synced: 2024-10-27T14:35:25.775Z (2 months ago)
- Language: Go
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lindorm-cli
Unoffical Lindorm CLI for TSDB (时序引擎), written in Go and with better developer experience and less bugs.
## Usage
### Download the binary
Go to the [Releases](https://github.com/zhangyuan/lindorm-cli/releases) page to download the binary for specific platform. Optionally, rename the binary name to `lindorm-cli`.
### Setup the credentials
Set the database credentials via environment variables or `.env` file. e.g.
```.env
ENDPOINT=http://...
USERNAME=username
PASSWORD=password
DATABASE=database
```### Help
```
$ lindorm-cli --help
A lindorm-cli with less bugsUsage:
lindorm-cli [flags]
lindorm-cli [command]Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
query query the data via SQL statementsFlags:
-h, --help help for lindorm-cli
-v, --version version for lindorm-cliUse "lindorm-cli [command] --help" for more information about a command.
```### Run interactive command line interface
```bash
lindorm-cli
```Note that current the SQL statement must be provided as a single line without line break. Type `exit` to exit the interface.
### Run single statement with subcommand `query`
#### Provide the SQL statement via argument
Pass the SQL statement with `-s` option:
```bash
lindorm-cli query -s "select 1"
```Note that when the statement contains the backtick character(`` ` ``), it's tricky to provide the correct argument in Linux termimal. So use `-f` option below is a better option.
#### Provide the SQL statement via file
Pass the file path containing a SQL statement via `-f` option:
```bash
lindorm-cli query -f sql.sql
```