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 🙏

© 2026 – Pkg Stats / Ryan Hefner

nbngcli

v0.1.0

Published

Unified CLI for Gmail, Google Calendar, and Google Drive

Readme

nbngcli

Unified CLI for Gmail, Google Calendar, and Google Drive.

Single OAuth authorization for all three services.

Installation

npm install -g nbngcli

Setup

1. Create Google Cloud OAuth Credentials

  1. Go to Google Cloud Console
  2. Create a new project (or use existing)
  3. Enable these APIs:
    • Gmail API
    • Google Calendar API
    • Google Drive API
  4. Go to "OAuth consent screen" > External > Add your email as test user
  5. Go to "Credentials" > Create Credentials > OAuth client ID > Desktop app
  6. Download the JSON file

2. Configure nbngcli

# Set credentials (once)
nbn accounts credentials ~/path/to/credentials.json

# Add your account
nbn accounts add [email protected]

This opens a browser for authorization. Use --manual for browserless setup.

Usage

Account Management

nbn accounts list                    # List accounts
nbn accounts add [email protected]     # Add account
nbn accounts remove [email protected]  # Remove account

Gmail

nbn [email protected] mail search "in:inbox is:unread"
nbn [email protected] mail search "from:[email protected]" --max 50
nbn [email protected] mail thread <threadId>
nbn [email protected] mail labels list
nbn [email protected] mail labels <threadId> --add STARRED --remove UNREAD
nbn [email protected] mail send --to [email protected] --subject "Hi" --body "Hello"
nbn [email protected] mail send --to [email protected] --subject "Hi" --body "Hello" --attach file.pdf
nbn [email protected] mail drafts list
nbn [email protected] mail drafts send <draftId>
nbn [email protected] mail url <threadId>

Google Calendar

nbn [email protected] cal calendars
nbn [email protected] cal acl <calendarId>
nbn [email protected] cal events
nbn [email protected] cal events primary --max 20
nbn [email protected] cal event <calendarId> <eventId>
nbn [email protected] cal create primary --title "Meeting" --start "2025-01-15T10:00:00" --end "2025-01-15T11:00:00"
nbn [email protected] cal update <calendarId> <eventId> --title "New Title"
nbn [email protected] cal delete <calendarId> <eventId>
nbn [email protected] cal freebusy primary --start "2025-01-15T00:00:00Z" --end "2025-01-16T00:00:00Z"

Google Drive

nbn [email protected] drive ls
nbn [email protected] drive ls <folderId> --max 50
nbn [email protected] drive search "quarterly report"
nbn [email protected] drive get <fileId>
nbn [email protected] drive download <fileId>
nbn [email protected] drive download <fileId> ./local-path.pdf
nbn [email protected] drive upload ./file.pdf
nbn [email protected] drive upload ./file.pdf --folder <folderId>
nbn [email protected] drive mkdir "New Folder"
nbn [email protected] drive mkdir "Subfolder" --parent <folderId>
nbn [email protected] drive delete <fileId>
nbn [email protected] drive move <fileId> <newParentId>
nbn [email protected] drive rename <fileId> "new-name.pdf"
nbn [email protected] drive share <fileId> --anyone
nbn [email protected] drive share <fileId> --email [email protected] --role writer
nbn [email protected] drive permissions <fileId>
nbn [email protected] drive unshare <fileId> <permissionId>
nbn [email protected] drive url <fileId>

Data Storage

All data is stored locally in ~/.nbngcli/:

  • credentials.json - OAuth client credentials
  • accounts.json - Account tokens
  • downloads/ - Downloaded files

License

MIT