https://github.com/pauldraper/relasticsearch-cli
https://github.com/pauldraper/relasticsearch-cli
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pauldraper/relasticsearch-cli
- Owner: pauldraper
- Created: 2021-08-21T18:35:54.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-21T18:36:04.000Z (almost 5 years ago)
- Last Synced: 2025-01-09T07:35:31.385Z (over 1 year ago)
- Language: Python
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RElasticsearch CLI
Elasticsearch CLI client
- [Overview](#overview)
- [Install](#install)
- [Usage](#usage)
- [Example](#example)
## Overview
This is a thin CLI wrapper around the ES API. Supports AWS IAM authentication.
## Install
```sh
pip3 install relasticsearch-cli
```
To install with AWS IAM support,
```sh
pip3 install relasticsearch-cli[aws]
```
## Usage
```txt
usage: es [-h] [--body BODY] [--aws-auth AWS_AUTH]
[--aws-domain AWS_DOMAIN] [--endpoint ENDPOINT]
[--username USERNAME]
{DELETE,GET,HEAD,PATCH,POST,PUT} path
positional arguments:
{DELETE,GET,HEAD,PATCH,POST,PUT}
HTTP method
path
optional arguments:
-h, --help show this help message and exit
--body BODY Request body
--aws-auth AWS_AUTH
--aws-domain AWS_DOMAIN
AWS domain
--endpoint ENDPOINT Endpoint URL, without the path
--username USERNAME Username for basic auth
```
## Example
List indices:
```sh
es --endpoint http://localhost:9200 GET /_cat/indices
```
```txt
green open .kibana_1 XTv6AdigRqWMafUfInRsTg 1 1
```
List indices for AWS Elasticsearch:
```sh
es --aws-domain example GET /_cat/indices
```