Goal
Configure repeatable project and application contexts without storing credentials in YAML.Prerequisites
- The StackShift CLI is installed
Workflow
1
Inspect the built-in default profile.
2
Create additional profiles only when you need a different API or default resource set.
3
Select an active profile or override it for one command.
4
Use global flags for temporary resource, output, timeout, and confirmation choices.
Default profile
When no configuration file exists, the CLI uses adefault profile pointing to https://api.stackshift.cloud. The first command that saves configuration creates an owner-only directory and a mode-0600 file on Unix.
Profile YAML stores no token. The matching credential is stored separately in the operating-system credential manager.
Create or update a profile
A new profile requires--api-url. Updating an existing profile preserves its API URL when that flag is omitted, while the resource defaults are replaced by the values supplied to the command.
Override precedence
--profileselects a profile for one process; otherwise the current profile is used.--api-urloverridesSTACKSHIFT_API_URL, which overrides the profile API URL.- An API URL must use HTTPS, except
http://localhostandhttp://127.0.0.1. - A positional project overrides
--project, which overrides the profile default project. --appoverrides the profile default application.--environmentoverrides the profile default environment.
Global options
--profile: configuration profile for this process.--api-url: StackShift API URL override.--project,--app,--environment: resource selection overrides.--outputor-o:table,json,yaml, orname.--timeout: request timeout; the default is 30 seconds.--yesor-y: approve confirmation-gated operations.--quietor-q: suppress progress output.--color:auto,always, ornever.--debug: write redacted request diagnostics to standard error.--token-file,--token-stdin: explicit CI credential sources.
Resource resolution
UUIDs are used directly. Supported named resources are resolved with exact, case-insensitive matching against names, slugs, keys, or domain fields as appropriate. If no match exists, the command fails. If more than one resource matches, the command fails and asks for an ID instead of choosing one.Expected result
Commands resolve the intended API, project, application, and environment predictably.
Common failures
Related guides
Authentication and credential storage
Use browser authorization interactively and explicit, non-persistent token inputs in CI.
Output, pagination, errors, and automation
Select stable machine output, fetch paginated results, and handle documented exit codes.