npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@modyo/cli

v3.5.1

Published

Modyo CLI Command line to expose local development tools

Downloads

7,261

Readme

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 .