Skip to content

avalarin/elasticsearch-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Elasticsearch CLI

Build Status Coverage Status

Command-line interface for ElasticSearch

Installing

MacOS

TBD

Linux

TBD

From archive

  • Download the latest release from the releases page
  • Unpack it to the executable files directory (e.g. /usr/local/bin)
  • Make the elastic-cli binary executable chmod +x /usr/local/bin/elastic-cli

Configuration

Configuration file stored in your home directory - ~/.elastic-cli. Empty configuration file will be created at the first lanuch.

You need to register some elasticsearch server and set is as default:

elastic-cli config add server local --address http://localhost:9200 --index '*'
elastic-cli config use server local

Usage

Examples:

elastic-cli search -q 'level: Error'
elastic-cli search -q 'level: Error' -o json
elastic-cli search -q 'level: Error' -o '{level} {message}'
elastic-cli search -q 'level: Error' -f 'level,message'

For more documentation use help:

elastic-cli help
elastic-cli search --help
elastic-cli config --help