yaroschiffelers / up

A modular command line framework for automating tasks and workflows

Home Page:https://yaroschiffelers.github.io/up

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Up [BETA]

code style: prettier License: MIT Build Status

A modular command line framework to automate tasks and common work flows.

Up is currently in beta, there will be breaking changes by the time v1.0.0 is released

Introduction

Up makes it easy to define and run common tasks, both stand-alone or interactively (asking some predefined questions). Tasks can be chained to create a work flow.

Getting Started

Prerequisites

You need to install Node.js and npm. Take a look at their installation guide for more information.

Installing

After installing node and npm, add up to your global npm packages.

npm install -g up

Check if Up is installed correctly

up -v 

If you run into troubles, check the npm package docs or open a new issue.

Credentials

Check out the .env.example file in the root directory of this project, change its name to .env, and add your own module specific credentials.

These credentials are globally available for all modules in the ./modules directory. The variables are accessible via __env.VARIABLE_NAME.

For example:

const username = __env.GMAIL_USER 

console.log(username)
// Output: someone@gmail.com 

Modules

The easiest way to create a new module is by using the create -c flag.

// Create a new module with a name 
up -c myNewModule

// If you don't add a string containing the name of your 
// new module after the -c flag, Up will create a module 
// with 'newModule' as name.
up -c 

How do they look

A module is an array of actions. Each action is an object and has a required name and method field. Actions can have a question array.

module.exports = {
    actions: [
        {
            name: 'Hello World',
            method: () => console.log('Hello World')
        }
    ]
}

If you want to learn how to write your own modules, take a look at this quick tutorial

Examples

Write a quick email

Create a new Trello board

...

Issues

Please make sure to read the Issue Reporting Checklist before opening an issue. Issues not conforming to the guidelines may be closed immediately.

Changelog

Detailed changes for each release are documented in the changelog.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Contribution

Please make sure to read the Contributing Guide before making a pull request.

See also the list of contributors who participated in this project.

License

MIT

Copyright (c) 2018-present, Yaro Schiffelers

About

A modular command line framework for automating tasks and workflows

https://yaroschiffelers.github.io/up

License:MIT License


Languages

Language:JavaScript 93.7%Language:Shell 6.3%