Skip to content

jfalava/lazyotp

Repository files navigation

lazyotp

Simple OTP CLI that stores secrets in your OS credential manager via Bun.secrets:

  • macOS: Keychain Services
  • Linux: libsecret
  • Windows: Credential Manager

Install

Check the latest release and download the version compatible with your platform

Usage

Store an OTP secret with an alias

lazyotp set github AAAABBBBCCCCDDD

You can also pass an otpauth://... URL:

lazyotp set aws 'otpauth://totp/MyApp:user@example.com?secret=AAAABBBBCCCCDDD&issuer=MyApp'

Generate a code by alias

lazyotp code github

Pipe a code easily

lazyotp code github | pbcopy

Generate a one-off code without storing

lazyotp code --secret AAAABBBBCCCCDDD

Delete a stored alias

lazyotp delete github

Upgrade to the latest release binary

lazyotp upgrade

Optional environment variables for upgrade behavior:

  • LAZYOTP_API_URL (default: https://api.github.com/repos/jfalava/lazyotp)
  • LAZYOTP_BIN_PATH (default: current executable path)
  • LAZYOTP_UPGRADE_TIMEOUT_MS (default: 15000)

Default alias and custom service

lazyotp set AAAABBBBCCCCDDD
lazyotp code
lazyotp set work AAAABBBBCCCCDDD --service company
lazyotp code work --service company

Global command

If you want lazyotp on your PATH:

bun link
lazyotp help

Build Binaries

Build for your current platform:

bun install
bun run build

Build for all supported targets:

bun run build:all

Target-specific builds:

bun run build:darwin-arm64
bun run build:darwin-x64
bun run build:linux-arm64
bun run build:linux-x64
bun run build:windows-x64

Artifacts are written to dist/.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors