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:Authentication
Before using any commands that interact with Nscale resources, authenticate with:Credential precedence
The CLI resolves which credentials to use in this order, from highest to lowest priority:NSCALE_SERVICE_TOKENenvironment variable — when set, the token is used directly and every source below is ignored (no keyring lookup happens at all).-u, --userflag, when explicitly passed — selects that named entry from the local keyring (the one created bynscale login) and takes precedence over any active context.- Active context’s user — the
userfield of the context selected via--contextor previously set withnscale contexts use. Used whenever-uis not passed on the command line. defaultkeyring entry — the fallback when no context is active and-uwas not passed.
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
By default,list commands print a table and commands that return one resource print it as JSON. Most commands that return data also accept --json, which emits the full JSON payload, and -q, which extracts fields with a jq filter:
--json and -q are mutually exclusive — pick whichever fits your downstream tooling. Both take precedence over --format.
Choosing a format with --format
--format (or the NSCALE_OUTPUT_FORMAT environment variable; --format wins) sets how every command in the invocation renders its output:
When
--format is unset, the CLI detects the audience from the agent harness, the terminal, or the pipe. Detection only picks how output is rendered: it never implies --yes, skips a confirmation, or changes what a command does.
A human table clips long values to the terminal width. Pass --no-truncate to show them in full, at the cost of a table wider than the terminal. Only tables clip: agent, json, and -q output never does.
Output streams and exit status
Data goes to stdout; diagnostics, prompts, and warnings go to stderr, sonscale ... --json | jq is always safe. Errors are printed to stderr as Error: <message> and the command exits with status 1; success exits with 0.
Input formats
create and update commands accept input from a JSON file (--file) or standard input (--stdin):
--dry-run to preview the request payload without making any changes:
Interactive mode
When running at a terminal 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. Commands that act on one resource take its ID either as a positional argument (nscale instances get <instance-id>) or with --id; passing both is an error unless they match. If you omit it, the CLI opens an interactive picker, so always pass it in scripts.
For example, list commands will present an organization picker if --org is not provided:

create commands will prompt for each required field when no --file or --stdin input is given:

--ci or set the CI environment variable. With prompts suppressed, a missing value is an error, and so is a confirmation: commands that ask before acting (most deletes and other mutations) fail unless you also pass --yes:
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
These pages track the latest CLI release. If a command below is not recognized, check your version withnscale version and upgrade — brew upgrade nscale, or download a newer binary from the releases page.