• Glossary
  • Support
  • Downloads
  • DataStax Home
Get Live Help
Expand All
Collapse All

DataStax Streaming Home

Astra Streaming Documentation

    • Getting Started
    • Developing
      • Using Pulsar binaries with Astra Streaming
      • Using curl with Astra Streaming
      • Astra CLI
      • Astra Streaming Functions
      • Starlight for Kafka
      • Starlight for RabbitMQ
      • Producing and consuming messages
        • Astra Portal
        • Pulsar Cli
        • Client Applications
          • Java
          • Python
          • C#
          • Golang
          • Node.js
      • Change data capture (CDC)
        • CDC for Astra DB
    • Operations
      • Geo-replication
      • Astra Streaming Limits
      • Astra Streaming Pricing
      • Astra Streaming Regions
      • Scrape Astra Streaming metrics with Prometheus
      • Manage Tokens
      • Enrollment FAQ
    • Guides and Examples
      • FAQs
      • Manage permissions
        • Use custom roles
      • Pulsar subscriptions
        • Exclusive
        • Shared
        • Failover
        • Key_shared
    • API Docs
      • Using the DevOps v2 API
      • API References
    • IO Connectors
    • Astra Streaming release notes
  • Astra Streaming Documentation
  • Developing
  • Astra CLI
Edit this Page

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.

What’s next?

  • See the Astra CLI documentation.

  • See the Astra CLI install instructions↗.

Using curl with Astra Streaming Astra Streaming Functions

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

© DataStax | Privacy policy | Terms of use

DataStax, Titan, and TitanDB are registered trademarks of DataStax, Inc. and its subsidiaries in the United States and/or other countries.

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.

landing_page landingpage