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]
| Subcommand | Purpose |
|---|---|
list | List all configured contexts. |
set | Create or update a named context. |
use | Switch 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.
| Name | Type | Default | Description |
|---|---|---|---|
<NAME> | string (arg) | — | Name of the context to create or update. |
--api-url <API_URL> | string | required | API URL for this context. |
--api-key <API_KEY> | string | — | API 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).
| Argument | Type | Description |
|---|---|---|
<NAME> | string | Name of the context to set as default. |
aasm context use production
Default context set to 'production'.
Last updated: 2026-06-11 by Chisanan232