You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

@modyo/cli

Package Overview
Dependencies
19
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

@modyo/cli

Modyo CLI Command line to expose local development tools


Version published
Maintainers
4
Created

Readme

Source
  • Modyo Command Line Interface (CLI)

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.

npm (scoped) NPM Coverage

Introduction

First, you need to bring the Modyo CLI 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 use the Modyo's CLI, you have these options.

Global installation on your local machine

  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

Through NPX without installation

  npx @modyo/cli #via npx
  npx @modyo/cli@version #via npx - specific version

Commands

modyo-cli autocomplete [SHELL]

display autocomplete installation instructions

USAGE
  $ modyo-cli autocomplete [SHELL] [-r]

ARGUMENTS
  SHELL  shell type

FLAGS
  -r, --refresh-cache  Refresh cache (ignores displaying instructions)

DESCRIPTION
  display autocomplete installation 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] [-f] [-h] [-o <value>]

ARGUMENTS
  NAME       The name of the widget
  DIRECTORY  Name of directory to init

FLAGS
  -f, --force                 Override folder if exist
  -h, --help                  Output usage information
  -o, --organization=<value>  [default: dynamic-framework] Github Organization

DESCRIPTION
  Pull a widget from our catalog into a new directory

  In general, the `get` command is used to obtain a boilerplate widget.

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

  To initialize a widget

    $ modyo-cli get dynamic-react-base-template [DIRECTORY]

  From this command and on you can continue using the widget like any other front-end widget.
  Your organization can create its own custom templates to initialize new widgets and use them with the `organization`
  option

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

See code: src/commands/get.ts

modyo-cli help [COMMANDS]

Display help for modyo-cli.

USAGE
  $ modyo-cli help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for modyo-cli.

See code: @oclif/plugin-help

modyo-cli preview

Preview local widget over Modyo platform

USAGE
  $ modyo-cli preview -t <value> -u <value> [-h] [-v 8|9|10] [-i <value> | -n <value>] [-p <value>] [-s
    <value>] [-j <value>]

FLAGS
  -h, --help                 Output usage information
  -i, --site-id=<value>      Id of the site where the widget will be previewed
  -j, --entry-js=<value>     [default: main.js] Entry JS file of the widget
  -n, --site-host=<value>    Host of the site where the widget will be previewed
  -p, --port=<value>         [default: 8080] Deploy port local widget running
  -s, --dom-id=<value>       [default: widgetName] Container id of the widget
  -t, --token=<value>        (required) Modyo Api token
  -u, --account-url=<value>  (required) URL of your ®Modyo account ex("https://account.modyo.com")
  -v, --version=<option>     [default: 9] Version of Modyo platform
                             <options: 8|9|10>

DESCRIPTION
  Preview local widget over Modyo platform

  The `preview` command is responsible for informing the platform about local entry points so that the widget can be
  rendered on the platform locally.

  MODYO_VERSION=version
  MODYO_TOKEN=token
  MODYO_ACCOUNT_URL=account-url
  MODYO_SITE_ID=siteId
  MODYO_SITE_HOST=siteHost
  MODYO_LOCAL_PORT=port
  MODYO_LOCAL_DOM_ID=domId
  MODYO_LOCAL_ENTRY_JS=entryJs


EXAMPLES
  $ modyo-cli preview

See code: src/commands/preview.ts

modyo-cli push [NAME]

Push widget to Modyo platform

USAGE
  $ modyo-cli push [NAME] -t <value> -u <value> [-p] [-h] [-d <value>] [-v 8|9|10] [-i <value> | -n
    <value>] [-b <value>] [-e] [-l | -f <value>] [-z] [-j <value>] [-c <value>]

ARGUMENTS
  NAME  The name of the widget

FLAGS
  -b, --build-command=<value>         [default: build] Build command in package.json
  -c, --zip-entry-css=<value>         [default: main.css] Entry css file when use --zip flag
  -d, --build-directory=<value>       [default: dist] Build directory path
  -e, --[no-]remove-emojis            Remove emojis from the widget that will be push
  -f, --disable-liquid-regex=<value>  Disable liquid on files that match a regex
  -h, --help                          Output usage information
  -i, --site-id=<value>               Id of the site where the widget will be push
  -j, --zip-entry-js=<value>          [default: main.js] Entry js file when use --zip flag
  -l, --disable-liquid                Disable liquid on all files
  -n, --site-host=<value>             Host of the site where the widget will be push
  -p, --publish                       Force widget publication
  -t, --token=<value>                 (required) Modyo Api token
  -u, --account-url=<value>           (required) URL of your ®Modyo account ex("https://account.modyo.com")
  -v, --version=<option>              [default: 9] Version of Modyo platform
                                      <options: 8|9|10>
  -z, --zip                           Zip bundle to publish

DESCRIPTION
  Push widget to Modyo platform

  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.

  Many of the options can be defined as environment variables or inside 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
  MODYO_DISABLE_LIQUID_REGEX=regexToDisableLiquidOnFiles
  MODYO_ZIP=true
  MODYO_ZIP_ENTRY_JS=main.js
  MODYO_ZIP_ENTRY_CSS=main.css


EXAMPLES
  $ modyo-cli push

See code: src/commands/push.ts

modyo-cli version

USAGE
  $ modyo-cli version [--json] [--verbose]

FLAGS
  --verbose  Show additional information about the CLI.

GLOBAL FLAGS
  --json  Format output as json.

FLAG DESCRIPTIONS
  --verbose  Show additional information about the CLI.

    Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.

See code: @oclif/plugin-version

Enable Debug Mode

Use the debug for debugging. The CLI uses this module for all of its debugging. If you set the environment variable DEBUG=* it will print all the debug output to the screen.

Depending on your shell you may need to escape this with DEBUG=\*. On Windows you can't set environment variables in line, so you'll need to run set DEBUG=* before running the command.

this will output the full error trace and all the pushed information to modyo will be printed in the folder .debug to accomplish a more detailed error.

License

Modyo CLI is licensed under the Modyo Software License .

Keywords

FAQs

Package last updated on 03 Apr 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc