flexio v1.5.5
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 flexioStandalone installers
If you use Windows or Linux, the following binary installation packages are available for download:
- Windows Installer (64-bit)
- Windows Installer (32-bit)
- Windows standalone executable (64-bit)
- Windows standalone executable (32-bit)
- Linux/Debian .deb
- Linux/Redhat .rpm (TBA)
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 configureNext, paste your API key and press enter:
$ flexio configure
Configuring profile 'default'
Please enter your API key: wqxvdawcwyrfyjykovjxUsing the flex.io CLI
Listing pipes
To list all pipes for your user:
$ flexio pipes listOptionally, you can change the output format to JSON:
$ flexio pipes list --output jsonRunning a pipe
To run a pipe that already has its inputs configured, the syntax is very straight-forward and easy:
$ flexio pipes run pipe-nameIn 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-nameTo 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 *.csvYou can also send the stdin input to a pipe:
$ echo Hello, World | flexio pipes run pipe-nameMany 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.txtUsing 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: yrfyjykovjxwqxvdawcwTo run commands with this alternate profile, simply specify the --profile command line option:
$ flexio pipes list --profile alternateIf 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.
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago
9 years ago