logo

Manage Workspaces w/ CLI

Overview

VSCode and its UI are great for coding and interacting with your dev environments. However, it may not be the best place for you to manage your workspace, user permissions, and other admin-based tasks. This is where Nimbus CLI can really help you to unleash Nimbus’ potential and add value to your workflow.
Before starting, install the CLI as instructed:
💻Install Nimbus CLI
In this tutorial, we want to show you how to use it to manage your Nimbus workspaces.
Note: We used to refer to Nimbus Workspaces as “Devservers”. Our CLI has not been updated with the new terminology. Think “workspace” when you see “devserver”.

nimbus create

With a few simple steps, you will be able to create Nimbus workspaces from your terminal. Let’s dive into it.
  1. Make sure you are logged. Otherwise, you can follow this tutorial to do so.
  1. Run the following command to start the workspace creation process:
    1. javascript
      ~ nimbus create
  1. Use arrow keys to select the environment configuration that you want to use to create the workspace
    1. javascript
      ~ nimbus create ? Which dev environment to create devserver? (Use arrow keys) ❯ nimbus-demo nimbus-backend
  1. Use arrow keys select the public ssh key you want to use for authentication
    1. javascript
      ~ nimbus create ? Which dev environment to create devserver? nimbus-demo ? Which public key file to use to connect to the devserver? (Note the public key will saved in your user settings): /Users/liushahuang/.ssh /Users/liushahuang/.ssh/config /Users/liushahuang/.ssh/id_rsa ❯ /Users/liushahuang/.ssh/id_rsa.pub /Users/liushahuang/.ssh/known_hosts /Users/liushahuang/.ssh/known_hosts.old
  1. Confirm the environment configuration and public key selection by inputting “Y”
    1. javascript
      ~ nimbus create ? Which dev environment to create devserver? nimbus-demo ? Which public key file to use to connect to the devserver? (Note the public key will be saved in your user settings): /Users/liushahuang/.ssh/id_rsa.pub ? Are you sure to create a new devserver with these configurations? (Y/n)
  1. If you have never created a workspace for an environment configuration before, the first time cold-starting a server will take about one minute.
    1. javascript
      ~ nimbus create ? Which dev environment to create devserver? nimbus-demo ? Which public key file to use to connect to the devserver? (Note the public key will be saved in your user settings): /Users/liushahuang/.ssh/id_rsa.pub ? Are you sure to create a new devserver with these configurations? Yes 🌤 Initializing Your Devserver...
  1. Confirm adding a known host to your ssh config by inputting “Y”. With this step, you will be able to connect to Nimbus workspace frictionlessly.
    1. javascript
      ~ nimbus create ? Which dev environment to create devserver? nimbus-demo ? Which public key file to use to connect to the devserver? (Note the public key will saved in your user settings): /Users/liushahuang/.ssh/id_rsa.pub ? Are you sure to create a new devserver with these configurations? Yes Your New Devserver is Ready to Connect ... Host: rtoha.dev.usenimbus.com HostName: rtoha.dev.usenimbus.com User: nimbus-user IdentityFile: /Users/liushahuang/.ssh/id_rsa ? Do you want to add/update the config above in your ssh config file? (Y/n)
  1. You can now connect to Nimbus workspace with ``
    1. javascript
      ~ nimbus create ? Which dev environment to create devserver? nimbus-demo ? Which public key file to use to connect to the devserver? (Note the public key will be saved in your user settings): /Users/liushahuang/.ssh/id_rsa.pub ? Are you sure to create a new devserver with these configurations? Yes Your New Devserver is Ready to Connect ... Host: rtoha.dev.usenimbus.com HostName: rtoha.dev.usenimbus.com User: nimbus-user IdentityFile: /Users/liushahuang/.ssh/id_rsa ? Do you want to add/update the config above in your ssh config file? Yes Connect to the devserver by: ssh rtoha.dev.usenimbus.com

nimbus delete

In some rare cases, you may want to start fresh. For example, you have just finished a prototype of your project and you don’t need anything from the Nimbus workspace anymore and you prefer to start from a blank machine. nimbus delete command can help you to wipe out a workspace and start from scratch.
  1. Run the following command to initiate the deletion process:
    1. javascript
      ~ nimbus delete ? Please select devserver: (Use arrow keys) nimbus-backend drzxx.dev.usenimbus.com ❯ nimbus-demo rtoha.dev.usenimbus.com
  1. Use the arrow keys to select the workspace you want to delete:
    1. javascript
      ~ nimbus delete ? Please select devserver: nimbus-backend drzxx.dev.usenimbus.com ❯ nimbus-demo rtoha.dev.usenimbus.com
  1. Confirm the workspace you want to delete
    1. javascript
      ~ nimbus delete ? Please select devserver: nimbus-demo rtoha.dev.usenimbus.com ? Are you sure to delete this devserver? (y/N)
  1. Now the workspace is deleted.
    1. javascript
      ~ nimbus delete ? Please select devserver: nimbus-demo rtoha.dev.usenimbus.com ? Are you sure to delete this devserver? Yes Deleting Devserver... Devserver is deleted!

Helpful?