6.3.0 • Published 2 days ago

@elaraai/cli v6.3.0

Weekly downloads
-
License
SEE LICENCE IN LI...
Repository
-
Last release
2 days ago

EDK CLI

The EDK (ELARA Development Kit) CLI package contains a CLI and Typescript Libraries to create, develop and deploy ELARA projects.

Installation

The EDK CLI package can be installed with npm:

npm install -g @elaraai/cli

Usage

The EDK CLI package can be used either as a CLI or Typescript Libraries.

CLI Usage

Once the EDK CLI package is installed globally, the CLI can be invoked from the command line, for example to read the CLI help:

$ edk --help
Usage: edk [options] [command]

Options:
  -V, --version                  output the version number
  -h, --help                     display help for command

Commands:
  login [options]                Login to an elara.ai service
  init [options]                 initialise a new ELARA project
  build [options]                build the schema from assets
  deploy <deployment> [options]  deploy the assets in a project
  add                            add an asset to the project
  remove <asset> [options]       remove an asset from the project
  links <asset> [options]        show the directly linked assets in a project
  list [options]                 list the assets in the project
  update [options]               update the assets in the project
  users <command>                manage users in a deployment
  streams <command>              manage streams in a project
  help [command]                 display help for command

Library Usage

Alternatively the package modules may be imported and applied within a Typescript project:

import * as cli from '@elaraai/cli'
// create a simple application to create a project, add a datasource, build and deploy
const project_dir = 'path_to_workspace'
async function run() {
     // create a project
     let project_config = await cli.init({ 
         name: 'A project', 
         dir: project_dir 
     })
 
     // add a deployment
     project_config = cli.addDeployment({
         dir: project_dir,
         server: 'https://server_url',
         name: 'test',
         config: project_config
     })
 
     // add a datasource to the project
     project_config = cli.addRangeDataSource({
         name: "Datasource",
         dir: project_dir,
         def_dir: 'src/sources',
         config: project_config,
         start: 1.5,
         stop: 1000,
         step: 2.3
     });
 
     // build the schema
     let build = cli.buildSchema({ 
         dir: project_dir, 
         config: project_config 
     });
     if(build === false) {
         //...
     }
 
     // deploy the schema
     let deploy = await cli.deploySchema({ 
         dir: project_dir, 
         config: project_config, 
         deployment: 'test' 
     });
     if(deploy === false) {
         //...
     }
}
 
run()

Related NPM Packages

  • Core: Typescript Libraries to define ELARA Digital Twin Templates.
  • CLI-Detect: a CLI and Typescript Libraries to manage type detection for ELARA datasources.
  • Plugins: Typescript Libraries with ELARA Digital Twin Template plugins.

Related Github Repositories

  • Examples: Typescript source-code for various ELARA Digital Twin Template projects.
  • Plugins: Typescript source-code for ELARA Digital Twin Template plugins.

Licence

The EDK CLI package is licensed under the EDK Licence version LICENCE-1.05, the full version of the EDK Licence is available here.

Release Notes

Version 1

Initial public release.

7.0.0-alpha.0

2 days ago

6.3.0

15 days ago

6.1.0

16 days ago

6.2.0

16 days ago

6.0.0-beta.0

2 months ago

6.0.0

2 months ago

5.2.0-beta.7

2 months ago

5.2.0-beta.6

2 months ago

5.2.0-beta.5

2 months ago

5.2.0-beta.4

2 months ago

5.2.0-beta.3

2 months ago

5.2.0-beta.2

2 months ago

5.2.0-beta.1

2 months ago

5.2.0-beta.0

2 months ago

5.1.0

3 months ago

5.0.0

3 months ago

5.0.0-beta.0

3 months ago

5.0.0-beta.1

3 months ago

4.2.0

3 months ago

4.1.3

4 months ago

4.1.1-beta.0

4 months ago

4.1.2-beta.0

4 months ago

4.1.0

4 months ago

4.1.2

4 months ago

4.0.3

5 months ago

1.2.0

10 months ago

1.2.2-beta.0

10 months ago

1.4.0

10 months ago

1.2.2

10 months ago

1.2.1

10 months ago

2.0.2

9 months ago

2.0.1-beta.0

9 months ago

3.0.0

7 months ago

1.2.2-alpha.1

10 months ago

1.2.2-alpha.0

10 months ago

1.2.2-alpha.3

10 months ago

1.2.2-alpha.2

10 months ago

3.0.0-beta.1

7 months ago

3.0.0-beta.0

9 months ago

3.0.0-beta.2

7 months ago

2.0.2-beta.0

9 months ago

2.0.0-beta.0

9 months ago

1.2.2-alpha.5

10 months ago

1.3.1-beta.0

10 months ago

1.3.2-beta.0

10 months ago

4.0.3-beta.0

5 months ago

4.0.2-beta.0

5 months ago

4.0.1-beta.0

6 months ago

4.0.0-beta.0

6 months ago

4.0.3-beta.1

5 months ago

4.0.3-beta.2

5 months ago

1.3.0-beta.0

10 months ago

1.0.2

12 months ago

0.2.0-next.11

1 year ago

1.1.0

10 months ago

0.2.0-next.12

1 year ago

1.0.0

12 months ago

0.2.0-next.13

1 year ago

0.2.0-next.14

1 year ago

0.2.0-next.10

1 year ago

1.0.6

11 months ago

0.2.0-next.15

1 year ago

1.0.5

11 months ago

0.2.0-next.16

1 year ago

1.0.4

11 months ago

1.0.3

12 months ago

0.2.0-next.18

1 year ago

0.2.0-next.9

1 year ago

0.2.0-next.8

1 year ago

0.2.0-next.7

1 year ago

0.2.0-next.6

1 year ago

0.2.0-next.5

1 year ago

0.2.0-next.2

1 year ago

0.1.0-next.4

2 years ago

0.1.0-next.5

2 years ago

0.2.0-next.1

1 year ago

0.1.0-next.3

2 years ago

0.1.0-next.2

2 years ago

0.1.0-next.1

2 years ago

0.1.5

3 years ago

0.1.4

3 years ago

0.1.3

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago