mesheryctl/

directory
v0.7.11-patch.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2024 License: Apache-2.0

README

mesheryctl

mesheryctl is the CLI client for Meshery.

Contributing

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.

Building and running 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.

mesheryctl command reference

Detailed documentation of the mesheryctl commands is available in the Meshery Docs.

General guidelines and resources

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-

  1. Provide user experiences that are familiar.
  2. Make the commands and their behavior intuitive.
  3. Avoid long commands with chained series of flags.
  4. 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL