2026-05-07 15:01:18 +02:00
|
|
|
[](https://ci.codeberg.org/repos/16999)
|
|
|
|
|
|
2026-04-21 10:17:16 +02:00
|
|
|
# esctl
|
|
|
|
|
|
2026-04-21 10:50:09 +02:00
|
|
|
Elasticsearch CLI
|
|
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
```console
|
|
|
|
|
NAME:
|
|
|
|
|
esctl - manage elasticsearch from cli
|
|
|
|
|
|
|
|
|
|
USAGE:
|
|
|
|
|
esctl [global options] [command [command options]]
|
|
|
|
|
|
|
|
|
|
VERSION:
|
2026-05-05 12:06:34 +02:00
|
|
|
v0.0.4
|
2026-04-21 10:50:09 +02:00
|
|
|
|
|
|
|
|
COMMANDS:
|
2026-04-28 13:46:28 +02:00
|
|
|
search, / search within an index
|
|
|
|
|
index, i manage indicies
|
|
|
|
|
snapshot, snap manage snapshots
|
|
|
|
|
cluster, c manage cluster[s]
|
2026-05-05 12:06:34 +02:00
|
|
|
node, snap manage nodes
|
2026-04-28 13:46:28 +02:00
|
|
|
help, h Shows a list of commands or help for one command
|
2026-04-21 10:50:09 +02:00
|
|
|
|
|
|
|
|
GLOBAL OPTIONS:
|
2026-04-28 13:46:28 +02:00
|
|
|
--debug, -d enable debugging [$ES_DEBUG]
|
|
|
|
|
--config string, -c string config file [$ES_CONFIG]
|
|
|
|
|
--cluster string, -C string cluster alias to work with
|
|
|
|
|
--help, -h show help
|
|
|
|
|
--version, -v print the version
|
2026-04-21 10:50:09 +02:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Configure `esctl` with environment variables:
|
|
|
|
|
|
|
|
|
|
- `ES_URI`: elasticsearch uri
|
|
|
|
|
- `ES_USER`: username
|
|
|
|
|
- `ES_PASS`: password
|
|
|
|
|
|
2026-04-28 13:46:28 +02:00
|
|
|
Or create a config file such as this:
|
|
|
|
|
|
|
|
|
|
```yaml
|
|
|
|
|
clusters:
|
|
|
|
|
default:
|
|
|
|
|
uri: https://es.foo.bar:9200/
|
|
|
|
|
user: elastic
|
|
|
|
|
pass: 123456
|
|
|
|
|
other:
|
|
|
|
|
uri: https://myes.foo:9200/
|
|
|
|
|
user: elastic
|
|
|
|
|
pass: asdasdasd
|
|
|
|
|
```
|
|
|
|
|
|
2026-04-29 10:26:53 +02:00
|
|
|
and specify it with `-c configfile`. You may also put clusters into a
|
|
|
|
|
default config file in `~/.config/esctl/config.yaml`. In this case you
|
|
|
|
|
can omit `-c ...`.
|
|
|
|
|
|
2026-04-28 13:46:28 +02:00
|
|
|
If you want to work on a specific cluster, specify its name with the
|
|
|
|
|
global `-C` option.
|
|
|
|
|
|
2026-04-21 10:50:09 +02:00
|
|
|
## Introduction
|
|
|
|
|
|
|
|
|
|
FIXME
|
|
|
|
|
|
|
|
|
|
## Installation
|
|
|
|
|
|
|
|
|
|
The tool does not have any dependencies. Just download the binary for
|
|
|
|
|
your platform from the releases page and you're good to go.
|
|
|
|
|
|
|
|
|
|
### Installation using a pre-compiled binary
|
|
|
|
|
|
|
|
|
|
You can use [stew](https://github.com/marwanhawari/stew) to install esctl:
|
|
|
|
|
```default
|
|
|
|
|
stew install https://codeberg.org/scip/esctl
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Or go to the [latest release page](https://codeberg.org/scip/esctl/releases/)
|
|
|
|
|
and look for your OS and platform. There are two options to install the binary:
|
|
|
|
|
|
|
|
|
|
Directly download the binary for your platform,
|
|
|
|
|
e.g. `esctl-linux-amd64-0.0.2`, rename it to `esctl` (or whatever
|
|
|
|
|
you like more!) and put it into your bin dir (e.g. `$HOME/bin` or as
|
|
|
|
|
root to `/usr/local/bin`).
|
|
|
|
|
|
|
|
|
|
Be sure to verify the signature of the binary file. For this also
|
|
|
|
|
download the matching `esctl-linux-amd64-0.0.2.sha256` file and:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
cat esctl-linux-amd64-0.0.2.sha25 && sha256sum esctl-linux-amd64-0.0.2
|
|
|
|
|
```
|
|
|
|
|
You should see the same SHA256 hash.
|
|
|
|
|
|
|
|
|
|
You may also download a binary tarball for your platform, e.g.
|
|
|
|
|
`esctl-linux-amd64-0.0.2.tar.gz`, unpack and install it. GNU Make is
|
|
|
|
|
required for this:
|
|
|
|
|
|
|
|
|
|
```shell
|
|
|
|
|
tar xvfz esctl-linux-amd64-0.0.2.tar.gz
|
|
|
|
|
cd esctl-linux-amd64-0.0.2
|
|
|
|
|
sudo make install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
### Installation from source
|
|
|
|
|
|
|
|
|
|
Check out the repository and execute `go build`, then copy the
|
|
|
|
|
compiled binary to your `$PATH`.
|
|
|
|
|
|
|
|
|
|
Or, if you have GNU Make installed, just execute:
|
|
|
|
|
|
|
|
|
|
```default
|
|
|
|
|
make
|
|
|
|
|
sudo make install
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
# Report bugs
|
|
|
|
|
|
|
|
|
|
[Please open an issue](https://codeberg.org/scip/esctl/issues). Thanks!
|
|
|
|
|
|
|
|
|
|
# License
|
|
|
|
|
|
|
|
|
|
This work is licensed under the terms of the General Public Licens
|
|
|
|
|
version 3.
|
|
|
|
|
|
|
|
|
|
# Author
|
|
|
|
|
|
|
|
|
|
Copyleft (c) 2026 Thomas von Dein
|