Elasticsearch Cluster Manager — manage multiple local Elasticsearch clusters from the CLI.
Run isolated ES clusters per project, switch between them instantly, and never touch config files manually.
esctl start myapp
esctl list
esctl stop myapp
curl -fsSL https://raw.githubusercontent.com/prvn-codes/esctl/main/bin/esctl \
-o /usr/local/bin/esctl && chmod +x /usr/local/bin/esctlbrew tap prvn-codes/tap
brew trust prvn-codes/tap # required for third-party taps
brew install esctlHomebrew requires trusting third-party taps before installing. This is a one-time step.
| Tool | Required | Notes |
|---|---|---|
jq |
Yes | Auto-installed via Homebrew if missing |
curl |
No | Used for HTTP readiness checks |
| Elasticsearch | Yes | Any version — see Auto-detect |
esctl finds your Elasticsearch binary automatically in this order:
$ESCTL_ES_BINenv var- evm installations in
~/.evm(latest version picked automatically) elasticsearchon your$PATH- Common paths:
/usr/local/bin,/opt/homebrew/bin,/usr/share/elasticsearch/bin
Works with evm, Homebrew, manual installs — anything.
esctl <command> [cluster]
COMMANDS
start [cluster] Start a cluster (or all if omitted); --verbose to stream logs
stop [cluster] Stop a cluster (or all if omitted)
restart [cluster] Restart a cluster (or all if omitted); --verbose to stream logs
status [cluster] Show cluster status
list List all clusters with live status
add Add a new cluster (interactive)
edit <cluster> Edit a cluster's configuration
remove <cluster> Remove a cluster
logs <cluster> Tail cluster logs (-f to follow)
setup Configure environment interactively
import Detect and import running clusters
doctor Check dependencies and configuration
config Show config file path and contents
version Show version
# First time setup — check your environment
esctl doctor
# Add a cluster for your project
esctl add
# → prompts for name, port, directories, ES binary
# Start it
esctl start myapp
# Start with live log output
esctl start myapp --verbose
# See all clusters and their live status
esctl list
# Tail logs for a running cluster
esctl logs myapp
esctl logs -f myapp # follow in real time
# Edit a cluster's config
esctl edit myapp
# Stop everything
esctl stopCLUSTER NODE PORT STATUS UPTIME MEMORY HTTP ACCESS URL
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
myapp node-myapp 9200 RUNNING 12:04 1GB OK http://localhost:9200
staging node-staging 9201 STOPPED N/A N/A N/A —
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Config is stored at ~/.esctl/clusters.json. You can override the path:
export ESCTL_CONFIG=~/my-custom-config.jsonEach cluster stores:
{
"name": "myapp",
"node_name": "node-myapp",
"port": 9200,
"data_dir": "$HOME/.esctl/data/myapp",
"logs_dir": "$HOME/.esctl/logs/myapp",
"es_bin": null
}es_bin is null by default (auto-detect). Set it per-cluster to pin a specific ES version:
esctl edit myapp
# → ES binary: /path/to/specific/elasticsearch| Variable | Default | Description |
|---|---|---|
ESCTL_ES_BIN |
— | Path to Elasticsearch binary (global override) |
ESCTL_CONFIG |
~/.esctl/clusters.json |
Config file location |
brew upgrade esctlMIT