Giter Club home page Giter Club logo

edgex-cli's Introduction

Go Report Card

edgex-cli

Introduction

A command line interface to interact with EdgeX microservices. You can use this CLI tool instead of complicated CURL command or developer scripts.

Installation

In order to run this tool, you will need a running EdgeX instance and Go 1.11 or higher installed on your machine.

  • Clone the git repo in your go path:
$ cd ~/go/src/github.com/edgexfoundry/
$ git clone https://github.com/edgexfoundry-holding/edgex-cli

A bug described in issue #26 is solved through the use of the replace directive. This fix, however, can be erased when using go tidy and some other go commands. make install and make build work.

  • Install the CLI:
$ make install

You can now use the CLI by entering edgex anywhere on your machine. BUG: make install currently installs the binary as edgex-cli globally, because of the directory structure.

Available Commands

Readings

All readings:

$ edgex reading list

All readings for device, default limit is 50:

$ edgex reading list <device>

All readings for device with limit:

$ edgex reading list <device> -l <limit>

Notifications

Add notifications from toml file:

$ edgex notification add </path/to/file.toml>

Remove a notification by slug:

$ edgex notification rm <slug>

Remove a notification by age (timestamp):

$ edgex notification rm --age 1561939200

Subscriptions

Add subscriptions from toml file:

$ edgex subscription add </path/to/file.toml>

Remove a subscription by slug:

$ edgex subscription rm A

Remove a subscription by id:

$ edgex subscription add /path/to/file.toml // Add subscriptions from toml file.
$ edgex subscription rm A // Remove a subscription by slug.
$ edgex subscription rm --id SOMEID // Remove a subscription by id.

Intervals

$ edgex interval list // Lists all intervals provided their numbers is within the configured limit.
$ edgex interval list A // List interval with name A.
$ edgex interval list --id SOMEID // List interval with id SOMEID.
$ edgex interval add /path/to/file.toml // Add intervals from toml file.
$ edgex interval update /path/to/file.toml // Update intervals from toml file.
$ edgex interval rm A // Remove a interval by id or name A.

Developers

To test your changes, you can either build the binary or calling go run.

  • Build and run:
$ make build
$ ./edgex
  • Use go run:
$ go run main.go [COMMAND]

edgex-cli's People

Contributors

iain-anderson avatar milj19lf avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.