Docs Home

CLI

bonsai is the command-line client for Bonsai. It creates, resizes and destroys clusters, gets their connection URLs, and shows their usage, metrics and top search queries, from your terminal, from CI, or through a coding agent. Start with the overview, install it, or follow the quickstart.

To let an agent manage clusters for you, see AI Agents, or go straight to the agent skill and the MCP server.

Overview

What the bonsai command-line client does, and where to start.

Install and log in

Install bonsai on macOS or Linux, then log in with a browser or an API token.

Quickstart

Create a cluster, connect to it, watch it, resize it and destroy it.

Managing clusters

List, create, show, rename, resize and destroy clusters, and follow their Actions.

Connection URLs

Print a cluster's URL, or write it to a git-ignored env file without showing the password.

Usage, metrics and queries

Read a cluster's usage against its plan, its request metrics and its top search terms.

Scripting and CI

JSON output, exit codes, running without prompts, and bonsai api.

Agent skill

Teach Claude Code, or another coding agent, to manage clusters with the CLI.

MCP server

Serve cluster tools to Claude Code, Claude Desktop, Cursor, VS Code and other MCP clients.

Configuration

Profiles, environment variables, config files, shell completion and updates.

Command reference

Every bonsai command and its flags.

Ready to power your search with AI?

Launch a fully managed Elasticsearch or OpenSearch cluster, with built-in vector search and AI capabilities.

Create an AI Ready Search Cluster
Calming Bonsai waves