JSPM

  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q59630F
  • License MIT

A Friendly, General purpose CLI task runner defined by a simple YAML file

Package Exports

  • mxflow
  • mxflow/bin/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mxflow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mxflow
Why | Config | Installation | Usage | Options

⚡ A Friendly, General purpose CLI Task Runner defined by a simple YAML file

mxflow is a CLI task runner which is defined by a YAML config file. It searches for a .mxflow/config.yml in the current directory and parent directories recursively up which it then parses for commands and arguments

Why?

  • Internal processes can get complicated or too repetitive.

  • It's hard to streamline complex workflows across teams.

  • Existing task-runners are too focused on a specific use case / environment or have complicated config files or are just not friendly.


Major features

  • Interactive first - works with/without arguments; prompt missing args
  • Extensive config - group commands under a workflows, use arguments export value in commands
  • Shell completion - dynamic shell completion based on the closest config file
  • Confirmation step - add the confirm prefix to any step to add a confirmation prompt
  • Project / System config - searches for a .mxflow/config.yml in the current directory and parent directories recursively up

Config

.mxflow/config.yml

mxflow trigger foobar --foo fval --bar 222

version: 0.60.0
workflows:
  foobar:
    description: example placeholder
    args:
      - name: foo
        type: string
        default: fdef
        export: foox
      - name: bar
        type: number
        default: 123
        export: barx
      - name: MXF_BUG_TRACKER_NAME
        type: env
        default: jira
        export: bugTrackerName
    steps:
      - echo {foox} world
      - echo goodbye {barx} cruel world
      - confirm echo {bugTrackerName} goodbye

Sample use case: git-workflow


Arg Types

  • string - text input
  • number - integer input
  • env - environment variable

Requirements

  • Node 16.x

Installation

npm i -g mxflow
mxflow --setup-completion

or

npx mxflow
npx mxflow --setup-completion

Usage

mxflow # or mxf
mxflow trigger foobar --verbose
mxflow trigger feature --taskId xorg --description zelda
mxflow --no-catch-git # to bypass initial git checks

Options

init                    | init sample configuration
trigger <workflow-name> | non-interactive workflow trigger
version                 | show version
help                    | help menu
--verbose               | verbose logs
--no-catch-git          | bypass initial git checks
--setup-completion      | setup tab completion, your shell
--clean-completion      | cleanup tab completion

Roadmap

  • project based config file
  • plugin system for dynamic lists
  • aurgument mode
  • argument autocomplete

mxflow v0.47.21

⚠️ MXFlow is in an early state of release. Breaking changes may be made to APIs/core structures as the tool matures.