1.2.2 • Published 4 years ago

wegdigital-cli v1.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

WegDigital CLI

Build Status npm version

Description

WegDigital CLI is a command line tool to help manage your WegDigital Application and its resources. It easily lets you manage Experience Views, Experience Versions, Files, and Data Tables in your Applications.

Installation

The CLI requires Node.js version 8.3 or higher. The latest stable version is available in NPM and can be installed using:

npm install -g wegdigital-cli

Usage

wegdigital [options] [command]

Commands

Login

Before you run any other commands, you will want to run wegdigital login to authenticate with your wegdigital account. This will ask for the email address and password (and optionally your 2 factor code) for your wegdigital account, and store an authentication token on your computer.

Configure

The wegdigital configure command configures and links the current directory to one of your wegdigital Applications. Once you have configured you will notice a few new directories into your current directory. There will be the following directories added:

  • experience/components
  • experience/pages
  • experience/layouts
  • files/
  • dataTables/

This is how the CLI will be able to detect new files, experience views, or data tables that you want to add, update or remove from your wegdigital Application. The files directory will contain and reflect the directory and files on your wegdigital Application's Files. Similarly, the dataTables directory will contain your wegdigital Application's data tables as csv files. and The experience directory is broken down by view type (components, layouts and pages), e.g. if you want to create a new component add this to your components directory, or if you want to remove a page, you will find that page located under experience/pages.

Experience

The wegdigital experience command is how you manage the Experience Views and Versions for a configured Application. It has the following subcommands:

  • download
  • status
  • upload
  • layout
  • bootstrap
  • version
  • watch

Experience Examples

  • Download all experience views (components, layouts and pages)
    $ wegdigital experience download
  • Download component views
    $ wegdigital experience download --type components
  • Download component views with names that start with error
    $ wegdigital experience download --type components error*
  • Force a download of all views overwriting local modifications
    $ wegdigital experience download -f
  • Check status of all experience views
    $ wegdigital experience status
  • Upload all experience views
    $ wegdigital experience upload
  • Upload only component views
    $ wegdigital experience upload --type components /*
  • List all of your current experience versions
    $ wegdigital experience version
  • List all of your experience versions that match a pattern
    $ wegdigital experience version -l v1.*
  • Create a new experience version
    $ wegdigital experience version v1.0.0
  • Create a new experience version with a description
    $ wegdigital experience version v1.0.1 -d "updated home page"
  • Watch your Experience while you make changes and have them automatically uploaded
    $ wegdigital experience watch
  • View all your experience pages with their layouts
    $ wegdigital experience layout
  • View all of your experience pages that match this pattern with their layout
    $ wegdigital experience layout -l v1.*
  • View all your experience pages with their layouts
    $ wegdigital experience layout
  • To generate our standard experience starter views
    $ wegdigital experience bootstrap

Files

The wegdigital files command is how you manage the files for a configured Application. It has the following subcommands:

  • download
  • status
  • upload
  • watch

Files Examples

  • Download all files
    $ wegdigital files download
  • Download files in images directory
    $ wegdigital files download images/*
  • Force a download of all files overwriting local modifications
    $ wegdigital files download -f
  • Check status of all files
    $ wegdigital files status
  • Upload all files
    $ wegdigital files upload
  • Upload files in images directory
    $ wegdigital files upload images/*
  • Force an upload of all files overwriting remote modifications
    $ wegdigital files upload -f
  • Watch your Files while you make changes and have them automatically uploaded
    $ wegdigital files watch

Data Tables

The wegdigital datatables command is how you manage the data tables for a configured Application. It has the following subcommands:

  • export

Data Tables Examples

  • Export all data tables
    $ wegdigital datatables export
  • Export all data tables whose names start with Chicago
    $ wegdigital datatables export Chicago
  • Force a export of all data tables overwriting local modifications
    $ wegdigital datatables export -f

Copyright (c) 2019 WegDigital IoT, Inc