Coder Social home page Coder Social logo

myterminal-cli

npm version npm downloads License
Build Status Code Climate js-myterminal-style Coverage Status
NPM

An all-day command-line companion

Demo

What is it?

myterminal-cli is a command-line application created to help you perform repetitive tasks that you might be performing all day long with the press of a single programmable key. It tends to be an interactive command-line interface that you can keep running in a terminal window on your workstation to perform a set of programmed tasks and present via a menu-driven interface.

Features

  • Configure long commands to be invoked with a single key-stroke
  • Nest similar or related commands in a menu-based hierarchy
  • Specify parameters for commands
  • Configure working directories for commands or a group of commands
  • Re-perform the last action with a (\)
  • Re-run the last command with a (.)
  • Run a custom command, which can later also become the 'last' command

Installation

myterminal-cli is available on Npm. You can install it globally with a simple command.

npm install -g myterminal-cli

How to Use

Run myterminal-cli or simply myterminal from the command line passing it a path to a JSON configuration file as shown in the examples. For example, if the configuration file is stored at your home directory, you can run it as

myterminal-cli --config=~/configs.json

myterminal-cli will start and the rest should all be simple.

You can also start myterminal-cli without supplying the configuration file path, in which case it will start with a configuration file named myterminal-cli-configs.json placed at your home (~/) directory. If the file does not exist, it will be created when the application is started for the first time.

Legacy Mode

Since version 2, myterminal-cli uses an entirely new interface which does not work well on Windows. Hence myterminal-cli starts in the legacy mode in Windows, which means almost the same functionality, with the old interface.

To force the modern mode in Windows, start myterminal-cli as

myterminal-cli --modern

and to force legacy mode on a better computer, start it as

myterminal-cli --legacy

Note: Legacy mode is no longer available starting version 2.2. If you need legacy mode, consider using older versions. One way of doing that is specifying the version during installation.

npm install -g [email protected]

Configuration

The configuration file should contain a valid JSON. It consists of nodes having a title and a subtree called commands. Each of these nodes holds a group of commands. The tree contains a single character with which the group can be selected while the application is running. When a node has a property task instead of commands, it is treated as a command to be executed, rather than a group of commands.

Each command has a title, a task and optionally an array of params. These params are prompted to be entered by the user while executing the task and are appended to the task separated by spaces, in sequence as they appear in the params array to form the final command to be executed.

Each of the items, be it a command or a group of commands, can have a defined directory, within which the command or the group of commands are executed. Note that when a directory is specified for a specific task and it also has a directory specified for the entire group containing the task, the directory for the task takes precedence.

To-do

  • Repeating tasks

Mohammed Ismail Ansari's Projects

.emacs.d icon .emacs.d

My personal Emacs configuration, finally as a separate repository [DEPRECATED]

ample-emacs icon ample-emacs

'Just enough' Emacs configuration with minimal external packages [DEPRECATED]

books icon books

Source (code) of a few books I have written

chrome-live-bookmarks icon chrome-live-bookmarks

A smarter New Tab replacement for Google Chrome with easy access to most frequently visited bookmarks

cute-snippets icon cute-snippets

A few (cute) snippets implementing a few small features commonly found in software

dom-cat icon dom-cat

A minimal library to print and log text to DOM elements

dom-shift icon dom-shift

A minimal library to switch DOM states using a CSS class

dotfiles icon dotfiles

The "replicable" heart of my personal workstations

eagle-eye icon eagle-eye

A utility to zoom-in and zoom-out while editing text

editor-scrolls icon editor-scrolls

The game YouTube video series Role-Playing with Emacs is based on

faded-presenter icon faded-presenter

A simple, light-weight presentation tool to present markdown documents as slide-shows

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.