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

cli-flare

v1.0.1

Published

A feature-rich command-line interface designed for scripting and regular use.

Downloads

6

Readme

Flare CLI

A feature-rich command-line interface designed for scripting and regular use.

See /docs for the backlog, the pull request policy, the command documentation, the source code documentation, and the plugin development guide.

Quickstart

Install the CLI with the following:

npm i cli-flare -g

That's all! Commands are prefixed with a dollar sign ($). To see whether it works, execute the following in your command prompt:

$ about

To see a list of commands, go to docs/LIST_OF_COMMANDS.md or execute:

$ --help

To see the syntax and description of a command, use:

$ <command> --help

// Example
$ calc --help

Use cases

The list of commands is huge. The examples below showcase some useful commands.

Use case 1: You want to see what a string looks like when replacing a part of it.

$ replace "Hello world" "world" "earth"
> Hello earth

// Let's copy that to the console
$ copy
// The output of the previous result is now saved to the clipboard, ready to be pasted somewhere

Use case 2: You want to create a script for frequent use.

$ script createABCDirs --set "mkdir a && mkdir b && mkdir c"
// Now, every time you call '$ script createABCDirs',
// these three directories will be created in the working directory

// Scripts support arguments, too!
$ script openSocialMediaProfile --set "$ open https://socialmedia.com/profile/{@1}"

// Let's try the script with an argument
$ script openSocialMediaProfile johnny
// Opens the browser on https://socialmedia.com/profile/johnny

Use case 3: You want to remember something without creating a messy .txt file to store the reminder in.

$ note myUsernameOnGitHub JohnsonDev
// Call '$ note myUsernameOnGithub' to display 'JohnsonDev' now

Use case 4: You want to quickly solve some math without looking up an online calculator.

$ calc 5*3 + (2*4)
> 23
$ is-prime 7
> Yes, 7 is a prime number

Use case 5: You want to know how something would evaluate in JavaScript.

$ javascript "console.log(!!0 + 3 + true + 'test');"
> 4test

Use case 6: Display the files in the working directory.

$ list
> (a list of files and folders in the working directory)

See the full list of commands for an overview on the rest.

Perks

Note that the term 'Service' refers to a single command.

  • Automatically indexed commands - Adding in more commands barely affects performance.
  • Automatically detected services - Adding a new command is done by creating a new file, no configuration required. All the developer has to do is define the command and program the callback; the framework takes care of the rest.
  • Minimal amount of dependencies - Most services use built-in libraries specifically designed for this CLI, see src/utilities.
  • Implements os-specific command-line features - If you work on multiple operating systems, you can use the same command on every platform with Flare.
    • Example: linux uses xdg-open . to open the working directory, while Windows uses start . With this CLI, you can use $ here on either operating system.
  • Regular updates - GitHub issues are actively maintained, and new features, improvements, and bug fixes are added constantly.