Link Search Menu Expand Document

CloudEnv CLI

Welcome, here’s how easy it is to get started with CloudEnv…

$ bash -c "$(curl -fsSL"

Logging In

Here’s an example of what the full login process looks like:

$ cloudenv login
==> Your current ip address is 2703:8010:3802:fd10:4cbf:4619:7e8b:3fcf
Do you want to firewall this API token to this IP address (enhanced security on servers)? (N/y): y
==> CloudEnv can prevent writes from this computer
Do you want this API token to be read-only? (N/y): n
==> Please visit this url and login or register to authorize this computer:

Setting Up CloudEnv In A New App

The first time you use CloudEnv in an app, you will need to run cloudenv init in order to create a record of the app in the CloudEnv servers and initialize the secret encryption key on your machine in the .cloudenv-secret-key file. Here’s what that process looks like:

$ cd /var/apps/sampleapp
$ cloudenv init
Name of App: nodetest
==> SUCCESS: You have created the app 'nodetest' in CloudEnv. Try the following command next:
EDITOR=nano cloudenv edit
==> REMEMBER: You need to distribute the following file to all your team members and deployment servers

In case you were curious what’s in the .cloudenv-secret-key file, it looks something like this:

$ cat .cloudenv-secret-key
slug: nodetest
secret-key: GXWaeMkjqChq5Tt2MNVYJnkdwoFNakXd2JaXDL7nYNHJ4UvXdJx36RHmzY2ueGarNUkn95DaRkBKKcyNhX9pvcqY8NfwTu8Lfc97Rcc3DYbZaX5iRyqVVY2jZyrYPpKhiMf8bFTAxmHkVT7WvJ2owBb7JyAEHG3oYdFEusW8oPFuKcHb4uvrijo9DQehmQrUJ3fDPCx3zfAu2WALk3M9uiGj6JLVpce7aiCEfVghZhdKZyUycqyccNxbzx6a8SoM

Editing Your Environmental Variables

$ cloudenv edit                         # this defaults to the default environment
$ cloudenv edit development             # in case you want to change only the development variables
$ cloudenv edit production              # in case you want to change only the production variables

Importing Existing Environmental Variables

$ cloudenv push default .env            # this encrypts your existing env vars into CloudEnv
$ cloudenv push development    # this encrypts your development-specific env vars into CloudEnv
$ cloudenv push staging .env.staging    # this encrypts your staging-specific env vars into CloudEnv
$ cloudenv push production    # this encrypts your production-specific env vars into CloudEnv