Skip to main content

Installation

You can install the CLI using any of the following methods:

Download binary

Download the binary for your operating system from the releases page.

Homebrew (for macOS users)

You can install the CLI using Homebrew:
Alternatively, you can combine both steps into a single command:

Authentication

Before using any commands that interact with Nscale resources, authenticate with:
This opens a browser window to complete authentication. On success, your credentials are stored locally. To log out:

Credential precedence

The CLI resolves which credentials to use in this order, from highest to lowest priority:
  1. NSCALE_SERVICE_TOKEN environment variable — when set, the token is used directly and every source below is ignored (no keyring lookup happens at all).
  2. -u, --user flag, when explicitly passed — selects that named entry from the local keyring (the one created by nscale login) and takes precedence over any active context.
  3. Active context’s user — the user field of the context selected via --context or previously set with nscale contexts use. Used whenever -u is not passed on the command line.
  4. default keyring entry — the fallback when no context is active and -u was not passed.
If NSCALE_SERVICE_TOKEN is set in your shell, it silently overrides nscale login, --user, and any context — even if the token belongs to a different organization than you expect. When a command behaves unexpectedly (wrong org, “unauthorized”, missing resources), check this first:
Unset it with unset NSCALE_SERVICE_TOKEN to fall back to your stored credentials.

Global flags

These flags are available on every command:

Environment variables

Contexts

Contexts let you switch between different organizations and user configurations without re-specifying flags on every command.

Output formats

Most list and get commands support a --json flag for machine-readable output:
--json and -q are mutually exclusive — pick whichever fits your downstream tooling.

Input formats

create and update commands accept input from a JSON file (--file) or standard input (--stdin):
Use --dry-run to preview the request payload without making any changes:

Interactive mode

When running outside of a CI environment, the CLI falls back to interactive prompts for any missing parameters. This means you can run commands without flags and be guided through the required inputs step by step. For example, list commands will present an organization picker if --org is not provided: Instances list with interactive org picker create commands will prompt for each required field when no --file or --stdin input is given: Instances create with interactive field prompts To suppress interactive prompts (e.g. in scripts), pass --ci or set the CI environment variable.

Shell completion

Bash

Zsh

Fish

PowerShell

Query output with -q

Most commands that return data accept -q, --query, which runs the JSON response through a jq filter so you can extract a field or reshape the output without piping into a second process. See Query output with -q for examples.

Available commands