Skip to content

opensumi/cli

Repository files navigation

OpenSumi CLI

NPM Version NPM downloads

🛠️ Standard Tooling for OpenSumi Extensions Development

Develop

$ yarn
$ yarn dev

Test command on the local:

$ ./packages/cli/bin/sumi.js <command> [options]

Publish

$ yarn release

Then push commits and tag to the main branch, the @opensumi/cli@{tag_version} will release automatically.

Usage

Install @opensumi/cli:

$ npm install @opensumi/cli -g

Initailize the template:

$ sumi init opensumi-ext-demo
$ cd opensumi-ext-demo
$ npm run watch
$ sumi dev

Commands

Usage: sumi <command> [options]

Options:
  -V, --version                                          output the version number
  -h, --help                                             output usage information

Commands:
  init                                                   init a new extension powered by OpenSumi
  watch                                                  watch extension in development mode
  dev [options]                                          launch OpenSumi IDE load specified extension.
  compile                                                compile extension in production mode
  package [options]                                      Packages an extension
  install <publisher> <name> <version> [extensionDir]    installing a extension
  engine                                                 OpenSumi cli engine management
    add <version>                                        download and install a [version]
    remove <version>                                     remove specific [version] engine
    use  <version>                                       change current engine to [version]
    ls                                                   list installed engine versions
    ls-remote                                            list remote engine versions available for install
    current                                              display currently selected version

Run sumi <command> --help for detailed usage of given command.

Use the specified OpenSumi version

  1. List the remote engine version
$ sumi engine ls-remote

2.22.10-rc-1679037411.0   rc
              -> 2.23.0   latest
  1. Add expected version
$ sumi engine add 2.23.0

License

Copyright (c) 2019-present Alibaba Group Holding Limited, Ant Group Co. Ltd.

Licensed under the MIT license.