npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

flexio

v1.5.5

Published

Flex.io command line interface for managing Flex.io resources and services

Downloads

8

Readme

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.