Console

·

2 min read

Announcing Upstash CLI

Andreas Thomas

Software Engineer @Upstash

Announcing @upstash/cli
Get started
Creating Resources
Closing words

One of the primary goals of Upstash is to enable every developer to create Upstash resources easily using various tools. In the past, we have announced Developer Api, Terraform Provider, and now it is time for Upstash CLI.

Announcing @upstash/cli

We are thrilled to announce Upstash command-line tool so that every developer can create their Upstash resources with a single command.

It is available on GitHub, npm or built binaries

Get started

Upstash CLI requires a developer api key. A new api key can be created in the Console.

npm install -g @upstash/cli

Or visit the GitHub release page for prebuilt binaries.

After installing, execute the following command to log in. It will ask for your email and api key:

upstash auth login

That's all. You are now logged in and can manage your Upstash resources from the command line.

If you are unsure what a command does, use the --help flag, and it will explain all available commands and flags.

upstash redis --help

All parameters can be given via CLI, but the CLI will ask you if a required parameter is missing.

Creating Resources

Creating Redis Database

upstash redis create --name=cli-powered-db --region=eu-central-1

You only need to provide the name of your database and region. Other optional flags can be provided like tls, multizone, etc.

Creating Kafka Cluster

upstash kafka create --name=$name --region=$region

Similar to redis, kafka resources requires 2 parameters name and region. After creating a region, a topic can be created.

upstash kafka topic create --name=mytopic --cluster-id=$id

Other Commands

Upstash CLI includes many different commands to perform CRUD operations on your Upstash Resources.

  • Team: This allows you to manage teams and their members

    upstash team
    
  • Redis: Create/edit/delete redis databases

    upstash redis
    
  • Kafka: Create/edit/delete kafka clusters and topics

    upstash kafka cluster
    upstash kafka topic
    

Closing words

If you have any questions, please reach out to us on GitHub or the channels below.

Follow us on Discord and Twitter.