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

28

v3.4.0

Published

Command line utility to download and upload 28.io queries.

Downloads

393

Readme

#28.io CLI

Build Status NPM version Code Climate

Sign up and create an account at http://hq.28.io/account/register. A video tutorial that shows the 28 cli in action is available here. Getting started instructions are also available here.

Installation

Install Node.js and NPM for your system (Mac, Windows or Linux). And install the command line tool using:

$ npm install 28 -g

Usage

Login

You can now authorize the client using your email and password. Your password is never stored on the system:

$ 28 login <your email>

Projects:

$ 28 projects list
$ 28 projects create <project name>
$ 28 project delete <project name>

Download Project

$28 download <project name> [-d, --delete-orphaned] [-o, --overwrite <yes, no, ask, if-newer>] [-s, --simulate]

Options:

  • -h, --help Output usage information.
  • -o, --overwrite <value> Overwrite remote files. Value can be yes, no, if-newer, or ask.
  • -s, --simulate Simulate for extra safety.
  • -d, --delete-orphaned Delete orphaned files.

Upload Project

$28 upload <project name> [-d, --delete-orphaned] [-o, --overwrite <yes, no, ask, if-newer>] [-s, --simulate]

Options:

  • -h, --help output usage information.
  • -o, --overwrite <value> Overwrite remote files. Value can be yes, no, if-newer, or ask.
  • -s, --simulate Simulate for extra safety.
  • -d, --delete-orphaned Delete orphaned files.

Truncate Project

$28 truncate <project name> [-s, --simulate]

Options:

  • -h, --help output usage information.
  • -s, --simulate Simulate for extra safety.

Watch Project

$28 watch <project name>

Code checking

The xqlint commands checks your code for static errors and warning using xqlint.

$28 xqlint <path> [-s, --style-check <yes, no>]

Synchronizing

The upload and download commands can be used to synchronize local files with a 28.io project and vice versa. Assume you started a new project called test on 28.io. You would like to download the project files:

$28 download test

If you make local changes to this project, you can upload them back to your 28.io project. In order to make sure that everything is in order, you can use the simulate option that will display the actions to perform without doing them.

$28 upload test --overwrite if-newer --delete-orphaned --simulate

Once you are ready, you can run the same command without the simulate option. You can use the download command to periodically get updates from your 28.io project:

$28 download test --overwrite if-newer --delete-orphaned

Using the CLI on premise

In order to use the 28 CLI against an 28msec instance installed on premise, simply run the following command where /path/to/cellstore/docker-config.json is the path of the cellstore configuration file:

$28 init </path/to/cellstore/docker-config.json>

Settings

By default, a setting file named .28.json is created in your home directory. You can override these default settings by creating your own .28.json file in the current working directory. This is how the default settings looks like:

{
    "access_token": "",
    "refresh_token": "",
    "project_tokens": {},
    "email": "",
    "protocol": "https",
    "project_name": "portal",
    "project_domain": "28.io",
    "ignore": [
        "lib/io/28/api/.*"
    ]
}
  • access_token, refresh_token, project_tokens, and email properties can be filled using the 28 login command.
  • protocol property can be http or https.
  • project_name property is the name of the prefix of the 28.io API endpoint.
  • project_domain property is the suffix of the 28.io API endpoint.
  • ignore property contains a list of regular expressions that will filter out files from being uploaded and downloaded.

Configure auto-complete

Auto-complete is supported for Mac and Linux. You need bash-completion installed. ####Mac OS X On OS X you can run brew install bash-completion if you have homebrew installed. Add bash-completion to your .bash_profile:

if [ -f `brew --prefix`/etc/bash_completion ]; then
    . `brew --prefix`/etc/bash_completion
fi

####Linux On Ubuntu you can run apt-get install bash-completion.

To enable it in zsh, run:

echo '. <(28 --completion)' >> .zshrc

To enable it in bash, run:

28 --completion >> ~/28.completion.sh
echo 'source ~/28.completion.sh' >> ~/.bash_profile