@bentley/extension-cli
@bentley/extension-cli
npm i @bentley/extension-cli
@bentley/extension-cli

@bentley/extension-cli

Monorepo for iTwin.js Library

by imodeljs

2.19.47 (see all)License:MITTypeScript:Not Found
npm i @bentley/extension-cli
Readme

Extension publisher CLI

Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.

Allows downloading, uploading and deleting iTwin.js extensions from the Extension Service

Usage

node extension-cli <command> <options>

  • command must be one of the following:
    • publish - publishes an extension from local files.
    • get - downloads all extension files into a local directory.
    • delete - deletes an extension.
    • view - shows metadata about an extension, in JSON format.
  • options described in section below.

Command options

publish

  • --extensionName (--en, -n) - [Optional] extension name. If not provided, will attempt to read from package.json in current working directory.
  • --extensionVersion (--ev, -v) - [Optional] extension version. If not provided, will attempt to read from package.json in current working directory.
  • --contextId (--cid) - [Optional] context Id to publish to. Should be a Team Id for private extensions. If not provided, will publish to the logged in user's default Team.
  • --public (-p) - [Optional] set this flag to ignore contextId and attempt to publish a public extension.
  • --filePath (--path) - path to a directory containing extension files to be uploaded.

get

  • --extensionName (--en, -n) - extension name.
  • --extensionVersion (--ev, -v) - extension version.
  • --contextId (--cid) - [Optional] context Id to get the extension from. Should be a Project/Asset Id for private extensions. If not provided, will get a public extension.
  • --savePath (--path) - path to an empty directory for downloading the extension. If the directory doesn't exist, it will be created.

delete

  • --extensionName (--en, -n) - extension name.
  • --extensionVersion (--ev, -v) - extension version.
  • --contextId (--cid) - [Optional] context Id to delete the extension from. Should be a Team Id for private extensions. If not provided, will use the logged in user's default Team.
  • --public (-p) - [Optional] set this flag to ignore contextId and attempt to delete a public extension.
  • --force - [Optional] add this flag to confirm the operation and avoid interactive prompts (should only be used in automated scripts).

view

  • --extensionName (--en, -n) - [Optional] extension name. If not provided, will show all extensions in the given context.
  • --extensionVersion (--ev, -v) - [Optional] extension version. Should only be provided together with extensionName. If only extensionName is provided, will show all versions of the requested extension.
  • --contextId (--cid) - [Optional] context Id. Should be a Project/Asset Id for private extensions. If not provided, will view public extensions.

Examples

ActionCommand
Publish a new extension to the Extension Servicenode extension-cli publish --contextId 00000000-0000-0000-0000-000000000000 --extensionName "Example extension" --extensionVersion "v1.0" --path /path/to/extension
Download an extension from the Extension Servicenode extension-cli get --cid 00000000-0000-0000-0000-000000000000 --en "Example extension" --ev "v1.0" --path /path/to/extension/directory
Delete a public extension from the Extension Servicenode extension-cli delete -p -n "Example extension" -v "v1.0"

Downloads/wk

112

GitHub Stars

383

LAST COMMIT

2yrs ago

MAINTAINERS

3

CONTRIBUTORS

2

OPEN ISSUES

15

OPEN PRs

30
VersionTagPublished
2.19.47
latest
1mo ago
2.19.46
previous
2mos ago
3.0.0-dev.21
nightly
1yr ago
2.19.0-dev.24
rc
1yr ago
No alternatives found
No tutorials found
Add a tutorial
No dependencies found

Rate & Review

100
No reviews found
Be the first to rate