sim 2.0.0-dev.6.1 → 2.0.0-preview.11.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 +24 -11
- package/dist/index.js +2754 -1152
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -3,17 +3,12 @@
|
|
|
3
3
|
Talk to the [Sim](https://sim.ai) API from your terminal.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
npm install
|
|
6
|
+
npm install -g sim
|
|
7
7
|
sim login
|
|
8
8
|
sim workflows list
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
```bash
|
|
14
|
-
npm install --global sim@staging # staging
|
|
15
|
-
npm install --global sim@dev # dev
|
|
16
|
-
```
|
|
11
|
+
Full documentation: **https://docs.sim.ai/cli**
|
|
17
12
|
|
|
18
13
|
## Profiles
|
|
19
14
|
|
|
@@ -51,7 +46,7 @@ The section-naming asymmetry — `[profile dev]` in config, `[dev]` in credentia
|
|
|
51
46
|
sim configure --set-endpoint http://localhost:3000 --profile dev
|
|
52
47
|
sim configure --set-workspace ws_local --profile dev
|
|
53
48
|
sim profiles # list them; * marks the active one
|
|
54
|
-
sim whoami # resolved values,
|
|
49
|
+
sim whoami # resolved values, where each came from, and whether they work
|
|
55
50
|
```
|
|
56
51
|
|
|
57
52
|
## Where settings come from
|
|
@@ -68,7 +63,16 @@ Each setting resolves independently, first match wins:
|
|
|
68
63
|
Formats are listed under [Output formats](#output-formats).
|
|
69
64
|
|
|
70
65
|
`sim whoami` prints the winning source per setting, which is usually the fastest
|
|
71
|
-
way to explain a surprising result.
|
|
66
|
+
way to explain a surprising result. It then reads the configured workspace to
|
|
67
|
+
prove the settings actually work; `--no-verify` skips that and stays offline.
|
|
68
|
+
|
|
69
|
+
Its exit status is the answer, so CI can branch on it:
|
|
70
|
+
|
|
71
|
+
| Code | Meaning |
|
|
72
|
+
| --- | --- |
|
|
73
|
+
| `0` | The key works and reached the configured workspace |
|
|
74
|
+
| `1` | The credentials are wrong — no key stored, or the API refused it |
|
|
75
|
+
| `2` | The check could not be made — nothing to check against, or the endpoint did not answer |
|
|
72
76
|
|
|
73
77
|
For CI, skip `sim login` entirely and set `SIM_API_KEY` and `SIM_WORKSPACE` —
|
|
74
78
|
nothing needs to touch the filesystem. `SIM_CONFIG_DIR` relocates both files if
|
|
@@ -108,6 +112,10 @@ Settings → API keys.
|
|
|
108
112
|
|
|
109
113
|
## Commands
|
|
110
114
|
|
|
115
|
+
The commands below are the common ones. The complete reference — every group,
|
|
116
|
+
subcommand, argument, and flag, generated from this package — is at
|
|
117
|
+
[docs.sim.ai/cli/commands](https://docs.sim.ai/cli/commands).
|
|
118
|
+
|
|
111
119
|
Plural resource names are canonical, but every plural top-level resource group
|
|
112
120
|
also accepts its singular form: for example, `sim table list`,
|
|
113
121
|
`sim file get`, and `sim workflow get` are equivalent to their plural
|
|
@@ -142,7 +150,7 @@ sim tables list [--folder <path>]
|
|
|
142
150
|
sim tables get <tableId>
|
|
143
151
|
sim tables update <tableId> [--name <name>] [--description <text>] [--folder <path>]
|
|
144
152
|
sim tables mv <tableId> <folder>
|
|
145
|
-
sim tables columns <tableId>
|
|
153
|
+
sim tables columns create|update|delete|run <tableId>
|
|
146
154
|
sim tables rows list <tableId> [--limit <n>]
|
|
147
155
|
sim tables rows create <tableId> --data <json|@file>
|
|
148
156
|
sim tables rows create <tableId> --rows <json|@file>
|
|
@@ -173,6 +181,8 @@ sim knowledge search --query <text> --kb <id>… [--search-mode vector|hybrid]
|
|
|
173
181
|
sim knowledge documents list <knowledgeBaseId> [--search <text>]
|
|
174
182
|
sim knowledge documents get <knowledgeBaseId> <documentId>
|
|
175
183
|
sim knowledge documents upload <knowledgeBaseId> <path> [--tag <value>...]
|
|
184
|
+
sim knowledge documents update <knowledgeBaseId> <documentId> [--filename <name>] [--enabled]
|
|
185
|
+
sim knowledge documents batch-update <knowledgeBaseId> --operation enable|disable
|
|
176
186
|
sim knowledge documents delete <knowledgeBaseId> <documentId> --yes
|
|
177
187
|
|
|
178
188
|
sim billing status [--all-workspaces]
|
|
@@ -249,9 +259,12 @@ grammar is a tree; there's no honest flag encoding for it.
|
|
|
249
259
|
sim tables rows query tbl_123 \
|
|
250
260
|
--filter '{"all":[{"field":"status","op":"eq","value":"open"},
|
|
251
261
|
{"field":"score","op":"gt","value":10}]}' \
|
|
252
|
-
--sort score:desc --limit 50
|
|
262
|
+
--sort '[{"field":"score","direction":"desc"}]' --limit 50
|
|
253
263
|
```
|
|
254
264
|
|
|
265
|
+
`--sort` is JSON for the same reason: it is an ordered list of keys, each with a
|
|
266
|
+
`field` and a `direction` of `asc` or `desc`.
|
|
267
|
+
|
|
255
268
|
Row columns are discovered at runtime from the returned data, unioned across the
|
|
256
269
|
page so a sparse row doesn't hide a column.
|
|
257
270
|
|