Installing Astra CLI

You can install Astra CLI on macOS, Linux, and Windows (with WSL) environments.

The GitHub repo for Astra CLI is here.

  • For information about the latest release, see this page.

  • If installed previously, run astra --version to find your installed version and see if you need to update.

Install Astra CLI on macOS

You can install via Homebrew or manually.

Using Homebrew

Homebrew is the easiest way to manage your Astra CLI install. Homebrew provides convenient ways to install, update, and uninstall. If you don’t have Homebrew available on your system, install Homebrew before continuing.

You can install Astra CLI on macOS by updating your brew repository information, and then running the install command:

brew install datastax/astra-cli/astra-cli

The Homebrew formula of Astra CLI installs a completion file named astra in the Homebrew-managed completions directory. By default, the location is /usr/local/etc/bash_completion.d/.

To enable completion, please follow Homebrew’s instructions here.

Manual Installation on macOS

To install or reinstall Astra CLI:

curl -Ls "https://dtsx.io/get-astra-cli" | bash

Installed location on your macOS machine

Astra CLI is installed in ~/.astra/cli. This folder is deleted and recreated during installation.

Your configuration is saved in the ~/.astrarc file. It is not deleted during reinstallations.

Install Astra CLI on Linux

Manual Installation on Linux

To install or reinstall Astra CLI:

curl -Ls "https://dtsx.io/get-astra-cli" | bash

Installed location on your Linux machine

Astra CLI is installed in ~/.astra/cli. This folder is deleted and recreated during installation.

Your configuration is saved in the ~/.astrarc file. It is not deleted during reinstallations.

Install Astra CLI on Windows

  1. Install Windows Subsystem for Linux.

  2. Install Astra CLI:

curl -Ls "https://dtsx.io/get-astra-cli" | bash

For more information, see Awesome Astra.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com