npm.io
0.2.5 • Published 6 years agoCLI

xmesh

Licence
ISC
Version
0.2.5
Deps
13
Size
134 kB
Vulns
25
Weekly
0

Xmesh Cli

Description

Xmesh command line tool for create, develop and publish algorithms, it could help algorithm programmer develop more faster, more concentrated and more simple.

Install

npm install xmesh -g

or

yarn global add xmesh

Usage

After install, run xmesh or xm in terminal

> xmesh

DEBUG MODE

> DEBUG=* xmesh
Common
  • run xm --version to get the cli version

  • run xm help <commander> to get the commander help

Update xm command line tool version
  • run xm update to install the latest xmesh cli version
Login

Xmesh-Cli is a common command line tool, you can connect to any Asteria platform you want by configuration

  • create env file named xmesh.env

  • env file contents

    HOST={asteria-host}
    ACCESS_TOKEN={asteria-token}
    USER={asteria-user}
    PASSWORD={asteria-user-password}
  • run xm login --env xmesh.env to init the config

Init Project
  • run xm init
  • init sucessfully
Create Algorithm
  • run xm create -n {algorithm name} to create algorithm-name algorithm, it will download algorithm-name.zip package to your pc.
Read My Algorithms
  • run xm read -t algorithm // get my all algorithms

  • run xm read -t algorithm -n abc // get algorithm named as abc

  • read more useage by xm help read

Upload Algorithm
  • go to the root folder of your algorithm

  • run xm upload -v {algorithm version} -n {algorithm name} to upload current algorithm codes to asteria

Download Algorithm
  • run xm download -v {algorithm version} -n {algorithm name} to download current algorithm codes from asteria
Export Algorithm
  • run xm export -v {algorithm version} -n {algorithm name} to export current algorithm with its dependencies from asteria
Import Algorithm
  • go to the root folder of your algorithm

  • run xm import -v {algorithm version} -n {algorithm name} to import current algorithm with its dependencies to asteria

Publish Algorithm
  • go to the root folder of your algorithm

  • run xm publish -v {algorithm version} -n {algorithm name} to publish current algorithm to asteria

Delete Algorithm
  • run xm delete -n abc // delete algorithm named by abc
Offline Algorithm
  • run xm offline -n abc // offline algorithm named by abc

Keywords