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--context, theNSCALE_CONTEXTenvironment variable, or 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.NSCALE_CONTEXT or NSCALE_ORG instead.
Command structure
Commands take the shapenscale <resource> [<sub-resource>] <verb> [flags]. Resources are named in kebab-case (file-storage, security-groups, service-accounts), and resources that belong to another resource are nested under it as a sub-resource, for example:
filestorage, securitygroups, serviceaccounts, instances consoleoutput, object-storage create-access-key, placements servers, and inferencing list-models, are kept as aliases, so existing scripts keep working; these pages use the new names. Every list command also answers to ls, and every delete to rm.
IDs and names
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. Every flag or argument that takes an ID also accepts the resource’s name, including --org, --project, and --region:
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 (the same as --format json for that one command), 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.
A list is always a bare JSON array of resources under --json, --format json, and --format yaml, with no wrapper object. The exceptions are the s3api commands, which return the AWS response object as-is.
Limiting list output
Everylist command accepts --limit N to show at most N results, in every format. The limit is applied client-side, so every result is still fetched; when it cuts the list, the CLI prints a Note: on stderr. --limit 0 (the default) shows all results.
--limit cuts the list before -q runs, so a select filter only sees the first N results. To cap the number of matches instead, slice inside the filter:
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>.
After a successful mutation, the CLI may print one Hint: line on stderr naming the command you most likely want to run next, such as the get that checks a new resource’s status. --format quiet drops it.
The exit status tells scripts what went wrong without parsing stderr:
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. The payload is always printed as JSON, whatever --format is, since that is what is sent to the API:
Waiting for asynchronous operations
Creating, deleting, starting, or stopping some resources returns before the operation finishes. Commands that do this accept--wait, which blocks until the resource is ready, reaches the requested power state, or is gone:
--wait-timeout sets how long to wait (default 30m). When output is piped, progress goes to stderr only. If the resource enters a failure state, the timeout passes, or you press Ctrl-C, the command exits with status 1 and names the get command to check on it; the operation itself keeps running.
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. If you omit the ID of the resource a command acts on, the CLI opens an interactive picker, so always pass it in scripts. Without a terminal, or under--ci, the error names the missing flag and, where there is one, a list command that prints valid values.
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. Every command that asks for confirmation accepts --yes, so any of them can run unattended. A few never ask, and so take no --yes: logout, contexts clear, and the s3api commands delete-bucket-tagging, delete-object-tagging, delete-bucket-lifecycle, and abort-multipart-upload.
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.