mesheryctl
is the CLI client for Meshery.
Please refer the Meshery Contributing Guidelines for setting up your development environment.
Refer the mesheryctl- Command Reference and Tracker for current status of mesheryctl
.
For a quick introduction to mesheryctl
, checkout Beginner's guide to contributing to Meshery and mesheryctl.
The /mesheryctl
folder contains the complete code for mesheryctl
.
mesheryctl
is written in Golang or the Go Programming Language. For development use Go version 1.15+.
After making changes, run make
in the mesheryctl
folder to build the binary. You can then use the binary by, say, ./mesheryctl system start
.
Refer the Meshery CLI Commands and Documentation for a complete reference of mesheryctl
.
Detailed documentation of the mesheryctl
commands is available in the Meshery Docs.
mesheryctl
might be the interface that the users first have with Meshery. As such, mesheryctl
needs to provide a great UX.
The following principles should be taken in mind while designing mesheryctl
commands-
- Provide user experiences that are familiar.
- Make the commands and their behavior intuitive.
- Avoid long commands with chained series of flags.
- Design with automated testing in mind, e.g. provide possibility to specify output format as json (-o json) for easy inspection of command response.
Part of delivering a great user experience is providing intuitive interfaces. In the case of mesheryctl
, we should take inspiration from and deliver similar user experiences as popular CLIs do in this ecosystem, like kubectl
and docker
. Here is relevant kubectl
information to reference - Kubectl SIG CLI Community Meeting Minutes, contributing to kubectl, code.
mesheryctl
uses the Cobra framework. A good first-step towards contributing to mesheryctl
would be to familiarise yourself with the Cobra concepts.
For manipulating config files, mesheryctl
uses Viper.
A central struct
is maintained in the mesheryctl/internal/cli/root/config/config.go
file. These are updated and should be used for getting the Meshery configuration.
For logs, mesheryctl
uses Logrus. Going through the docs and understanding the different log-levels will help a lot.
mesheryctl
uses golangci-lint. Refer it for lint checks.
All contributors are invited to review pull requests on mesheryctl
as on other Layer5 projects.