1.5.5 • Published 6 years ago

flexio v1.5.5

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
6 years ago

flexio-cli-js

Flex.io Command Line Interface (Node.js) for managing Flex.io resources and services

The Flex.io Command Line Interface (CLI) is a tool for managing and running your Flex.io services from the command line. With just one compact utility, you can integrate Flex.io services into your scripts and command-line environment, enabling direct integration with other systems and software.

Installation

Installation with npm

The primary distribution method for the Flex.io CLI on Linux, Windows and Mac OS is npm, a package manager for Node.js that provides an easy way to install, upgrade, and remove Node packages and their dependencies.

Requirements

  • Node.js
  • Windows, Linux or Mac OS

Assuming you’ve already installed Node.js, you can install the Flex.io CLI with the following command:

$ npm install -g flexio

Standalone installers

If you use Windows or Linux, the following binary installation packages are available for download:

Configuration

Publically-available pipes can usually be run without any kind of authentication. To access your private pipes, however, you'll first need to configure the Flex.io command line interface with your API key.

First, retrieve your API key from your account settings page. Log into Flex.io, then click on the "Account" menu item under the user menu found in the upper right-hand corner. On the account page, click on the "API" tab. If you don't already have an API Key, click the "Create API Key" button. Finally, copy the access code into your cut-and-paste buffer.

At the command line, enter the following:

$ flexio configure

Next, paste your API key and press enter:

$ flexio configure
Configuring profile 'default'
Please enter your API key: wqxvdawcwyrfyjykovjx

Using the flex.io CLI

Listing pipes

To list all pipes for your user:

$ flexio pipes list

Optionally, you can change the output format to JSON:

$ flexio pipes list --output json

Running a pipe

To run a pipe that already has its inputs configured, the syntax is very straight-forward and easy:

$ flexio pipes run pipe-name

In the example above, you would replace the 'pipe-name' with your own pipe's name. If you have access to another user's pipe and want to run it, you need to qualify the pipe's name with that user's id. For example, to run a pipe owned by 'myuser', you would run something like this:

$ flexio pipes run pipe-name

To send input files to a pipe, simply append one or more files, or a wildcard:

$ flexio pipes run pipe-name file.txt
    -or-
$ flexio pipes run pipe-name file.txt *.csv

You can also send the stdin input to a pipe:

$ echo Hello, World | flexio pipes run pipe-name

Many pipes output data. By default, the flexio command line interface does not echo any data. If you want to capture this information, add "--output data":

$ echo Hello, World | flexio pipes run pipe-name --output data > output.txt

Using multiple configuration profiles

The Flex.io Command Line Interface (CLI) supports multiple configuration profiles, storied in the configuration file. A different profile is useful if you have mulitple users with access to different objects and want to frequently switch back and forth.

To configure an alternate profile, run the following command:

$ flexio configure alternate
Configuring profile 'alternate'
Please enter your API key: yrfyjykovjxwqxvdawcw

To run commands with this alternate profile, simply specify the --profile command line option:

$ flexio pipes list --profile alternate

If no profile is specified, the 'default' profile is used.

Source code

The source code for the Flex.io CLI is available on Github. You can download or view it here.

License

This code module is distributed under the Apache License, Version 2.0, see LICENSE for more information.

1.5.5

6 years ago

1.5.4

6 years ago

1.5.2

6 years ago

1.5.1

7 years ago

1.5.0

7 years ago

1.4.1

7 years ago

1.4.0

7 years ago

1.3.0

7 years ago

1.2.2

7 years ago

1.2.1

7 years ago

1.2.0

7 years ago

1.1.4

7 years ago

1.1.3

7 years ago

1.1.2

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.0

7 years ago