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

@spoonly/otpm

v0.0.10

Published

OTPm is a lightweight and efficient command-line two-factor authentication passcode generator, focusing on the generation and management of TOTP one-time passcodes.

Readme

OTPm

npm version npm downloads bundle JSDocs License

OTPm 是一款轻量、高效的命令行两步验证密码器,专注于 TOTP 动态口令的生成与管理。无需图形界面,即可快速安全地生成一次性密码,为各类平台账号提供二次身份验证保护。

支持密钥导入、多账户管理、自动刷新令牌与本地加密存储,兼顾安全与便捷,适合开发者、运维人员与注重隐私的用户在终端环境下快速使用两步验证能力。

Installation

npm install -g @spoonly/otpm
# or
pnpm add -g @spoonly/otpm

Commands

Account Management

| Command | Alias | Description | |---------|-------|-------------| | otpm add | a | 添加账户(手动输入 或 otpauth:// URI) | | otpm delete [account] | del | 删除账户 | | otpm rename [account] | mv | 重命名账户 | | otpm info [account] | i | 查看账户详细配置 |

OTP Generation

| Command | Alias | Description | |---------|-------|-------------| | otpm list | ls | 列出所有账户及当前 OTP 码 | | otpm generate [account] | g | 生成指定账户的 OTP |

Backup & Restore

| Command | Alias | Description | |---------|-------|-------------| | otpm export [file] | — | 导出账户备份(明文或加密) | | otpm import [file] | — | 从备份文件导入账户 |

Usage

添加账户

otpm add

支持两种方式:

  • 手动输入:依次填写账户名、issuer(平台名)和 secret,其余参数自动使用主流默认值
  • otpauth:// URI:直接粘贴扫码后的 URI 一键导入

生成 OTP

# 交互式选择账户
otpm generate

# 直接指定账户
otpm generate "GitHub:[email protected]"

# 生成并复制到剪贴板
otpm generate --copy

# 自动刷新(每个周期更新)
otpm generate --watch

列出所有账户

# 一次性列出
otpm list

# 持续刷新所有 TOTP 码
otpm list --watch

备份与恢复

# 导出(可选加密)
otpm export
otpm export my-backup.json

# 导入(自动识别加密备份)
otpm import
otpm import my-backup.json

Security

  • 本地存储文件基于机器信息派生密钥,使用 AES 加密,secret 不会明文落盘
  • 加密导出使用 AES-256-CBC + scrypt 密钥派生,需要用户设置独立密码
  • 导出的明文备份文件请妥善保管

Release

首次发布需手动执行 pnpm publish 在 npm 创建包,然后前往 https://www.npmjs.com/package/otpm/access 配置 GitHub Trusted Publisher。

后续发布执行 pnpm run release,GitHub Actions 会自动完成发布流程。

License

MIT License © OSpoon