Skip to content

Commit 776b142

Browse files
committed
docs: updated cli desription
1 parent 2cea2f3 commit 776b142

File tree

1 file changed

+28
-12
lines changed

1 file changed

+28
-12
lines changed

README.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,19 @@ This repository contains all definitions for Code0. These definitions will be us
44
## Definition CLI
55

66
### Setup
7+
First download cargo to use the cli.
78
[Install Cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html)
89

10+
Then run:
11+
```bash
12+
cargo install code0-cli
13+
```
14+
15+
After the cli compiled succesfully you can use it via:
16+
```bash
17+
code0-cli
18+
```
19+
920
### Usage
1021
(Stay inside the root directory when running the command)
1122

@@ -14,43 +25,48 @@ Will download the latest Definitions from the Code0 Definition Repository.
1425

1526
If no feature is specified, all features will be downloaded. If a feature is specified, only that feature will be kept & can be loaded by one of the following languages: TypeScript, Rust.
1627

28+
-f (--features) is a list of features that will be downloaded.
29+
-t (--tag) is the version tag of the release you want to select.
30+
1731
```bash
18-
./cargo run download
19-
./cargo run download -f feature_1 feature_2 feature_3
32+
code0-cli download
33+
code0-cli download -t def-0.0.8
34+
code0-cli download -f feature_1 feature_2 feature_3
35+
code0-cli download -t def-0.0.8 -f feature_1 feature_2 feature_3
2036
```
2137

2238
#### General Report
2339
Will create a report of all errors in the definitions.
2440

2541
```bash
26-
./cargo run report
27-
./cargo run report -p /path/to/definitions
42+
code0-cli report
43+
code0-cli report -p /path/to/definitions
2844
```
2945

3046
#### Feature Report
3147
Will create a report of all errors in the definitions for a specific feature. Will also report on all specified functions, data types, and flow types.
3248

3349
```bash
34-
./cargo run feature
35-
./cargo run feature -p /path/to/definitions
36-
./cargo run feature -f feature_name
37-
./cargo run feature -f feature_name -p /path/to/definitions
50+
code0-cli feature
51+
code0-cli feature -p /path/to/definitions
52+
code0-cli feature -f feature_name
53+
code0-cli feature -f feature_name -p /path/to/definitions
3854
```
3955

4056
#### Watch for Changes
4157
Will run the report each time a definition file changes.
4258

4359
```bash
44-
./cargo run watch
45-
./cargo run watch -p /path/to/definitions
60+
code0-cli watch
61+
code0-cli watch -p /path/to/definitions
4662
```
4763

4864
#### Definition
4965
Will search for a specific definition.
5066

5167
```bash
52-
./cargo run definition -n definition_name
53-
./cargo run definition -n definition_name -p /path/to/definitions
68+
code0-cli definition -n definition_name
69+
code0-cli definition -n definition_name -p /path/to/definitions
5470
```
5571

5672
## TypeScript Definition Package

0 commit comments

Comments
 (0)