#elasticsearch

app cli-es

A CLI interface for ElasticSearch

2 releases

0.1.1 Jan 20, 2020
0.1.0 Nov 10, 2019

#44 in #elasticsearch

MIT license

19KB
471 lines

cli-es

cli-es is a cli interface for ElasticSearch.

It is still early in development.

Only a few features have been implemented and the API is subject to change.

Currently you can create/delete and list indices, you can create snapshots repositories and create snapshots.

Examples

cli-es --help

By default, cli-es will try to connect to http://localhost:9200. If you want to hit a different host, you can either use the ES_HOST environment variable, or pass in a -h or --host argument to cli-es.

cli-es
ES_HOST=http://elasticsearch:9200 cli-es
cli-es -h http://es:9200 index --help

Create an index named books with 5 primary shards and 3 replicas

cli-es index create books --shards 5 --replicas 3

Get information about the books index

cli-es index books

Create snapshot repository (Must be done before creating a snapshot)

cli-es snapshot repository create /var/backups my_backups

Create snapshot

cli-es snapshot create my_backups newest_backup_1 --wait-for-completion

Dependencies

~12–23MB
~349K SLoC