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

chronokey

v1.0.1

Published

A CLI tool for managing and generating TOTP codes for two-factor authentication

Readme

Chronokey

A simple and secure CLI tool for managing and generating Time-based One-Time Password (TOTP) codes for two-factor authentication (2FA).

Features

  • Store multiple TOTP secrets securely on your local machine
  • Generate 6-digit TOTP codes instantly
  • Interactive CLI with intuitive prompts
  • Support for both base32-encoded and plain text secrets
  • List, add, and remove TOTP entries easily

Installation

Via npm (Recommended)

The easiest way to install chronokey:

npm install -g chronokey

Via Homebrew (macOS/Linux)

Alternatively, you can install via Homebrew:

brew tap yashu183/chronokey
brew trust yashu183/chronokey
brew install chronokey

Note: The trust step is required for third-party Homebrew taps (this is a Homebrew security feature).

Local Development Setup

Prerequisites:

  • Node.js (v14 or higher)
  • npm or yarn

From Source

  1. Clone the repository:
git clone https://github.com/yashu183/chronokey.git
cd chronokey
  1. Install dependencies:
npm install
  1. Run in development mode:
npm run dev -- <command>

Or build and link globally:

npm run build
npm link
chronokey <command>

Usage

Add a New TOTP Entry

Set up a new TOTP entry by providing a unique name and secret key:

chronokey setup

You'll be prompted to:

  1. Enter a unique name for the entry (e.g., "GitHub", "Google", "AWS")
  2. Enter the secret key (will be masked for security)
  3. Confirm to save

Generate a TOTP Code

Generate a TOTP code for a saved entry:

# Interactive selection
chronokey generate

# Or specify the entry name directly
chronokey generate GitHub

# Using alias
chronokey gen GitHub

The code is valid for approximately 30 seconds.

List All Entries

View all saved TOTP entries:

chronokey list

# Using alias
chronokey ls

Remove an Entry

Delete a TOTP entry:

# Interactive selection
chronokey remove

# Or specify the entry name directly
chronokey remove GitHub

# Using alias
chronokey rm GitHub

You'll be asked to confirm before deletion.

Configuration

Chronokey stores your TOTP secrets locally in:

~/.chronokey/config.json

Security Note: Your secrets are stored in plain text in this file. Ensure proper file permissions are set and keep this directory secure.

How It Works

TOTP (Time-based One-Time Password) generates a unique 6-digit code that changes every 30 seconds based on:

  1. A shared secret key (provided when you set up 2FA)
  2. The current time

This tool uses the speakeasy library to generate standard TOTP codes compatible with most 2FA services.

Examples

# Add a new GitHub 2FA entry
chronokey setup
> Enter a unique name: GitHub
> Enter the secret key: ************
> Confirm? Yes
✓ Successfully added TOTP entry: GitHub

# Generate a code for GitHub
chronokey gen GitHub
🔑 TOTP Code for "GitHub": 123456
   Valid for ~30 seconds

# List all entries
chronokey list
📋 Saved TOTP Entries:
   1. GitHub
   2. Google
   3. AWS

# Remove an entry
chronokey rm GitHub
> Are you sure? Yes
✓ Successfully removed entry: GitHub

Development

Project Structure

chronokey/
├── src/
│   ├── index.ts      # Main CLI entry point with commands
│   ├── config.ts     # Configuration management
│   └── totp.ts       # TOTP generation logic
├── dist/             # Compiled JavaScript (generated)
├── package.json      # Project dependencies and scripts
├── tsconfig.json     # TypeScript configuration
└── README.md         # This file

Scripts

  • npm run build - Compile TypeScript to JavaScript
  • npm run dev - Run in development mode with ts-node
  • npm start - Run the compiled version

License

MIT

Author

Built with Commander.js, Inquirer.js, and Speakeasy.