Install the Astra CLI

Install the Astra CLI to create and manage Astra DB databases and Astra Streaming tenants from the command line.

Supported platforms

The Astra CLI supports the following operating systems:

Operating System Architecture

Linux

x86_64, arm64

macOS

x86_64, arm64

Microsoft Windows

x86_64

Install the Astra CLI on macOS or Linux

To install the Astra CLI on macOS and Linux, you can use a scripted installation, binary installation, or a package manager.

  1. Run the following command to install the latest version of the Astra CLI to the default location:

    curl -sSL https://ibm.biz/astra-cli | sh

    To install the Astra CLI to a custom location, export the ASTRA_HOME environment variable before running the installation command, replacing INSTALLATION_DIRECTORY with the full path to your preferred installation directory:

    export ASTRA_HOME=INSTALLATION_DIRECTORY
  2. Add the astra executable to your PATH by running the command supplied after installation:

    echo 'eval "$(~/.astra/cli/astra shellenv)"' >> ~/.zprofile
  3. Reload your shell profile or open a new terminal window.

  4. Run the astra command from any directory to verify successful installation:

    astra

    The response includes available commands and options for the Astra CLI.

Binary installation on macOS and Linux

  1. Download the appropriate binary archive for your OS and CPU architecture from GitHub.

  2. Extract the archive into the directory where you want to install the Astra CLI. For example:

    sudo tar -xzvf astra-OS-ARCHITECTURE.tar.gz -C INSTALLATION_DIRECTORY

    Replace the following:

    • OS: Your operating system (macos or linux).

    • ARCHITECTURE: Your CPU architecture (x86_64 or arm64).

    • INSTALLATION_DIRECTORY: The full path to your preferred installation directory.

  3. Add the following lines to your shell profile (for example, ~/.zprofile or ~/.bash_profile) to make the astra command executable from any directory:

    # Astra CLI shell configuration
    eval "$(PATH_TO_BINARY shellenv)"

    Replace PATH_TO_BINARY with the full path to the astra executable in the installation directory.

  4. On macOS: Delete the com.apple.quarantine attribute from the astra binary to remove macOS Gatekeeper restrictions:

    xattr -d com.apple.quarantine $(which astra)

    Alternatively, you can remove these restrictions in your macOS System Settings.

    If you don’t remove the restrictions, you will receive a security alert stating "astra" Not Opened when you run the astra command.

  5. Reload your shell profile or open a new terminal window.

  6. Run the astra command from any directory to verify successful installation:

    astra

    The response includes available commands and options for the Astra CLI.

Install with Homebrew

  1. Install the latest version of the Astra CLI using Homebrew:

    brew install datastax/astra-cli/astra
  2. Run the astra command from any directory to verify successful installation:

    astra

    The response includes available commands and options for the Astra CLI.

Install the Astra CLI on Windows

To install the Astra CLI on Windows, you can use a scripted installation or binary installation.

  1. Run the following command to install the latest version of the Astra CLI to the default location:

    powershell -c "irm https://ibm.biz/astra-cli-win | iex"

    To install the Astra CLI to a custom location, export the ASTRA_HOME environment variable before running the installation command, replacing INSTALLATION_DIRECTORY with the full path to your preferred installation directory:

    $env:ASTRA_HOME = "INSTALLATION_DIRECTORY"
  2. Open a new terminal window.

  3. Run the astra command from any directory to verify successful installation:

    astra

    The response includes available commands and options for the Astra CLI.

Binary installation on Windows

  1. Download the windows zip file from GitHub.

  2. Extract the zip file into the directory where you want to install the Astra CLI:

    powershell -C "Expand-Archive -Path astra-windows-x86_64.zip -DestinationPath INSTALLATION_DIRECTORY -Force"

    Replace INSTALLATION_DIRECTORY with the full path to your preferred installation directory.

  3. Add the path to the unzipped astra.exe file to your PATH environment variable. For more information, see the Microsoft PowerShell documentation.

  4. Start a new PowerShell session by opening a new terminal window.

  5. Run the astra command from any directory to verify successful installation:

    astra

    The response includes available commands and options for the Astra CLI.

Next steps

To connect to Astra and run your first commands, see Connect and manage the Astra CLI.

Was this helpful?

Give Feedback

How can we improve the documentation?

© Copyright IBM Corporation 2026 | Privacy policy | Terms of use Manage Privacy Choices

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: Contact IBM