@mimik/mimik-edge-cli

2.0.0 • Public • Published

mimik-edge-cli

mimik edge engine command line interface (CLI) for edge microservice developer to utilize our edge engine.

Installation

npm install -g @mimik/mimik-edge-cli

Usage

$ npm install -g @mimik/mimik-edge-cli
$ mimik-edge-cli COMMAND
running command...
$ mimik-edge-cli (-v|--version|version)
@mimik/mimik-edge-cli/2.0.0 darwin-x64 node-v18.1.0
$ mimik-edge-cli --help [COMMAND]
USAGE
  $ mimik-edge-cli COMMAND
...

Commands

mimik-edge-cli account:associate

to associate local edge engine with access token to secure ownership of communication channel, either provides FILE PATH or TOKEN.

USAGE
  $ mimik-edge-cli account associate

OPTIONS
  -a, --api-key-file=api-key-file  path of file that contains API key for JSONRPC
  -f, --token-file=token-file      path of file that contains edge access token
  -k, --api-key=api-key            API key for JSONRPC
  -t, --token=token                edge access token obtained from CLI

mimik-edge-cli account:get-edge-access-token

to obtain edge access token with developer ID token obtained from developer console, either provides FILE PATH or TOKEN.

USAGE
  $ mimik-edge-cli account get-edge-access-token

OPTIONS
  -a, --api-key-file=api-key-file  path of file that contains API key for JSONRPC
  -f, --token-file=token-file      path of file that contains developer ID token from developer console
  -k, --api-key=api-key            API key for JSONRPC
  -t, --token=token                developer ID token from developer console
  --use-mid-v1                     get edge_access_token using mID v1

mimik-edge-cli account:get-edge-id-token

to obtain edge ID token of local node

USAGE
  $ mimik-edge-cli account get-edge-id-token

OPTIONS
  -a, --api-key-file=api-key-file  path of file that contains API key for JSONRPC
  -k, --api-key=api-key            API key for JSONRPC

mimik-edge-cli account:get-me

to obtain status of current node

USAGE
  $ mimik-edge-cli account get-me

mimik-edge-cli container:delete

to delete container runtime from edge engine microservice container management service.

USAGE
  $ mimik-edge-cli container delete

OPTIONS
  -f, --token-file=token-file  path of file that contains edge access token
  -i, --id=id                  (required) ID of container from edge engine microservice container management service
  -t, --token=token            edge access token obtained from CLI

mimik-edge-cli container:deploy

to deploy edge microservice container runtime with access token to edge engine microservice container management service.

USAGE
  $ mimik-edge-cli container deploy

OPTIONS
  -f, --token-file=token-file  path of file that contains edge access token
  -p, --payload=payload        (required) path of the payload that describes the container runtime
  -t, --token=token            edge access token obtained from CLI

mimik-edge-cli container:list

to list all edge microservice containers running on edge engine microservice container management service.

USAGE
  $ mimik-edge-cli container list

OPTIONS
  -f, --token-file=token-file  path of file that contains edge access token
  -t, --token=token            edge access token obtained from CLI

mimik-edge-cli help [COMMAND]

display help for mimik-edge-cli

USAGE
  $ mimik-edge-cli help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI

See code: @oclif/plugin-help

mimik-edge-cli image:delete

to delete edge microservice image from edge engine microservice container management service.

USAGE
  $ mimik-edge-cli image delete

OPTIONS
  -f, --token-file=token-file  path of file that contains edge access token

  -i, --id=id                  (required) ID of microservice image from edge engine microservice container management
                               service

  -t, --token=token            edge access token obtained from CLI

mimik-edge-cli image:deploy

to deploy edge microservice image with access token to edge engine microservice container management service.

USAGE
  $ mimik-edge-cli image deploy

OPTIONS
  -f, --token-file=token-file  path of file that contains edge access token
  -i, --image=image            (required) path of the edge microservice image
  -t, --token=token            edge access token obtained from CLI

mimik-edge-cli image:list

to list all edge microservice images on edge engine microservice container management service.

USAGE
  $ mimik-edge-cli image list

OPTIONS
  -f, --token-file=token-file  path of file that contains edge access token
  -t, --token=token            edge access token obtained from CLI

Environment Variable

mimik-edge-cli tool can utilize the following environment variables

Name Description
EDGE_ENGINE_URI The URI to the edgeEngine ex. 172.168.0.1:8083
MID_URL The URL to the mID ex. http://mid.mimik360.com

Below is an inline usage

$ EDGE_ENGINE_URI="172.168.0.1:8083" MID_URL="http://mid.mimik360.com" mimik-edge-cli account get-me

If you wish to provide the environment variables from a file, a .env file in the current folder can also be provided.

$ ls -a
.     ..    .env
$ cat .env
EDGE_ENGINE_URI=172.168.0.1:8083
MID_URL=http://mid.mimik360.com

$ mimik-edge-cli account get-me

Dependencies (10)

Dev Dependencies (7)

Package Sidebar

Install

npm i @mimik/mimik-edge-cli

Weekly Downloads

56

Version

2.0.0

License

MIT

Unpacked Size

37.8 kB

Total Files

23

Last publish

Collaborators

  • sasan.raisdana
  • miburger
  • hofachiang
  • mimik-npm-editor
  • mimikopensource