Skip to content

Commit 94a90ff

Browse files
committed
Merge remote-tracking branch 'origin/staging' into feat/cli-update-notifier
2 parents aba39c5 + 44d5fec commit 94a90ff

167 files changed

Lines changed: 33825 additions & 1003 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apps/docs/content/docs/cli/files.mdx

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ Also available as `sim files folders ls`.
108108
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
109109
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
110110
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
111+
| `--recursive <value>` | No | Whether parentPath includes every descendant instead of direct children only. Accepted values: `true`, `1`, `yes`, `on`, `y`, `enabled`, `false`, `0`, `no`, `off`, `n`, `disabled`. |
112+
| `--depth <value>` | No | Deepest level below parentPath to include when recursive is true. |
111113

112114
</CommandTable>
113115

@@ -172,6 +174,32 @@ sim files delete <fileId> [options]
172174

173175
</CommandTable>
174176

177+
## Apply one exact or anchor-based edit to a text file
178+
179+
```bash
180+
sim files edit <fileId> [options]
181+
```
182+
183+
**Arguments**
184+
185+
<CommandTable>
186+
187+
| Argument | Required | Description |
188+
| --- | --- | --- |
189+
| `fileId` | Yes | File identifier. |
190+
191+
</CommandTable>
192+
193+
**Options**
194+
195+
<CommandTable>
196+
197+
| Option | Required | Description |
198+
| --- | --- | --- |
199+
| `--edit <json\|@file>` | Yes | One edit object: &#123;"mode":"search_replace","search":"old","content":"new","replaceAll":false&#125;, &#123;"mode":"replace_between","beforeAnchor":"start line","afterAnchor":"end line","content":"new"&#125;, &#123;"mode":"insert_after","anchor":"line","content":"new"&#125;, or &#123;"mode":"delete_between","startAnchor":"first line deleted","endAnchor":"ending line kept"&#125;. Anchored modes also accept occurrence starting at 1 (JSON, or @path / @- to read a file or stdin). |
200+
201+
</CommandTable>
202+
175203
## Show file metadata and sharing status
176204

177205
```bash
@@ -310,6 +338,8 @@ sim files read <fileId> [options]
310338
| Option | Required | Description |
311339
| --- | --- | --- |
312340
| `--max-bytes <value>` | No | Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit. |
341+
| `--offset <value>` | No | First line to return, 1-based. Absent starts at the first line. |
342+
| `--limit <value>` | No | How many lines to return from `offset`. Absent reads to the end. |
313343

314344
</CommandTable>
315345

@@ -355,6 +385,27 @@ sim files restore <fileId>
355385

356386
</CommandTable>
357387

388+
## Search file content
389+
390+
```bash
391+
sim files search [options]
392+
```
393+
394+
**Options**
395+
396+
<CommandTable>
397+
398+
| Option | Required | Description |
399+
| --- | --- | --- |
400+
| `--query <value>` | Yes | Regular expression, or exact text when `mode` is `exact`. |
401+
| `--mode <value>` | No | How `query` is read. Accepted values: `exact`, `regex`. |
402+
| `--max-results <value>` | No | Maximum matching lines to return. |
403+
| `--folder <value...>` | No | Folders to search, by path as shown in the app; omit to search the whole workspace (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
404+
| `--include-subfolders` | No | Whether each folder scope includes nested folders; on by default. |
405+
| `--no-include-subfolders` | No | Send --include-subfolders as false. |
406+
407+
</CommandTable>
408+
358409
## Unzip an archive into a new folder beside it
359410

360411
```bash

apps/docs/content/docs/cli/reference.mdx

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -788,6 +788,8 @@ Also available as `sim files folders ls`.
788788
| `--sort-by <value>` | No | Field used to sort the result. Sorting by `name` is case-sensitive and follows the storage collation, so do not rely on a case-insensitive order. Accepted values: `name`, `createdAt`, `updatedAt`. |
789789
| `--sort-order <value>` | No | Sort direction. Accepted values: `asc`, `desc`. |
790790
| `--scope <value>` | No | Which lifecycle set to list: `active` (default) returns live folders only; `archived` returns folders a recursive delete soft-deleted, which is how a caller finds a path to hand to the folder restore. Authorization is identical for both. Accepted values: `active`, `archived`. |
791+
| `--recursive <value>` | No | Whether parentPath includes every descendant instead of direct children only. Accepted values: `true`, `1`, `yes`, `on`, `y`, `enabled`, `false`, `0`, `no`, `off`, `n`, `disabled`. |
792+
| `--depth <value>` | No | Deepest level below parentPath to include when recursive is true. |
791793

792794
</CommandTable>
793795

@@ -858,6 +860,34 @@ sim files delete <fileId> [options]
858860

859861
</CommandTable>
860862

863+
### sim files edit
864+
865+
Apply one exact or anchor-based edit to a text file
866+
867+
```bash
868+
sim files edit <fileId> [options]
869+
```
870+
871+
**Arguments**
872+
873+
<CommandTable>
874+
875+
| Argument | Required | Description |
876+
| --- | --- | --- |
877+
| `fileId` | Yes | File identifier. |
878+
879+
</CommandTable>
880+
881+
**Options**
882+
883+
<CommandTable>
884+
885+
| Option | Required | Description |
886+
| --- | --- | --- |
887+
| `--edit <json\|@file>` | Yes | One edit object: &#123;"mode":"search_replace","search":"old","content":"new","replaceAll":false&#125;, &#123;"mode":"replace_between","beforeAnchor":"start line","afterAnchor":"end line","content":"new"&#125;, &#123;"mode":"insert_after","anchor":"line","content":"new"&#125;, or &#123;"mode":"delete_between","startAnchor":"first line deleted","endAnchor":"ending line kept"&#125;. Anchored modes also accept occurrence starting at 1 (JSON, or @path / @- to read a file or stdin). |
888+
889+
</CommandTable>
890+
861891
### sim files describe
862892

863893
Show file metadata and sharing status
@@ -1006,6 +1036,8 @@ sim files read <fileId> [options]
10061036
| Option | Required | Description |
10071037
| --- | --- | --- |
10081038
| `--max-bytes <value>` | No | Optional ceiling on the source bytes fed to the parser, lowering but never raising the server limit. |
1039+
| `--offset <value>` | No | First line to return, 1-based. Absent starts at the first line. |
1040+
| `--limit <value>` | No | How many lines to return from `offset`. Absent reads to the end. |
10091041

10101042
</CommandTable>
10111043

@@ -1055,6 +1087,29 @@ sim files restore <fileId>
10551087

10561088
</CommandTable>
10571089

1090+
### sim files search
1091+
1092+
Search File Content
1093+
1094+
```bash
1095+
sim files search [options]
1096+
```
1097+
1098+
**Options**
1099+
1100+
<CommandTable>
1101+
1102+
| Option | Required | Description |
1103+
| --- | --- | --- |
1104+
| `--query <value>` | Yes | Regular expression, or exact text when `mode` is `exact`. |
1105+
| `--mode <value>` | No | How `query` is read. Accepted values: `exact`, `regex`. |
1106+
| `--max-results <value>` | No | Maximum matching lines to return. |
1107+
| `--folder <value...>` | No | Folders to search, by path as shown in the app; omit to search the whole workspace (space-separated, or @path / @- with one value per line; @@value for a literal leading @). |
1108+
| `--include-subfolders` | No | Whether each folder scope includes nested folders; on by default. |
1109+
| `--no-include-subfolders` | No | Send --include-subfolders as false. |
1110+
1111+
</CommandTable>
1112+
10581113
### sim files unzip
10591114

10601115
Unzip an archive into a new folder beside it

0 commit comments

Comments
 (0)