Install/Configure CLI
The Nullstone CLI is a utility that allows users to manage Nullstone from a terminal:
- Perform code deployments or infra provisions
- Retrieve data from Nullstone
- Manage Nullstone objects
- Generate, publish, and manage infrastructure modules
This utility is an open-source project that has been pre-packaged for any platform. Refer to the OS-specific instructions in this section to install for your machine.
Install
Install the pre-compiled binary based on your system.
Homebrew (Mac)
brew tap nullstone-io/nullstone https://github.com/nullstone-io/nullstone.git
brew install nullstone
As we release updates, you only need to run the following command to upgrade the CLI.
brew upgrade nullstone
Scoop (Windows)
scoop bucket add nullstone https://github.com/nullstone-io/nullstone.git
scoop install nullstone
As we release updates, you only need to run the following command to upgrade the CLI.
scoop update nullstone
Install Script (Linux and Mac)
Download the script below to your machine. Make sure the script has execute permissions. Then, run the script to install the Nullstone CLI.
wget https://docs.nullstone.io/install-nullstone-cli.sh
chmod +x install-nullstone-cli.sh
./install-nullstone-cli.sh
Go Install (Any Platform)
go install gopkg.in/nullstone-io/nullstone.v0/nullstone@latest
Configure CLI
To configure your CLI, you must configure your CLI with an API Key created in Nullstone.
Create API Key
Visit https://app.nullstone.io/profile and click "New API Key". Typically, the name of the API Key refers to the machine/system where the API Key is stored and used.
Run the following command to configure your CLI with the generated API Key.
nullstone configure --api-key=<api-key>
Set Default Organization
The Nullstone CLI scopes requests to Nullstone servers based on a default organization that you will configure on your machine. To configure this default organization, run the following command. The <org-name>
refers to your organization's name in Nullstone that has no spaces or uppercase characters. This setting is required for most CLI commands.
nullstone set-org <org-name>
Alternatively, you can use the global --org
flag to specify an organization per command.
nullstone --org=<org-name> deploy <app-name> <env-name>