@modyo/cli
    TypeScript icon, indicating that this package has built-in type declarations

    3.1.21 • Public • Published

    Modyo Command Line Interface (CLI)

    ====================================

    The Modyo Command Line Interface (CLI) is a command line tool based in two principles acceleration and integration, and this principles has a command get and push respectively.

    English, Spanish

    npm (scoped) NPM Coverage

    Introduction

    First, you need to install the Modyo CLI globally on your local machine to have the modyo-cli command available, this will allow you to initialize a project with some Front end architectural decisions already taken, or use to initialize a widget from the catalog if you have access.

    To install the modyo-cli globally you must use one of this options

      npm i -g @modyo/cli #via npm
      yarn global add @modyo/cli #via yarn

    This command will make the command modyo-cli available on the terminal session globally

    Usage

    modyo-cli autocomplete [SHELL]

    display autocomplete installation instructions

    USAGE
      $ modyo-cli autocomplete [SHELL]
    
    ARGUMENTS
      SHELL  shell type
    
    OPTIONS
      -r, --refresh-cache  Refresh cache (ignores displaying instructions)
    
    EXAMPLES
      $ modyo-cli autocomplete
      $ modyo-cli autocomplete bash
      $ modyo-cli autocomplete zsh
      $ modyo-cli autocomplete --refresh-cache
    

    See code: @oclif/plugin-autocomplete

    modyo-cli get NAME [DIRECTORY]

    Pull a widget from our catalog into a new directory

    USAGE
      $ modyo-cli get NAME [DIRECTORY]
    
    ARGUMENTS
      NAME       The name of the widget
      DIRECTORY  Name of directory to init
    
    OPTIONS
      -f, --force                      Override folder if exist
      -h, --help                       Output usage information
      -o, --organization=organization  [default: modyo] Github Organization
      -x, --no-install                 Don't install packages
    
    EXAMPLE
      $ modyo-cli get name [directory]
    

    See code: src/commands/get.ts

    modyo-cli help [COMMAND]

    display help for modyo-cli

    USAGE
      $ modyo-cli help [COMMAND]
    
    ARGUMENTS
      COMMAND  command to show help for
    
    OPTIONS
      --all  see all commands in CLI
    

    See code: @oclif/plugin-help

    modyo-cli push [NAME]

    Push widget to Modyo platform

    USAGE
      $ modyo-cli push [NAME]
    
    ARGUMENTS
      NAME  The name of the widget
    
    OPTIONS
      -b, --build-command=build-command      [default: build] Build command in package.json
      -d, --build-directory=build-directory  [default: dist] Build directory path
      -h, --help                             Output usage information
      -i, --site-id=site-id                  Id of the site where the widget will be push
      -l, --disable-liquid                   Disable Liquid
      -n, --site-host=site-host              Host of the site where the widget will be push
      -p, --publish                          Force widget publication
      -t, --token=token                      (required) Modyo Api token
      -u, --account-url=account-url          (required) URL of your ®Modyo account ex("https://account.modyo.com")
      -v, --version=8|9                      [default: 9] Version of Modyo platform
    
    EXAMPLE
      $ modyo-cli push
    

    See code: src/commands/push.ts

    The available commands are get, push and help

    modyo-cli (-v|--version|version)

    Print the modyo-cli version

    $ modyo-cli (-v|--version|version)
    modyo-cli/3.0.6 darwin-x64 node-v12.13.1

    modyo-cli help [COMMAND]

    USAGE
      $ modyo-cli help [COMMAND]
    
    ARGUMENTS
      get   Pull a widget from our catalog into a new directory
      help  Display help for modyo-cli
      push  Push widget to Modyo platform

    modyo-cli get NAME [DIRECTORY]

    In general, the get command is used to obtain a boilerplate widget. If you have a token provided by Modyo, the same command can be used to pull any of our premium widgets from our Widget Library.

    USAGE
      $ modyo-cli get NAME [DIRECTORY]
    
    ARGUMENTS
      NAME       The name of the widget
      DIRECTORY  Name of directory to init
    
    OPTIONS
      -f, --force                      Override folder if exist
      -h, --help                       Output usage information
      -o, --organization=organization  [default: modyo] Github Organization
      -x, --no-install                 Don't install packages
    
    EXAMPLE
      $ modyo-cli get name [directory]

    There are some public widget names that can be accessed via this command.

      EXAMPLE
        $ modyo-cli get modyo-widgets-template-vue [DIRECTORY] #to initialize a widget
        $ modyo-cli get modyo-widgets-project-vue [DIRECTORY] #to initialize a base project library

    From this command and on you can continue using the widget like any other vue-cli widget.

    Your organization can create its own custom templates to initialize new widgets and use them with the organization option

      EXAMPLE
      $ modyo-cli get --organization=myOrganization my-custom-template-repo [DIRECTORY]
      $ modyo-cli get -o myOrganization my-custom-template-repo [DIRECTORY]

    modyo-cli push NAME

    The push command is the one in charge of the integration principle, used to send the widget to the selected site in the modyo platform.

    It will use an argument called name to upload the widget to the platform and some required flags like token site_base id or host to can identify the ®Modyo platform which host the widget and have an additional flag to avoid the manual process flow of widget publication.

    USAGE
      $ modyo-cli push NAME
    
    ARGUMENTS
      NAME  The name of the widget
    
    OPTIONS
      -b, --build-command=build-command      [default: build] Build command in package.json
      -d, --build-directory=build-directory  [default: dist] Build directory path
      -h, --help                             Output usage information
      -i, --site-id=site-id                  Id of the site where the widget will be push
      -n, --site-host=site-host              Host of the site where the widget will be push
      -p, --publish                          Force widget publication
      -t, --token=token                      (required) Modyo Api token
      -u, --account-url=account-url          (required) URL of your ®Modyo account ex("https://account.modyo.com")
      -v, --version=8|9                      [default: 9] Version of Modyo platform
    
    EXAMPLE
      $ modyo-cli push

    Many of the options can be defined as environment variables or inside of an .env file that is recommended to avoid the publication to the github registry because can contain some delicate information

    MODYO_BUILD_DIRECTORY=buildDirectoryPath
    MODYO_VERSION=version
    MODYO_TOKEN=token
    MODYO_ACCOUNT_URL=account-url
    MODYO_SITE_ID=siteId
    MODYO_SITE_HOST=siteHost
    MODYO_BUILD_COMMAND=buildCommand
    MODYO_REGEX_EXCLUDE=regexToExcludeFiles

    License

    Modyo CLI is licensed under the Modyo Software License .

    Install

    npm i @modyo/cli

    DownloadsWeekly Downloads

    59

    Version

    3.1.21

    License

    SEE LICENSE IN LICENSE.md

    Unpacked Size

    168 kB

    Total Files

    68

    Last publish

    Collaborators

    • portega
    • giorgiosaud
    • jcri
    • rriveras
    • jsilvamodyo