Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

aasm context

Manage named API contexts (connection profiles) stored in ~/.aa/config.yaml. A context bundles an API URL and optional API key under a name so you can switch between gateways with --context <name>.

See Config and context resolution for how the active context is resolved.

Synopsis

aasm context <SUBCOMMAND> [OPTIONS]
SubcommandPurpose
listList all configured contexts.
setCreate or update a named context.
useSwitch the default context.

aasm context list

List all configured contexts with their API URLs. Takes no arguments.

aasm context list
NAME         API URL                       DEFAULT
production   https://api.example.com       *
staging      https://staging.example.com

aasm context set

Create or update a named context.

NameTypeDefaultDescription
<NAME>string (arg)Name of the context to create or update.
--api-url <API_URL>stringrequiredAPI URL for this context.
--api-key <API_KEY>stringAPI key for this context (optional).
aasm context set staging --api-url https://staging.example.com
Saved context 'staging'.

aasm context use

Switch the default context (the one used when --context is not passed).

ArgumentTypeDescription
<NAME>stringName of the context to set as default.
aasm context use production
Default context set to 'production'.

Last updated: 2026-06-11 by Chisanan232