| description | Use the Elastic CLI to interact with the Elastic Stack and Elastic Cloud from the command line. | ||||
|---|---|---|---|---|---|
| applies_to |
|
||||
| type | overview |
The Elastic CLI (elastic) provides a single command-line interface for {{es}}, {{kib}}, and {{ecloud}}. Use it to interact directly with {{es}} and {{kib}} across deployment types, or to manage {{ech}} deployments and {{serverless-full}} projects through the {{ecloud}} API.
The CLI groups its API commands into two main namespaces:
elastic stack: Connect directly to {{es}} and {{kib}} APIs across fully self-managed deployments, {{eck}}, {{ece}}, {{ech}}, and {{serverless-full}} projects. You can useelastic esandelastic kbas shorter forms.elastic cloud: Use {{ecloud}} APIs to manage {{ech}} deployments and {{serverless-full}} projects.
Use named contexts to save and switch between service connections. Commands support structured output for scripts, agents, and other tools.
:::{note} 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 {{es}} 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 {{ecloud}} with the Elastic CLI to configure a connection and run example operations against the {{ecloud}} API.
- Refer to Set up shell completion to enable tab completion in your shell.
- Refer to Extend the Elastic CLI to add your own top-level commands.