You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
`preview` starts a local file watcher. On each save, it pushes the current source to the playground session. The initial push can include task data from `--task`; later pushes update only the code.
207
+
`preview` starts a local file watcher. Pass a directory to use the scaffolded bundle defaults: `Screen.jsx` for the interface and `task.json` or `sample.json` for example task data. On each save, it pushes the current source to the playground session. The initial push can include task data from `--task` or the bundle's task-data file; later source saves update the code, and task-data saves update the task.
199
208
200
209
### `sync`
201
210
202
-
Create or update a saved interface.
211
+
Create or update a saved interface.`sync` creates an unpublished local draft by default so you can review it in Label Studio before publishing.
`pull` writes `Screen.jsx`, `task.json`, optional `params.json` defaults from `paramsSchema`, and a sidecar file. Without `--version`, it pulls the latest version, including local drafts.
253
+
230
254
### `start`
231
255
232
256
Sync the interface, create a project that uses it, and open the project data page.
`--params` must point to a JSON file. The JSON is saved as the project interface params and is passed into the component as `params`.
264
+
`start` syncs a published version so the new project can safely reference it. `--params` must point to a JSON file. The JSON is saved as the project interface params and is passed into the component as `params`.
265
+
When you pass a directory, `start` uses `Screen.jsx` for the interface and `params.json` for project params when present.
241
266
242
267
Useful options:
243
268
@@ -274,7 +299,7 @@ The command checks Node.js, npm, the API token, validator dependency installatio
274
299
275
300
## Sidecar Files
276
301
277
-
After a successful `sync`, the CLI writes a sidecar next to the source file:
302
+
After a successful `sync` or `pull`, the CLI writes a sidecar next to the source file:
278
303
279
304
```text
280
305
Screen.jsx.ls-interface.json
@@ -289,7 +314,7 @@ The sidecar is keyed by Label Studio base URL and stores:
289
314
- last pushed source hash
290
315
- last pushed timestamp
291
316
292
-
This lets future `sync`, `start`, and `open` commands find the saved interface without requiring `--id`.
317
+
This lets future `sync`, `start`, and `open` commands find the saved interface without requiring `--id`. A sidecar source version can point at a draft version until you publish it.
0 commit comments