Metadata-Version: 2.4
Name: escli_tool
Version: 0.2.3
Summary: elastic command line tool
Home-page: https://github.com/cosdt/elastic-tool
Author: Li Wang
License: Apache 2.0
Project-URL: Homepage, https://github.com/Potabk/elastic-tool
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: decorator
Requires-Dist: pyyaml
Requires-Dist: scipy
Requires-Dist: setuptools
Requires-Dist: setuptools-scm
Requires-Dist: requests
Requires-Dist: keyring
Requires-Dist: keyrings.alt
Requires-Dist: prettytable
Requires-Dist: matplotlib
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 🧰 elastic-tool

`elastic-tool` is a command line tool for interacting with [Elasticsearch](https://www.elastic.co/). It helps developers and data engineers to create, search, update, and delete indexes and documents via simple CLI commands.

---

## 📦 Installation

You can install the tool in **editable/development mode**:

```bash
git clone https://github.com/Potabk/elastic-tool.git
cd elastic-tool
pip install -e .
```
✅ After installation, the CLI command escli will be available in your terminal.

## Quick Start

### Check if CLI is available

```
escli --help
```
### Add domain and token
A domain and token is necessary to interact with es, you can follow the next step to ensure elastic is accessible.
There are currently two ways to add
- Environment variables:
set `ES_OM_DOMAIN` and `ES_OM_AUTHORIZATION` to have a login

- Keyring:
 Login through the command line, we will automatically store it in the operating system's keyring, In comparison, this method is safer and protects the secrets from being leaked.
 The login command looks like:
```
escli login --domain "your domain" --token "your token"
```


## Features
Create and delete Elasticsearch indexes

Insert, update, delete documents

Perform search queries (DSL or keyword-based)

Support both inline JSON and file-based input

Environment config via ES_OM_DOMAIN and ES_OM_AUTHORIZATION env vars

Check and filter _doc not existed in es
