Astra CLI

The DataStax Astra Command-Line Interface (Astra CLI) is a set of commands for creating and managing Astra resources. Astra CLI commands are available for Astra DB and Astra Streaming. They’re designed to get you working quickly, with an emphasis on automation.

Astra CLI provides a one-stop shop for managing your Astra resources through scripts or commands in your local terminal. The wide variety of capabilities include:

  • Creation and management of Astra DB and Astra Streaming artifacts

  • Querying & data loading

  • Organization and user management

  • Security and token configuration

The advantage for you: Astra CLI makes it possible to submit commands instead of or in addition to using Astra Portal and DataStax API calls.

Astra CLI features are provided especially for operators, Site Reliability Engineers (SREs), and developers who want the option of using commands when working with Astra DB databases and Astra Streaming tenants.

Two quick examples

Here are two quick Astra CLI command examples to demonstrate how Astra CLI manages resources across Astra DB databases and Astra Streaming tenants from your local terminal.

Let’s create an Astra DB database named demo from the command line:

  • Astra CLI

  • Result

astra db create demo -k ks2 --if-not-exist --wait
[INFO]  Database 'demo' does not exist. Creating database 'demo' with keyspace 'ks2'
[INFO]  Database 'demo' and keyspace 'ks2' are being created.
[INFO]  Database 'demo' has status 'PENDING' waiting to be 'ACTIVE' ...
[INFO]  Database 'demo' has status 'ACTIVE' (took 103513 millis)
[OK]    Database 'demo' is ready.

Now let’s create a Pulsar tenant:

  • Astra CLI

  • Result

astra streaming create new-tenant-from-cli
[OK]    Tenant 'new-tenant-from-cli' has being created.

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,