Elastic CLI
The Elastic CLI (elastic) provides a single command-line interface for Elasticsearch, Kibana, and Elastic Cloud. Use it to interact directly with Elasticsearch and Kibana across deployment types, or to manage Elastic Cloud Hosted deployments and Elastic Cloud Serverless projects through the Elastic Cloud API.
The CLI groups its API commands into two main namespaces:
elastic stack: Connect directly to Elasticsearch and Kibana APIs across fully self-managed deployments, Elastic Cloud on Kubernetes, Elastic Cloud Enterprise, Elastic Cloud Hosted, and Elastic Cloud Serverless projects. You can useelastic esandelastic kbas shorter forms.elastic cloud: Use Elastic Cloud APIs to manage Elastic Cloud Hosted deployments and Elastic Cloud Serverless projects.
Use named contexts to save and switch between service connections. Commands support structured output for scripts, agents, and other tools.
The Elastic CLI is a technical preview and is under active development. Not all Elastic APIs are available as CLI commands. Refer to the Elastic CLI command reference for the available commands.
The following resources help you start using the Elastic CLI:
- Follow the Elastic CLI quickstart to install the CLI, configure an Elasticsearch connection, and run your first commands.
- Refer to Install the Elastic CLI for detailed instructions to install, update, or uninstall the CLI.
- Refer to Configure the Elastic CLI to manage connection contexts and credentials.
- Refer to the Elastic CLI command reference for commands, options, and input schemas.
- Follow Connect to Elastic Cloud with the Elastic CLI to configure a connection and run example operations against the Elastic Cloud API.