Socket
Socket
Sign inDemoInstall

automizely-cli

Package Overview
Dependencies
307
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    automizely-cli

A collection of tools for Automizely


Version published
Maintainers
1
Created

Readme

Source

Automizely CLI

A collection of tools for Automizely

Usage

Setup SSH for connecting to Github, see the setting guide

Install

Install via npm

npm install automizely-cli -g

Or yarn

yarn add automizely-cli --global

Main commands

Usage: am-cli <command> [options]
    ___         __                  _            __
   /   | __  __/ /_____  ____ ___  (_)___  ___  / /_  __
  / /| |/ / / / __/ __ \/ __ `__ \/ /_  / / _ \/ / / / /
 / ___ / /_/ / /_/ /_/ / / / / / / / / /_/  __/ / /_/ /
/_/  |_\__,_/\__/\____/_/ /_/ /_/_/ /___/\___/_/\__, /
                                               /____/

Options:
  -V, --version                      output the version number
  -h, --help                         display help for command

Commands:
  storefront|sf <command> [options]  Collection of tools for storefront
  help [command]                     display help for command

Storefront commands

Usage: am-cli storefront|sf <command>

Collection of tools for storefront.

Options:
  -V, --version  output the version number
  -h, --help     display help for command

Development

How to add a new command

Confirm your command is belongs with some existing module

A new module

  • Create the new module library directory name as {command_name} and put it under the src folder
  • Create a new module entry name as index-{command_name}.js and put it under the bin folder
  • Fill the module content such as the template below
#!/usr/bin/env node
'use strict';

require('../lib/common/colors')();
const Command = require('commander').Command;
const pkg = require('../package.json');
const command = require('../lib/{command_name}');

const program = new Command('am-cli {command_name}')
	.alias('{command_alias}')
	.description('{description}');

program.version(pkg.version).usage('<command> [options]');

program
	.command('test')
	.alias('t')
	.description('Test command')
	.option('--name -n <name>', 'Test command name')
	.action(command.test);

program.parse(process.argv);
  • Add the command above program.parse(process.argv) in the bin/index.js command
program
	.command('{command_name} <command> [options]', '{description}')
	.alias('{command_alias}');
  • Add the new command of bin into the package.json, (optional)
{
	"am-{command_alias}-cli": "bin/index-{command_name}.js",
	"automizely-{command_name}": "bin/index-{command_name}.js"
}

Belongs with some existing module

  • Add the new command into the belongs module same as above add a new module

For more API details, please see the Commander API doc

No license, copyright@Automizely 2021-present

Keywords

FAQs

Last updated on 26 Sep 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc