Loading

Install the Elastic CLI

You need Node.js 22 or later and npm (included with Node.js) installed on your system. The CLI is tested on Linux, macOS, and Windows.

  1. Install the elastic binary to your PATH:

    npm install -g @elastic/cli
    		
  2. Verify the installation:

    elastic --version
    		

To run a one-off command without a permanent install, use npx:

npx -y @elastic/cli --help