Skip to content

Commit 075b90a

Browse files
authored
Update CLI Docs (#138)
* revamp cli manage records * finish 6-4 * finish 6-99 * remove unused assets * update instance
1 parent ad3a6c2 commit 075b90a

23 files changed

+20
-25
lines changed

docs/6-cli/3-cli-action-operations.md

+9-8
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,22 @@ coScene 的动作系统可以用来触发复杂的计算和处理过程,通过
1212
cocli action -h
1313
```
1414

15-
![cocli-action-help](./img/3-cocli-action-help.png)
15+
![cocli-action-help](./img/6-3-cocli-action-help.png)
1616

1717
# 列出当前项目中的动作
1818

1919
```bash
2020
cocli action list
2121
```
2222

23-
![cocli-list-actions](./img/cocli-list-actions.png)
23+
![cocli-list-actions](./img/6-3-cocli-list-actions.png)
2424

2525
默认 List 下,命令行会将项目中所有的动作都列出来。通过 Category 类别以及 Author 作者,
2626
我们可以更好的区分想要的动作。
2727

2828
当然我们也可以使用 `grep` 等标准命令来做进一步的筛选
29-
![cocli-list-actions-grep-system](./img/cocli-list-actions-grep-system.png)
29+
30+
![cocli-list-actions-grep-system](./img/6-3-action-list-filtering.png)
3031

3132
## 触发动作
3233

@@ -42,7 +43,7 @@ ACTION_ID=$(cocli action list | grep 'coScene-test' | cut -d ' ' -f1)
4243
cocli action run $ACTION_ID $RECORD_ID
4344
```
4445

45-
![cocli-run-action-manual-confirm](./img/cocli-run-action-manual-confirm.png)
46+
![cocli-run-action-manual-confirm](./img/6-3-run-action-confirm.png)
4647

4748
执行动作是一个比较消耗计算和存储资源的操作,在没有 `-f` 标识位的情况下,需要手动确认
4849
才会真正执行。如果对当前操作不需要进行手动确认的,可以使用 `-f` 标志直接跳过。这在批量
@@ -52,7 +53,7 @@ cocli action run $ACTION_ID $RECORD_ID
5253
cocli action run $ACTION_ID $RECORD_ID -f
5354
```
5455

55-
![cocli-run-action-force](./img/cocli-run-action-force.png)
56+
![cocli-run-action-force](./img/6-3-run-action-force.png)
5657

5758
较为复杂的动作可能会需要额外的参数对动作进行定制,您可以使用 `-p` 的标志位提供这些参数
5859

@@ -66,6 +67,6 @@ cocli action run $ACTION_ID $RECORD_ID -f -p 参数1=123 -p 参数2=456
6667

6768
成功触发之后,我们就可以在调用历史中查看我们触发的调用了。
6869

69-
## 找出某个动作的所有调用记录
70-
71-
## 根据状态过滤
70+
```bash
71+
cocli action list-run
72+
```

docs/6-cli/4-cli-common-batch-tasks.md

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,14 @@ sidebar_position: 4
77

88
## 上传同一个文件到项目中的所有记录中
99

10-
```
11-
cocli record list | grep -v 'ID' | cut -d ' ' -f1 | xargs -I {} cocli record upload {} ./FILE_FLAG
10+
```bash
11+
cocli record list | \
12+
grep -v 'ID' | \
13+
cut -d ' ' -f1 | \
14+
xargs -I {} cocli record upload {} ./FILE_FLAG
1215
```
1316

14-
![cocli-upload-file-to-all-records](./img/cocli-upload-file-to-all-records.png)
17+
![cocli-upload-file-to-all-records](./img/6-4-upload-file-to-all-records.png)
1518

1619
## 为当前目录下的所有文件夹建立一个记录并上传文件
1720

@@ -32,7 +35,7 @@ for dir in */; do
3235
done
3336
```
3437

35-
![cocli-create-and-upload-multiple-folders](./img/cocli-create-and-upload-multiple-folders.png)
38+
![cocli-create-and-upload-multiple-folders](./img/6-4-create-and-upload-multiple-folders.png)
3639

3740
打开网页端任意记录就可以看到,命令行将本地的文件夹内的所有文件和文件夹都上传到了对应记录
3841

docs/6-cli/99-advanced-features.md

-10
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,20 @@ sidebar_position: 99
1515
cocli login add -n <凭证名字> -p <项目Slug> -t <访问令牌>
1616
```
1717

18-
下面的截图展示了添加了一个名为 typ 的登陆凭证
19-
20-
![cocli-add-login-profile](./img/cocli-add-login-profile.png)
21-
2218
我们可以使用如下命令来获取当前所有可用的凭证
2319

2420
```bash
2521
cocli login list
2622
```
2723

28-
![cocli-list-login-profiles](./img/cocli-list-login-profiles.png)
29-
3024
在不同的登陆凭证中间切换也非常容易
3125

3226
```bash
3327
cocli login switch
3428
```
3529

36-
![cocli-login-switch-interactive](./img/cocli-login-switch-interactive.png)
37-
3830
在运行命令后的交互提示中,用箭头来选择想要切换到的登陆凭证,回车确认选择
3931

40-
![cocli-login-switch-confirm](./img/cocli-login-switch-confirm.png)
41-
4232
切换完成之后会提示当前激活的登陆凭证,也可以用如下命令来确认
4333

4434
```
-98.8 KB
Binary file not shown.
192 KB
Loading
111 KB
Loading
229 KB
Loading
15 KB
Loading
14.5 KB
Loading
Loading
Loading

docs/6-cli/img/cli-record-help.png

-149 KB
Binary file not shown.
-51.9 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/6-cli/img/cocli-list-actions.png

-234 KB
Binary file not shown.
-59.1 KB
Binary file not shown.
-50.4 KB
Binary file not shown.
Binary file not shown.
-23.5 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

i18n/en/docusaurus-plugin-content-docs/current/6-cli/1-cli-install.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ slug: install
33
sidebar_position: 1
44
---
55

6-
# Installation and Initialization
6+
# Install and Init
77

88
## Installation
99

10-
Run the following command in the terminal to install the latest version of the Coscene CLI tool:
10+
Run the following command in the terminal to install the latest version of the coScene CLI tool:
1111

1212
```Bash
1313
curl -fL https://download.coscene.cn/cocli/install.sh | sh
1414
```
1515

1616
You can use `cocli -h` in the terminal to confirm that the CLI tool has been successfully installed and to see the basic usage of the tool.
17+
1718
![cocli-help](./img/cocli-help.png)
1819

1920
### Update to the Latest Version
@@ -48,7 +49,7 @@ cocli login set -p <PROJECT_SLUG> -t <TOKEN>
4849
```
4950

5051
:::info
51-
If your are an Enterprise user with a dedicated instance, you will have to
52+
If your are an Enterprise user with an on-premise instance, you will have to
5253
specify your instance's endpoint
5354

5455
eg. https://server2.coscene.cn -> https://openapi.server2.coscene.cn

0 commit comments

Comments
 (0)