Command Line Reference

Categories and Command Structure

Meshery CLI commands are categorized by function, which are:

  • mesheryctl - Global flags and CLI configuration
  • mesheryctl system - Meshery Lifecycle and Troubleshooting
  • mesheryctl adapter - Lifecycle & Configuration Management: provisioning and configuration best practices
  • mesheryctl perf - Performance Management: Workload and cloud native performance characterization
  • mesheryctl design - Design Patterns: Cloud native patterns and best practices
  • mesheryctl filter - Data Plane Intelligence: Registry and configuration of WebAssembly filters for Envoy
  • mesheryctl model - A unit of packaging to define managed infrastructure and their relationships, and details specifics of how to manage them.
  • mesheryctl component - Fundamental building block used to represent and define the infrastructure under management
  • mesheryctl registry - Model Database: Manage the state and contents of Meshery’s internal registry of capabilities.
  • mesheryctl environment - Logical group of connections and their associated credentials.
  • mesheryctl connection - Managed or unmanaged resources that either through discovery or manual entry are tracked by Meshery.
  • mesheryctl exp - Experimental features

Global Commands and Flags

CommandSubcommandFlagFunction
mesheryctlA global command that displays an overview of all commands.
--configconfigures Meshery with the meshconfig, generated with the help of user details to provide cluster access for public clouds(GKE/EKS).
--help, -hDisplays helpful information about any command.
--verbose, -vSets the log level to debug for verbose output and displays verboose/debug logs.
completionOutput shell completion code for the specified shell.
versionDisplays the version of the Meshery Client (mesheryctl) and the SHA of the release binary.

Meshery Lifecycle Management and Troubleshooting

Installation, troubleshooting and debugging of Meshery and its adapters

CommandSubcommandFlagFunction
systemLifecycle management of Meshery deployments
--context, -cTemporarily override your current context by specifying an alternative context as an argument.
checkRun system checks for both pre and post mesh deployment scenarios on Meshery
--adapterRun checks on specific mesh adapter
--adaptersCheck status of meshery adapters
--componentsCheck status of Meshery components
--operatorVerify the health of Meshery Operator's deployment with MeshSync and Broker
--preflight, --preRun Pre-mesh deployment checks (Docker and Kubernetes)
configConfigures Meshery to use a Kubernetes cluster.
--tokenPath to token for authenticating to Meshery API.
dashboardOpen Meshery UI in browser.
--port-forward(optional) Use port forwarding to access Meshery UI
--skip-browser(optional) skip opening of MesheryUI in browser.
loginAuthenticate with the Meshery Provider of your choice: the Local Provider or a Remote Provider.
--provider, -pLogin Meshery with specified provider
logoutInvalidate current session with your Meshery Provider.
logsStarts tailing Meshery server debug logs
--follow, -f(Optional) Follow the stream of the Meshery's logs. Defaults to false.
resetResets meshery.yaml file with a copy from Meshery repo
restartrestart all Meshery containers, their instances and their connected volumes
--skip-update(optional) skip checking for new updates available in Meshery.
startStart Meshery
--platform, -pplatform to deploy Meshery to.
--resetReset Meshery’s configuration file to default settings.
--skip-browser(optional) skip opening of MesheryUI in browser.
--skip-update(optional) skip checking for new updates available in Meshery.
statusCheck status of Meshery, Meshery adapters, Meshery Operator and its controllers.
--verbose, -v(optional) Extra data in status table
stopStop Meshery
--force(optional) uninstall Meshery resources forcefully
--keep-namespace(optional) keep the Meshery namespace during uninstallation
--resetReset Meshery’s configuration file to default settings.
updatePull new Meshery images from Docker Hub. Does not update `mesheryctl`. This command may be executed while Meshery is running.
--skip-resetPull the latest manifest files

Cloud Native Performance Management

CommandSubcommandFlagFunction
perfPerformance Management and Benchmarking using Meshery CLI
--output-format, -oformat to display in json or yaml.
--token(required) Path to Meshery user's access token.
applyRuns Performance test using existing profiles or using flags.
--cert-path(optional) Path to the certificate to be used for the load test
--concurrent-requestsNumber of Parallel Requests (default: 1).
--disable-cert(optional) Do not use certificate present in the profil
--durationLength of the test.
--filePath to cloud native performance test configuration file (default: empty string).
--load-generatorChoice of load generator - fortio (OR) wrk2 (default: fortio).
--meshName of the system under test.
--nameA memorable name for the test (default: random string).
--qpsQueries per second (default: 0) (0 - means to use the CPU unbounded to generate as many requests as possible).
--url(required/optional) URL of the endpoint send load to during testing.
profileList all the available performance profiles
--page, -p(optional) List next set of performance profiles with --page (default = 1) (default 1).
--view(optional) View more information of the performance profile.
resultView the results of a performance profile.
--page, -p(optional) List next set of performance results with --page (default = 1) (default 1).
--view(optional) View more information of the performance test results.

Cloud Native Lifecycle and Configuration Management

CommandSubcommandFlagFunction
adapterLifecycle management of cloud native infrastructure
deployDeploy infrastructure into the cluster
--adapter, -a(required) adapter to use for validation. Defaults to "meshery-osm:10010"
--namespace, -nKubernetes namespace to be used for deploying the validation tests and sample workload
--tokenpath, -t(required) path to token for authenticating to Meshery API
removeRemove infrastructure in the connected Kubernetes cluster
--namespace, -nKubernetes namespace to be used for removing infrastrucutre under a specific namespace
validatevalidate configuration conformance to different standard specifications
--adapter, -a(required) adapter to use for validation. Defaults to "meshery-osm:10010"
--namespace, -nKubernetes namespace to be used for deploying the validation tests and sample workload
--spec, -s(required) specification to be used for conformance test. Defaults to "smi"
--tokenpath, -t(required) path to token for authenticating to Meshery API

Cloud Native Design Configuration and Management

CommandSubcommandFlagFunction
designManage cloud native infrastructure using predefined design patterns
--file, -f(required) path to design file.
applyapply design file will trigger deploy of the design file
--file, -fapply design file will trigger deploy of the design file and also supports file retrieval from GitHub
deleteDeprovision cloud native infrastructure using a design /design file
--file, -fDeletes the resources that were created, using design file
exportExport a design from Meshery
--output, -oSpecify the output directory to save the design
--typeSpecify the design type to export (default current). Supported types are oci,current,original
importImport app manifests
--file, -fPath/URL to app file
--source-type, -sType of source file (ex. manifest / compose / helm)
listDisplays a list of available design files
--count, -cdisplay the total number of available designs
--page, -plist designs by specific page number (10 designs per page)
--pagesizenumber of designs to be displayed per page (default 10)
--verbose, -vshow all design file metadata
offboardOffboard application
--file, -fOffboard application with an application file
onboardOnboard application
--file, -fOnboard application with application file
--skip-saveSkip saving an application
--source-type, -sType of source file (ex. manifest / compose / helm)
viewdisplays the contents of a specific design file
--all, -ashow all design file content
-o jsondisplay the content of a design in json format

Data Plane Intelligence

CommandSubcommandFlagFunction
filterEnvoy Filter Management
deleteDelete filter from Meshery Server
importUpload WASM filter file to Meshery Server
--name, -n(optional) filter name
--wasm-config, -w(optional) WASM configuration filepath/string
listList all WASM filters
--verbose, -vDisplay full length user and filter file identifiers
viewView the specified WASM filter
--all, -a(optional) view all filters available
--output-format, -o(optional) format to display in [json|yaml] (default "yaml")

Meshery Registry Management

CommandSubcommandFlagFunction
registryManage the state and contents of Meshery's internal registry of capabilities.
--help, -hhelp for registry
generateGenerate Models to the registry
--output-format, -o(optional) format to display in [md | mdx | js]
--registrant-credpath pointing to the registrant credetial definition
--registrant-defpath pointing to the registrant connection definition
--spreadsheet-credbase64 encoded credential to download the spreadsheet
--spreadsheet-idid of the spreadsheet to download
publishPublish Meshery Models to Websites, Remote Provider, Meshery Server
--output-format, -o(optional) format to display in [md | mdx | js]
updateUpdate the registry with latest data.
--input, -i(optional) path to capability file
--spreadsheet-credbase64 encoded credential to download the spreadsheet
--spreadsheet-idid of the spreadsheet to download

Meshery Models

CommandSubcommandFlagFunction
modelA unit of packaging to define managed infrastructure and their relationships, and details specifics of how to manage them.
--count(optional) Get the number of models in total
--help, -hhelp for model
buildCreate an OCI-compliant package from the model files
--path, -p(optional) looks for a model folder under specified path, defaults to current dir.
exportExport a model by name to the given output type (default is oci).
generateGenerate models by specifying the directory, file, or URL.
--file, -fSpecify the path to the file, directory, or URL.
--register, -rSkip model registration (default is true).
--template, -tSpecify the path to the template JSON file (only required for URLs).
importImport models using a file or filepath directly to the meshery registry
--file, -f(optional) path to a single model file to import from local filesystem or URL to import from web location
initScaffold a folder structure for model creation
--output-format, -o(optional) format to scaffold files to, supports json or yaml, planned to support csv, defaults to json.
--path, -p(optional) generates a folder structure under specified path, defaults to current dir.
--version(optional) model version, defaults to v0.1.0
listList models present in the registry
--page, -plist models by specific page number (25 models per page)
searchUsing a keyword(s) search the registry for matching model(s)
viewView details of a specific model
-o, --output-format(optional) format to display in [json|yaml] (default "yaml")

Meshery Components

CommandSubcommandFlagFunction
componentFundamental building block used to represent and define the infrastructure under management
--count(optional) Get the number of components in total
--help, -hhelp for components
listList all components registered in Meshery Server
--page, -plist components by specific page number (25 models per page)
searchUsing a keyword(s) search the registry for matching component(s)
viewView details of a specific component
-o, --output-format(optional) format to display in [json|yaml] (default "yaml")
--saveSave output as a JSON/YAML file

Meshery Environment

CommandSubcommandFlagFunction
environmentLogical group related to connections and their credentials
createcreate a new environments by providing the name and description of the environment
-d, --descriptiondescription of the specified environment
--name, -n(optional) name of the environment
-o, --orgIdorganization id
deletedelete a new environments by providing the name and description of the environment
listlist name of all registered environments
-o, --orgIdorganization id
viewview a environments registered in Meshery Server
-o, --output-format(optional) format to display in [json|yaml] (default "yaml")
-s, --save(optional) save output as a JSON/YAML file

Meshery Connection

CommandSubcommandFlagFunction
connectionManage Meshery connections
--count(optional) Get the total number of connections
--help, -hhelp for connection
createCreate a new connection to a Kubernetes cluster or other supported platform
--token(optional) Path to token for authenticating to Meshery API
-t, --type(required) type of connection to create (aks, eks, gke, minikube)
deletedelete a connection
listlist all the connections
--count(optional) Get the total number of connections
-k, --kind(optional) Filter by kind (repeatable)
-p, --page(optional) List a set of connection in specific page (default=1).
--pagesize(optional) Number of connections per page (default=10).
-s, --status(optional) Filter by status (repeatable)
viewview a connection queried by the connection id
-o, --output-format(optional) format to display in [json|yaml] (default "yaml")
-s, --save(optional) save output as a JSON/YAML file

Experimental Features(exp)

CommandSubcommandFlagFunction
organization--count(optional) Get the total of registrered organizations
--help, -hhelp for organization command
listList all organizations registered in Meshery Server
--count(optional) Get the total of registrered organizations
--page, -plist organizations by specific page number (25 models per page)
relationshipgenerategenerate relationships docs from the google spreadsheets
-s, --sheetIdgoogle sheet id
listlist all relationships registered in Meshery Server
-p, --page(optional) List next set of exp relationship list with --page (default = 1) (default 1).
searchsearch for relationship using a query
-k --kindkind of relationships
-m, --modelmodel name
-s, --subtypesubtype of relationships
-t, --typetype of relationships
viewview a relationship queried by the model name
-o, --output-format(optional) format to display in [json|yaml] (default "yaml")
workspacecreatecreate a new workspace by providing the name, description, and organization ID
-d, --descriptiondescription of the workspace
-n, --namename of the workspace
-o, --orgIdorganization id
listlist name of all registered workspaces
-o, -orgIdorganization id

Frequently Asked Questions for Meshery CLI

Refer the following Frequently asked questions related to Meshery CLI.

See Also