Skip to content

Commit 92db193

Browse files
committed
feat: add cli overview and run command documents.
Signed-off-by: peefy <xpf6677@163.com>
1 parent e3020d8 commit 92db193

File tree

8 files changed

+302
-176
lines changed

8 files changed

+302
-176
lines changed

docs/tools/cli/kcl/overview.md

Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 0
33
---
44

55
# Overview
@@ -24,53 +24,34 @@ KCL toolchain is a toolset of KCL language, which aims to improve the efficiency
2424
| | NeoVim KCL extension | Provide assistance for KCL in coding and compiling on NeoVim |
2525
| | VS Code KCL extension | Provide assistance for KCL in coding and compiling on VS Code |
2626

27-
## KCL Tool
28-
29-
### Args
27+
## Args
3028

3129
```shell
32-
This command runs the kcl code and displays the output. 'kcl run' takes multiple input for arguments.
33-
34-
For example, 'kcl run path/to/kcl.k' will run the file named path/to/kcl.k
35-
3630
Usage:
37-
run [flags]
38-
39-
Aliases:
40-
run, r
41-
42-
Examples:
43-
# Run a single file and output YAML
44-
kcl run path/to/kcl.k
31+
kcl [command]
32+
33+
Available Commands:
34+
clean KCL clean tool
35+
completion Generate the autocompletion script for the specified shell
36+
doc KCL document tool
37+
fmt KCL format tool
38+
import KCL import tool
39+
lint Run KCL codes.
40+
mod KCL module management
41+
play Open the kcl playground in the browser.
42+
registry KCL registry management
43+
run Run KCL codes.
44+
server Run a KCL server
45+
test KCL test tool
46+
version Show version of the KCL CLI
47+
vet KCL validation tool
4548

46-
# Run a single file and output JSON
47-
kcl run path/to/kcl.k --format json
48-
49-
# Run multiple files
50-
kcl run path/to/kcl1.k path/to/kcl2.k
51-
52-
# Run OCI packages
53-
kcl run oci://ghcr.io/kcl-lang/hello-world
54-
55-
# Run the current package
56-
kcl run
49+
Flags:
50+
-h, --help help for kcl
51+
-v, --version version for kcl
5752

53+
Additional help topics:
54+
kcl
5855

59-
Flags:
60-
-D, --argument strings Specify the top-level argument
61-
-d, --debug Run in debug mode
62-
-n, --disable_none Disable dumping None values
63-
-E, --external strings Specify the mapping of package name and path where the package is located
64-
--format string Specify the output format (default "yaml")
65-
-h, --help help for run
66-
--no_style Set to prohibit output of command line waiting styles, including colors, etc.
67-
-o, --output string Specify the YAML/JSON output file path
68-
-O, --overrides strings Specify the configuration override path and value
69-
-S, --path_selector strings Specify the path selectors
70-
-q, --quiet Set the quiet mode (no output)
71-
-Y, --setting strings Specify the command line setting files
72-
-k, --sort_keys Sort output result keys
73-
-r, --strict_range_check Do perform strict numeric range checks
74-
-t, --tag string Specify the tag for the OCI or Git artifact
75-
-V, --vendor Run in vendor mode
56+
Use "kcl [command] --help" for more information about a command.
7657
```

docs/tools/cli/kcl/run.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Run
6+
7+
This command runs the kcl code and displays the output. 'kcl run' takes multiple input for arguments.
8+
9+
## Args
10+
11+
```shell
12+
Usage:
13+
kcl run [flags]
14+
15+
Aliases:
16+
run, r
17+
18+
Examples:
19+
# Run a single file and output YAML
20+
kcl run path/to/kcl.k
21+
22+
# Run a single file and output JSON
23+
kcl run path/to/kcl.k --format json
24+
25+
# Run multiple files
26+
kcl run path/to/kcl1.k path/to/kcl2.k
27+
28+
# Run OCI packages
29+
kcl run oci://ghcr.io/kcl-lang/hello-world
30+
31+
# Run the current package
32+
kcl run
33+
34+
35+
Flags:
36+
-D, --argument strings Specify the top-level argument
37+
-d, --debug Run in debug mode
38+
-n, --disable_none Disable dumping None values
39+
-E, --external strings Specify the mapping of package name and path where the package is located
40+
--format string Specify the output format (default "yaml")
41+
-h, --help help for run
42+
--no_style Set to prohibit output of command line waiting styles, including colors, etc.
43+
-o, --output string Specify the YAML/JSON output file path
44+
-O, --overrides strings Specify the configuration override path and value
45+
-S, --path_selector strings Specify the path selectors
46+
-q, --quiet Set the quiet mode (no output)
47+
-Y, --setting strings Specify the command line setting files
48+
-k, --sort_keys Sort output result keys
49+
-r, --strict_range_check Do perform strict numeric range checks
50+
-t, --tag string Specify the tag for the OCI or Git artifact
51+
-V, --vendor Run in vendor mode
52+
```
Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 0
33
---
44

55
# 概览
@@ -24,53 +24,34 @@ KCL 工具链是 KCL 语言的工具集合,旨在提升 KCL 的批量迁移、
2424
| | NeoVim KCL 插件 | 提供 NeoVim 平台的 KCL 编写、编译辅助 |
2525
| | VS Code KCL 插件 | 提供 VS Code 平台的 KCL 编写、编译辅助 |
2626

27-
## KCL 工具
28-
29-
### 命令行参数
27+
## 参数说明
3028

3129
```shell
32-
This command runs the kcl code and displays the output. 'kcl run' takes multiple input for arguments.
33-
34-
For example, 'kcl run path/to/kcl.k' will run the file named path/to/kcl.k
35-
3630
Usage:
37-
run [flags]
38-
39-
Aliases:
40-
run, r
41-
42-
Examples:
43-
# Run a single file and output YAML
44-
kcl run path/to/kcl.k
31+
kcl [command]
32+
33+
Available Commands:
34+
clean KCL clean tool
35+
completion Generate the autocompletion script for the specified shell
36+
doc KCL document tool
37+
fmt KCL format tool
38+
import KCL import tool
39+
lint Run KCL codes.
40+
mod KCL module management
41+
play Open the kcl playground in the browser.
42+
registry KCL registry management
43+
run Run KCL codes.
44+
server Run a KCL server
45+
test KCL test tool
46+
version Show version of the KCL CLI
47+
vet KCL validation tool
4548

46-
# Run a single file and output JSON
47-
kcl run path/to/kcl.k --format json
48-
49-
# Run multiple files
50-
kcl run path/to/kcl1.k path/to/kcl2.k
51-
52-
# Run OCI packages
53-
kcl run oci://ghcr.io/kcl-lang/hello-world
54-
55-
# Run the current package
56-
kcl run
49+
Flags:
50+
-h, --help help for kcl
51+
-v, --version version for kcl
5752

53+
Additional help topics:
54+
kcl
5855

59-
Flags:
60-
-D, --argument strings Specify the top-level argument
61-
-d, --debug Run in debug mode
62-
-n, --disable_none Disable dumping None values
63-
-E, --external strings Specify the mapping of package name and path where the package is located
64-
--format string Specify the output format (default "yaml")
65-
-h, --help help for run
66-
--no_style Set to prohibit output of command line waiting styles, including colors, etc.
67-
-o, --output string Specify the YAML/JSON output file path
68-
-O, --overrides strings Specify the configuration override path and value
69-
-S, --path_selector strings Specify the path selectors
70-
-q, --quiet Set the quiet mode (no output)
71-
-Y, --setting strings Specify the command line setting files
72-
-k, --sort_keys Sort output result keys
73-
-r, --strict_range_check Do perform strict numeric range checks
74-
-t, --tag string Specify the tag for the OCI or Git artifact
75-
-V, --vendor Run in vendor mode
56+
Use "kcl [command] --help" for more information about a command.
7657
```
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# 运行 KCL 代码
6+
7+
## 参数说明
8+
9+
```shell
10+
Usage:
11+
kcl run [flags]
12+
13+
Aliases:
14+
run, r
15+
16+
Examples:
17+
# Run a single file and output YAML
18+
kcl run path/to/kcl.k
19+
20+
# Run a single file and output JSON
21+
kcl run path/to/kcl.k --format json
22+
23+
# Run multiple files
24+
kcl run path/to/kcl1.k path/to/kcl2.k
25+
26+
# Run OCI packages
27+
kcl run oci://ghcr.io/kcl-lang/hello-world
28+
29+
# Run the current package
30+
kcl run
31+
32+
33+
Flags:
34+
-D, --argument strings Specify the top-level argument
35+
-d, --debug Run in debug mode
36+
-n, --disable_none Disable dumping None values
37+
-E, --external strings Specify the mapping of package name and path where the package is located
38+
--format string Specify the output format (default "yaml")
39+
-h, --help help for run
40+
--no_style Set to prohibit output of command line waiting styles, including colors, etc.
41+
-o, --output string Specify the YAML/JSON output file path
42+
-O, --overrides strings Specify the configuration override path and value
43+
-S, --path_selector strings Specify the path selectors
44+
-q, --quiet Set the quiet mode (no output)
45+
-Y, --setting strings Specify the command line setting files
46+
-k, --sort_keys Sort output result keys
47+
-r, --strict_range_check Do perform strict numeric range checks
48+
-t, --tag string Specify the tag fo
49+
```
Lines changed: 25 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 1
2+
sidebar_position: 0
33
---
44

55
# 概览
@@ -24,53 +24,34 @@ KCL 工具链是 KCL 语言的工具集合,旨在提升 KCL 的批量迁移、
2424
| | NeoVim KCL 插件 | 提供 NeoVim 平台的 KCL 编写、编译辅助 |
2525
| | VS Code KCL 插件 | 提供 VS Code 平台的 KCL 编写、编译辅助 |
2626

27-
## KCL 工具
28-
29-
### 命令行参数
27+
## 参数说明
3028

3129
```shell
32-
This command runs the kcl code and displays the output. 'kcl run' takes multiple input for arguments.
33-
34-
For example, 'kcl run path/to/kcl.k' will run the file named path/to/kcl.k
35-
3630
Usage:
37-
run [flags]
38-
39-
Aliases:
40-
run, r
41-
42-
Examples:
43-
# Run a single file and output YAML
44-
kcl run path/to/kcl.k
31+
kcl [command]
32+
33+
Available Commands:
34+
clean KCL clean tool
35+
completion Generate the autocompletion script for the specified shell
36+
doc KCL document tool
37+
fmt KCL format tool
38+
import KCL import tool
39+
lint Run KCL codes.
40+
mod KCL module management
41+
play Open the kcl playground in the browser.
42+
registry KCL registry management
43+
run Run KCL codes.
44+
server Run a KCL server
45+
test KCL test tool
46+
version Show version of the KCL CLI
47+
vet KCL validation tool
4548

46-
# Run a single file and output JSON
47-
kcl run path/to/kcl.k --format json
48-
49-
# Run multiple files
50-
kcl run path/to/kcl1.k path/to/kcl2.k
51-
52-
# Run OCI packages
53-
kcl run oci://ghcr.io/kcl-lang/hello-world
54-
55-
# Run the current package
56-
kcl run
49+
Flags:
50+
-h, --help help for kcl
51+
-v, --version version for kcl
5752

53+
Additional help topics:
54+
kcl
5855

59-
Flags:
60-
-D, --argument strings Specify the top-level argument
61-
-d, --debug Run in debug mode
62-
-n, --disable_none Disable dumping None values
63-
-E, --external strings Specify the mapping of package name and path where the package is located
64-
--format string Specify the output format (default "yaml")
65-
-h, --help help for run
66-
--no_style Set to prohibit output of command line waiting styles, including colors, etc.
67-
-o, --output string Specify the YAML/JSON output file path
68-
-O, --overrides strings Specify the configuration override path and value
69-
-S, --path_selector strings Specify the path selectors
70-
-q, --quiet Set the quiet mode (no output)
71-
-Y, --setting strings Specify the command line setting files
72-
-k, --sort_keys Sort output result keys
73-
-r, --strict_range_check Do perform strict numeric range checks
74-
-t, --tag string Specify the tag for the OCI or Git artifact
75-
-V, --vendor Run in vendor mode
56+
Use "kcl [command] --help" for more information about a command.
7657
```

0 commit comments

Comments
 (0)