@@ -9,8 +9,10 @@ for a single command.
99
1010## Profiles
1111
12- A profile is one identity plus one set of defaults, in the style of the AWS CLI.
13- Select one with ` -P ` , ` --profile ` , or ` SIM_PROFILE ` :
12+ A profile selects one set of defaults, in the style of the AWS CLI. It normally
13+ uses its same-named stored identity, but a workspace profile can share another
14+ profile's identity through ` auth_profile ` . Select one with ` -P ` , ` --profile ` , or
15+ ` SIM_PROFILE ` :
1416
1517``` bash
1618sim workflows list --profile dev
@@ -23,6 +25,12 @@ The profile is named `default` when you do not pick one.
2325sim profiles # list them; * marks the active one
2426```
2527
28+ Add a profile for another workspace without creating or copying an API key:
29+
30+ ``` bash
31+ sim profile add acme --workspace ws_acme
32+ ```
33+
2634## Setting defaults
2735
2836``` bash
@@ -51,7 +59,7 @@ Each setting resolves independently, and the first match wins:
5159| --- | --- |
5260| 1 | Command-line flag — ` --endpoint ` , ` --workspace ` , ` --output ` |
5361| 2 | Environment — ` SIM_ENDPOINT ` , ` SIM_API_KEY ` , ` SIM_WORKSPACE ` , ` SIM_OUTPUT ` |
54- | 3 | ` ~/.sim/config ` and ` ~/.sim/credentials ` , for the selected profile |
62+ | 3 | ` ~/.sim/config ` for the selected profile and ` ~/.sim/credentials ` for its ` auth_profile ` , when set |
5563| 4 | Built-in default — ` https://www.sim.ai ` and ` table ` |
5664
5765` sim whoami ` prints the winning source for each setting:
@@ -74,6 +82,10 @@ output = table
7482[profile dev]
7583endpoint = http://localhost:3000
7684workspace = ws_local
85+
86+ [profile acme]
87+ auth_profile = default
88+ workspace = ws_acme
7789```
7890
7991Keys live in ` ~/.sim/credentials ` , written ` 0600 ` :
@@ -89,6 +101,10 @@ api_key = sim_…
89101Section naming follows the AWS convention: ` [profile dev] ` in config, ` [dev] ` in
90102credentials. The ` default ` profile is ` [default] ` in both.
91103
104+ ` auth_profile ` references one direct profile and shares only its endpoint and
105+ API key; workspace and output remain local. References cannot be chained, and a
106+ shared profile cannot also set its own endpoint or API key.
107+
92108## Environment variables
93109
94110| Variable | Effect |
@@ -121,6 +137,19 @@ sim configure --set-workspace ws_abc123
121137export SIM_WORKSPACE=ws_abc123
122138```
123139
140+ For a reusable selection, create a workspace profile backed by the current
141+ stored login:
142+
143+ ``` bash
144+ sim workspaces list
145+ sim profile add acme --workspace ws_acme
146+ sim --profile acme tables list
147+ ```
148+
149+ When ` --workspace ` is omitted in a terminal, ` profile add ` presents an
150+ interactive picker, capped at 1,000 entries. It refuses environment-only keys
151+ and endpoint overrides because those values would disappear in another shell.
152+
124153` sim billing status ` , ` sim billing logs ` , and ` sim audit-logs list ` accept
125154` --all-workspaces ` to drop the filter instead. It cannot be combined with
126155` --workspace ` .
0 commit comments