~/.config/nscale/contexts.yaml.
Aliases: context, ctx
Subcommands
- set — Create or update a context
- use — Set the current active context
- list — List all contexts
- delete — Delete a context
- clear — Clear the current context
set
Create or update a context with a given name, organization, and user. The--org, --project, and --region flags expect resource IDs, not names. Use nscale organizations list, nscale projects list, and nscale regions list to discover the IDs. Any flag that is omitted will be prompted for interactively.
The context name can be passed as a positional argument or with --name; passing both is an error unless they match. If you omit it, the CLI prompts for it.
Flags
Examples
use
Set the current active context. All subsequent commands will use this context unless overridden with--context. If you omit the name, the CLI prompts you to pick one of your contexts.
Example
list
List all configured contexts. The context in effect is marked in theActive column.
Aliases: list, ls
list has no --json or -q flags. Use the global --format flag instead. Under --format json, each context is a flat object (name, organizationId, …, active) rather than the usual metadata/spec/status envelope:
delete
Delete a context by name. The CLI asks for confirmation before deleting, and warns you if the context is currently active (deleting it leaves no context active).delete has no --yes flag, so it needs a terminal to answer the prompt.
Aliases: delete, rm, remove