Skip to content

Command Line Interface (CLI)

The CrabNebula Cloud CLI can be used to create a release draft, upload assets, and then publish a release.

Creating a release involves the following steps:

  1. Create a new draft
  2. Upload assets to CrabNebula Cloud
  3. Publish the release to users

Prerequisites

In order to begin using the CrabNebula Cloud CLI a few steps must first be completed:

  1. Create an Application (learn how to in Create an Application)
  2. Create an API key (learn how to in Create an API Key)
  3. Export the API key to the environment
    • Linux and macOS: export CN_API_KEY={api-key}
    • Windows: set CN_API_KEY={api-key}
    • Note that this will only add the API key as an environment variable for the lifetime of the current shell session. You can also pass the API key with the --api-key flag when executing any command.

Install the CLI

You can download the CLI from here. It is a single binary that can be executed from anywhere on your system. In the context of this documentation we will assume that the binary is named cn (cn.exe on Windows).

Linux and macOS

To verify that the CLI can execute as expected open a terminal and navigate to the folder with the downloaded binary. Assuming the binary is named cn, running ./cn will output the help text from the CLI. If you get a permission denied error, you may need to make the binary executable with chmod +x cn.

If you want to install the CLI globally on your system, you can move the binary to a folder in your PATH (e.g.: /usr/local/bin on macOS and Linux).

Windows

To verify that the CLI can execute as expected open a command prompt and navigate to the folder with the downloaded binary. Assuming the binary is named cn.exe, running .\cn.exe will output the help text from the CLI.

If you want to install the CLI globally on your system, you can add the folder with the binary to your PATH environment variable. See these steps from Microsoft for instructions on how to do this.