Coder Social home page Coder Social logo

tm-catalog-cli's Introduction

Thing Model Catalog CLI

Go Report Card GitHub release (latest SemVer)PkgGoDevBuild Status Test Status

Thing Model Catalog Logo


Find, use and contribute device descriptions for industrial IoT devices!

โš  This software is experimental and may not be fit for any purposes.

The Thing Model Catalog Command Line Client, or tm-catalog-cli for short, is a tool for browsing, consuming, contributing and serving Thing Models.

Thing Models are simple device descriptions specified in the W3C Thing Description standard. Thing Models are to Thing Descriptions what classes are to instances in programming languages.

Thing Models let you describe industrial devices using a simple standardized JSON-based format, which is independent of the communication protocol. This enables a uniform access layer to the fragmented industrial protocol landscape we encounter today.

Thing Descriptions are to Modbus, BACnet, MQTT, DNP3 ... what HTML is to HTTP.


Installation

  1. Download the latest release for your operating system and architecture
  2. Optionally rename to tm-catalog-cli to remove os/arch postfixes
  3. Give it execution rights and move to a folder that is in your PATH

Quick Start

The tm-catalog-cli helps you to interact with a Thing Model catalog, which may be hosted on any git forge like github or create your own catalog in a git repository of your choosing.

To enable a culture of sharing, we provide a canonical repository at [], but feel free to create your own open or private catalog as well.

To integrate publicly available and your own private Thing Models into your product, the tm-catalog-cli can be run as a server, exposing a REST API that can be protected with JWT tokens.

Configure Autocompletion

  1. Read the help of the completion command to find out which shells are supported
tm-catalog-cli completion -h
  1. Follow the instructions of the shell specific help text
tm-catalog-cli completion <shell> -h

Browse the canoncial Catalog

  1. Configure the canonical repository
tm-catalog-cli remote add --type http thingmodels 'https://raw.githubusercontent.com/wot-oss/thingmodels'
  1. List the contents of the canonical catalog
tm-catalog-cli list

The listed names are formatted as follows

<author>/<manufacturer>/<model>

You can specify a part of that path after the list command to filter the list for only parts of the list tree (use tab to auto-complete path parts):

tm-catalog-cli list nexus-x/siemens

List Versions

Every model entry in the list may contain multiple versions, reflecting the evolution of the Thing Model (bugfixes, additions, changes in the device itself ...). List the available versions with the versions command:

tm-catalog-cli versions <name>

Fetch a Thing Model

Like what you see? Fetch and store locally using the fetch command. It will print the Thing Model to stdout to enable unix-like piping:

tm-catalog-cli fetch <NAME>

If you just specify the name, the cli will fetch the latest version automatically. If you want to fetch a specific version, append the version string to the name, separated by a colon:

tm-catalog-cli fetch <NAME>:<SEMVER>

To store the Thing Model locally instead of printing to stdout, specify the -o flag and point it to a directory:

tm-catalog-cli fetch <NAME> -o .

tm-catalog-cli's People

Contributors

alexbrdn avatar hadjian avatar enricoschuetz 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.