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

presto-card-cli

v2.0.1

Published

[![forthebadge](http://forthebadge.com/images/badges/uses-js.svg)](http://forthebadge.com) [![forthebadge](http://forthebadge.com/images/badges/you-didnt-ask-for-this.svg)](http://forthebadge.com)

Downloads

12

Readme

presto-card-cli Build Status

forthebadge forthebadge

A CLI tool for checking your Presto card balance.

demo gif

I wrote about this tool on my blog: https://blog.cedricblondeau.com/2017/12/23/check-your-presto-card-balance-in-a-terminal-using-presto-card-cli/

Install

yarn global add presto-card-cli

Requires NodeJS 8+.

Usage

The tool requires the user to set up credentials before accessing the balance.

# Set credentials
presto-card set-credentials
 ? Enter a Presto account username: <username>
 ? Enter the password for this Presto account: <password>

# Print balance for a given user, username is a required argument
presto-card balance <username>

How does it work?

Password management

This tool uses node-keytar to store credentials. On macOS the passwords are managed by the Keychain, on Linux they are managed by the Secret Service API/libsecret, and on Windows they are managed by Credential Vault.

Get the balance

This tool uses presto-card-js as a back end.

Common issues

SyntaxError: Unexpected token error

This may happen when using an old version of NodeJS. This tool requires NodeJS 8+.

Error: Module version mismatch. Expected 48, got 59. or equivalent

This may happen if presto-card-cli has been installed with a different version of NodeJS than the current one. Re-installing may help.

FAQ

Q: I have only one card and it's kind of boring to type my username again and again when I want to check my balance. Can't we set up a default account?

Not at this time. But we can create an alias in the meantime. For example: alias pb='presto-card balance supercat'

Q: What if I don't have a Presto account? Can I use this tool with a Presto card number?

Not at this time.

License

GNU Affero General Public License v3.0