Skip to main content

Elastic command line tool

Project description

🧰 elastic-tool

elastic-tool is a command line tool for interacting with Elasticsearch. 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:

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

escli_tool-0.2.4.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

escli_tool-0.2.4-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file escli_tool-0.2.4.tar.gz.

File metadata

  • Download URL: escli_tool-0.2.4.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for escli_tool-0.2.4.tar.gz
Algorithm Hash digest
SHA256 f07f53daaaed37f4de032f73fda8a81d034e45ef871bd312b6de83041b0ce962
MD5 02b9174637696a1172dad8f9d46f661b
BLAKE2b-256 358a15d2659765817d9273ce654336f1c0dd5319fae82af844215562f8031363

See more details on using hashes here.

File details

Details for the file escli_tool-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: escli_tool-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for escli_tool-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 90ba66a9e9885a674e612787e58d6a9504d6bf0ce1dd92478841b6d0b9117570
MD5 cc4369a3d6b9e7d6b839c6322973d682
BLAKE2b-256 47189af0426ef22f3c52a7866f013da3513ddec416e49915c77ce9a5d0182382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page