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
To install the most recent development version, run:
24
+
25
+
```shell
21
26
go install go.fd.io/govpp/cmd/govpp@master
22
27
```
23
28
24
-
## Getting Started with the GoVPP CLI
29
+
## Getting Started
25
30
26
31
The GoVPP CLI is a powerful tool for managing your VPP API development, maintenance and integration. With features such as VPP API schema export, comparison, linting, breaking change detector, Go code bindings generation and running a proxy or HTTP service for the VPP API, the GoVPP CLI offers a comprehensive solution for the VPP API management. The GoVPP CLI is designed to integrate seamlessly with your existing workflow, so you can focus on what matters most: write _great VPP APIs_ and develop control-plane apps to use them. Whether you are working with a small, focused project or a large, complex system, the GoVPP CLI is the perfect choice. In the next few minutes, you will learn how to use the GoVPP CLI to easily execute VPP CLI commands, generate code, compare schemas, and serve VPP API as an HTTP service.
27
32
@@ -44,98 +49,98 @@ Let's check the version of GoVPP CLI you'll be using is up-to-date.
44
49
govpp --version
45
50
```
46
51
52
+
This will print the version of GoVPP CLI.
53
+
47
54
## Usage
48
55
49
-
```
50
-
_________ ___ _________________
51
-
__ ____/_______ | / /__ __ \__ __ \
52
-
_ / __ _ __ \_ | / /__ /_/ /_ /_/ /
53
-
/ /_/ / / /_/ /_ |/ / _ ____/_ ____/
54
-
\____/ \____/_____/ /_/ /_/
56
+
The `govpp` command will print the usage help for the top-level commands and their subcommands by default.
Use "govpp [command] --help" for more information about a command.
75
80
```
76
81
77
-
### Print VPP API contents
82
+
### Show VPP API contents
78
83
79
-
The `vppapi` command allows you to print the VPP API files and their specific contents
84
+
The `vppapi ls` command allows you to print the VPP API files and their specific contents
80
85
in various formats. This can be useful for debugging or for generating documentation.
81
86
82
-
Here's an example usage of the `vppapi` command:
87
+
Here's an example usage of the `vppapi ls` command:
83
88
84
89
```sh
85
-
# List VPP API files for installed VPP
86
-
govpp vppapi
90
+
# List VPP API files for default input
91
+
govpp vppapi ls
87
92
```
88
93
89
94
You can use the `--input` flag to specify the input source for the VPP API files.
90
95
91
96
```sh
92
97
# Use current directory as input source (local VPP repository)
93
-
govpp vppapi --input="."
98
+
govpp vppapi ls .
94
99
```
95
100
96
101
The default format prints the output data in a table, but you can also specify
97
102
other output formats such as JSON, YAML or Go template using the `--format` flag.
98
103
99
104
```sh
100
-
# Print in common formats
101
-
govpp vppapi --format="json"
102
-
govpp vppapi --format="yaml"
105
+
# Print using common formats
106
+
govpp vppapi ls --format="json"
107
+
govpp vppapi ls --format="yaml"
103
108
104
-
# Print as a Go template
105
-
govpp vppapi --format='{{ printf "%+v" . }}'
109
+
# Print using a Go template
110
+
govpp vppapi ls --format='{{ printf "%+v" . }}'
106
111
```
107
112
108
113
You can use the `--show-contents`, `--show-messages`, `--show-raw`, and `--show-rpc`
109
114
flags to show specific parts of the VPP API file(s).
110
115
111
116
```sh
112
-
#Print VPP API file contents
113
-
govpp vppapi --show-contents
117
+
#List VPP API contents
118
+
govpp vppapi ls --show-contents
114
119
115
-
#Print VPP API messages
116
-
govpp vppapi --show-message
120
+
#List VPP API messages
121
+
govpp vppapi ls --show-message
117
122
118
-
#Print VPP API services
119
-
govpp vppapi --show-rpc
123
+
#List RPC services
124
+
govpp vppapi ls --show-rpc
120
125
121
-
# Print raw VPP API file
122
-
govpp vppapi --show-raw
126
+
# Print raw VPP API files
127
+
govpp vppapi ls --show-raw
123
128
```
124
129
125
130
You can also use the `--include-fields` and `--include-imported` flags to include
126
131
message fields and imported types, respectively.
127
132
128
133
For more information on the available flags and options, use the `-h` or `--help` flag.
129
134
130
-
### Lint VPP API files
135
+
### Run linter for VPP API definitions
131
136
132
137
The `lint` command allows you to run linter checks for your VPP API files. This can help you catch issues early and ensure that your code follows best practices.
This command compares the VPP API schema from `vppapi2210` directory against the VPP API schema in `vppapi2302` and lists the differences between them. The output shows related information details for each difference.
0 commit comments