sim 2.1.1-preview.41.1 → 2.1.1-preview.43.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +91 -22
- package/dist/index.js +752 -140
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,16 +21,16 @@ Non-secret settings live in `~/.sim/config`:
|
|
|
21
21
|
```ini
|
|
22
22
|
[default]
|
|
23
23
|
endpoint = https://www.sim.ai
|
|
24
|
-
workspace =
|
|
24
|
+
workspace = b7f4a1c3-9e02-4d68-8a5b-1c3f6d90e274
|
|
25
25
|
output = table
|
|
26
26
|
|
|
27
27
|
[profile dev]
|
|
28
28
|
endpoint = http://localhost:3000
|
|
29
|
-
workspace =
|
|
29
|
+
workspace = a3c81b02-5f4d-4e19-9d7a-2b6c1e084f55
|
|
30
30
|
|
|
31
31
|
[profile acme]
|
|
32
32
|
auth_profile = default
|
|
33
|
-
workspace =
|
|
33
|
+
workspace = 7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Keys live in `~/.sim/credentials`, written `0600`:
|
|
@@ -48,12 +48,22 @@ The section-naming asymmetry — `[profile dev]` in config, `[dev]` in credentia
|
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
sim configure --set-endpoint http://localhost:3000 --profile dev
|
|
51
|
-
sim configure --set-workspace
|
|
52
|
-
|
|
53
|
-
sim
|
|
54
|
-
sim whoami
|
|
51
|
+
sim configure --set-workspace a3c81b02-5f4d-4e19-9d7a-2b6c1e084f55 --profile dev
|
|
52
|
+
|
|
53
|
+
sim profiles # list them; * marks the active one
|
|
54
|
+
sim whoami # resolved values, where each came from, and whether they work
|
|
55
|
+
|
|
56
|
+
# Share the active stored login with a second workspace
|
|
57
|
+
sim profile add acme --workspace 7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28
|
|
55
58
|
```
|
|
56
59
|
|
|
60
|
+
A profile name that is not configured is refused, with the closest configured
|
|
61
|
+
name suggested. A typo used to fall through to the built-in defaults, so
|
|
62
|
+
`--profile stagng` talked to production and handed it whatever key resolved.
|
|
63
|
+
The two exceptions are the commands whose job is to create a profile:
|
|
64
|
+
`sim login --profile new` and `sim configure --profile new` still accept a name
|
|
65
|
+
that does not exist yet.
|
|
66
|
+
|
|
57
67
|
## Where settings come from
|
|
58
68
|
|
|
59
69
|
Each setting resolves independently, first match wins:
|
|
@@ -62,13 +72,13 @@ Each setting resolves independently, first match wins:
|
|
|
62
72
|
| --- | --- |
|
|
63
73
|
| 1 | Command-line flag (`--endpoint`, `--workspace`, `--output`) |
|
|
64
74
|
| 2 | Environment (`SIM_ENDPOINT`, `SIM_API_KEY`, `SIM_WORKSPACE`, `SIM_OUTPUT`) |
|
|
75
|
+
| 3 | `~/.sim/config` for the selected profile and credentials for its `auth_profile`, when set |
|
|
76
|
+
| 4 | Built-in default (`https://www.sim.ai`, `table`) |
|
|
65
77
|
|
|
66
78
|
`SIM_TIMEOUT_SECONDS` bounds each request (default `3600`, `0` waits
|
|
67
79
|
indefinitely) and `SIM_DEBUG=1` traces requests to stderr. Node ignores
|
|
68
80
|
`HTTPS_PROXY` unless `NODE_USE_ENV_PROXY=1` is also set, on Node 22.21+ or
|
|
69
81
|
24.5+; the CLI warns when a proxy is configured but will not be used.
|
|
70
|
-
| 3 | `~/.sim/config` for the selected profile and credentials for its `auth_profile`, when set |
|
|
71
|
-
| 4 | Built-in default (`https://www.sim.ai`, `table`) |
|
|
72
82
|
|
|
73
83
|
Formats are listed under [Output formats](#output-formats).
|
|
74
84
|
|
|
@@ -105,7 +115,8 @@ http://localhost:3000/cli/auth?request=…&scope=platform
|
|
|
105
115
|
Waiting for approval…
|
|
106
116
|
|
|
107
117
|
✓ Logged in. Key stored in /Users/you/.sim/credentials
|
|
108
|
-
Personal key, defaulting to
|
|
118
|
+
Personal key, defaulting to a3c81b02-5f4d-4e19-9d7a-2b6c1e084f55.
|
|
119
|
+
Override per command with --workspace.
|
|
109
120
|
```
|
|
110
121
|
|
|
111
122
|
The approval page is where you pick the workspace — the terminal has no key yet,
|
|
@@ -117,6 +128,35 @@ the key can access.
|
|
|
117
128
|
`sim login --workspace <id>` preselects a workspace in the picker, and an
|
|
118
129
|
existing profile's workspace preselects itself on re-login.
|
|
119
130
|
|
|
131
|
+
### Personal and workspace keys
|
|
132
|
+
|
|
133
|
+
Some operations accept only a **personal** API key: secrets, knowledge chunks,
|
|
134
|
+
knowledge connectors, knowledge tag writes, `chat`, `audit-logs`, and most
|
|
135
|
+
workflow deployment writes. A workspace-scoped key gets a `FORBIDDEN` response
|
|
136
|
+
on those, under one of two codes:
|
|
137
|
+
|
|
138
|
+
- `WORKSPACE_KEY_OPERATION_NOT_PERMITTED` — the workspace-scoped operations,
|
|
139
|
+
which is most of the list: secrets, knowledge, `chat`, and the deployment
|
|
140
|
+
writes.
|
|
141
|
+
- `PRINCIPAL_KIND_NOT_PERMITTED` — the organization-scoped ones, which never go
|
|
142
|
+
through workspace authorization at all. `audit-logs` is the one in this list.
|
|
143
|
+
|
|
144
|
+
Match on either when you are branching on the refusal. `sim whoami` reports
|
|
145
|
+
which kind you hold on its `Key type` row, and `sim meta status` reports the
|
|
146
|
+
same thing as `personal` or `workspace` alongside the rest of the key's state:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
$ sim meta status --output json
|
|
150
|
+
{
|
|
151
|
+
"v2Enabled": true,
|
|
152
|
+
"keyType": "personal",
|
|
153
|
+
"expiresAt": null
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`sim whoami --no-verify` stays offline and so cannot read the key type; it
|
|
158
|
+
prints `not checked` instead.
|
|
159
|
+
|
|
120
160
|
`sim logout` removes the stored key. A shared workspace profile cannot remove
|
|
121
161
|
its authentication profile's key; use `sim logout --all --profile <name>` to
|
|
122
162
|
remove only the workspace profile. An authentication profile cannot be removed
|
|
@@ -129,10 +169,14 @@ The commands below are the common ones. The complete reference — every group,
|
|
|
129
169
|
subcommand, argument, and flag, generated from this package — is at
|
|
130
170
|
[docs.sim.ai/cli/commands](https://docs.sim.ai/cli/commands).
|
|
131
171
|
|
|
132
|
-
Plural resource names are canonical
|
|
133
|
-
|
|
134
|
-
`sim
|
|
135
|
-
|
|
172
|
+
Plural resource names are canonical. Most plural top-level resource groups also
|
|
173
|
+
accept their singular form — `sim table list`, `sim file get`, and
|
|
174
|
+
`sim workflow get` are equivalent to their plural spellings. The groups with a
|
|
175
|
+
singular alias are `audit-logs`, `credentials`, `custom-tools`, `files`, `logs`,
|
|
176
|
+
`mcp-servers`, `secrets`, `skills`, `tables`, `workflows`, and `workspaces`;
|
|
177
|
+
`blocks`, `tools`, `chat-deployments`, `connector-types`, and
|
|
178
|
+
`workflow-mcp-servers` are plural-only. `sim --help` lists each group with the
|
|
179
|
+
aliases it actually accepts.
|
|
136
180
|
|
|
137
181
|
`knowledge` also accepts the shorter `kb` alias.
|
|
138
182
|
|
|
@@ -152,8 +196,8 @@ sim workflows runs resume <runId> --workflow <workflowId> --context <contextId>
|
|
|
152
196
|
sim logs list [--level error] [--workflow <id>…] [--trigger <name>…] [--start-date <date>]
|
|
153
197
|
sim logs get <runId>
|
|
154
198
|
|
|
155
|
-
sim audit-logs list --organization <organizationId> [--all-workspaces]
|
|
156
|
-
sim audit-logs get <id> --organization <organizationId>
|
|
199
|
+
sim audit-logs list [--organization <organizationId>] [--all-workspaces]
|
|
200
|
+
sim audit-logs get <id> [--organization <organizationId>]
|
|
157
201
|
|
|
158
202
|
sim workspaces list
|
|
159
203
|
sim workspaces get
|
|
@@ -204,7 +248,8 @@ sim billing logs [--period 7d] [--source sim-chat] [--limit <n>] [--all-workspac
|
|
|
204
248
|
```
|
|
205
249
|
|
|
206
250
|
The `sim-chat` billing source combines Copilot and workspace chat usage.
|
|
207
|
-
Organization audit logs require a personal API key
|
|
251
|
+
Organization audit logs require a personal API key; `--organization` defaults
|
|
252
|
+
to your only organization and is needed only when you belong to more than one. Commands with
|
|
208
253
|
`--all-workspaces` otherwise default to the workspace in the active profile.
|
|
209
254
|
|
|
210
255
|
`workflows runs get` is the lightweight status and polling resource.
|
|
@@ -255,14 +300,37 @@ Primitive lists take space-separated values. Prefix a path with `@` to read
|
|
|
255
300
|
one value per line, or use `@-` to read the list from stdin.
|
|
256
301
|
|
|
257
302
|
```bash
|
|
258
|
-
sim files mv --file-ids
|
|
303
|
+
sim files mv --file-ids wf_3Kq9tVbN2xLpR7sWmZ4dY wf_8Jd5cHy1QnT6vXbA0rEuP --to Archive
|
|
259
304
|
sim files mv --file-ids @file-ids.txt --to Archive
|
|
260
|
-
printf '
|
|
305
|
+
printf 'wf_3Kq9tVbN2xLpR7sWmZ4dY\nwf_8Jd5cHy1QnT6vXbA0rEuP\n' | sim files mv --file-ids @- --to Archive
|
|
261
306
|
```
|
|
262
307
|
|
|
308
|
+
File IDs carry a `wf_` prefix, as above. Workflow, knowledge-base, and
|
|
309
|
+
workspace IDs are bare UUIDs, and table IDs are `tbl_`-prefixed — the `wf_`
|
|
310
|
+
prefix belongs to files, not workflows.
|
|
311
|
+
|
|
263
312
|
Arrays of objects remain JSON inputs because they cannot be represented as a
|
|
264
313
|
flat list without losing structure.
|
|
265
314
|
|
|
315
|
+
### Secret values
|
|
316
|
+
|
|
317
|
+
`sim secrets set` takes the same `@` convention for its `--value`. Passing a
|
|
318
|
+
secret inline exposes it to shell history and to anything reading the process
|
|
319
|
+
list, so prefer a file or stdin; the contents are sent verbatim, with no
|
|
320
|
+
trimming. A value that genuinely begins with `@` is written `@@`, and only the
|
|
321
|
+
leading `@` is dropped. Omit `--value` entirely and the terminal prompts for it
|
|
322
|
+
without echoing.
|
|
323
|
+
|
|
324
|
+
```bash
|
|
325
|
+
sim secrets set STRIPE_KEY --scope workspace --value @stripe.key
|
|
326
|
+
op read op://vault/stripe/key | sim secrets set STRIPE_KEY --scope workspace --value @-
|
|
327
|
+
sim secrets set MENTION --scope workspace --value @@channel # the literal @channel
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
`--unredacted` marks a workspace secret whose value may appear in run logs and
|
|
331
|
+
model-visible content; `--no-unredacted` restores redaction. Omit both and the
|
|
332
|
+
secret keeps whatever it had. Both apply only to `--scope workspace`.
|
|
333
|
+
|
|
266
334
|
### Filtering table rows
|
|
267
335
|
|
|
268
336
|
`--filter` takes the same predicate tree the API uses — `all` (AND) or `any`
|
|
@@ -311,9 +379,10 @@ sim --output json logs list --level error | jq -r '.[].runId'
|
|
|
311
379
|
sim logs list --level error --output json | jq -r '.[].runId'
|
|
312
380
|
SIM_OUTPUT=yaml sim logs list --level error > logs.yaml
|
|
313
381
|
|
|
314
|
-
SIM_OUTPUT=text sim files list |
|
|
315
|
-
|
|
316
|
-
|
|
382
|
+
SIM_OUTPUT=text sim files list |
|
|
383
|
+
while IFS=$'\t' read -r id name folder size type uploaded_by uploaded; do
|
|
384
|
+
echo "$id $name"
|
|
385
|
+
done
|
|
317
386
|
```
|
|
318
387
|
|
|
319
388
|
An absent value is an em-dash in `table` and an **empty field** in `text`, so
|