# totp-seed-cli

> Provided a TOTP seed, this will generate a one time passcode for that seed and display how much time left it has in your CLI.

Latest version **1.2.1** (published 2023-08-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install totp-seed-cli
pnpm add totp-seed-cli
yarn add totp-seed-cli
bun add totp-seed-cli
```

Provides the command `totp`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2023-08-03 |
| First published | 2023-08-02 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ricardo Magalhaes |
| Maintainers | magalhini |
| Keywords | totp, cli, one time passcode |

## Links

- npm: https://www.npmjs.com/package/totp-seed-cli
- npm.io page: https://npm.io/package/totp-seed-cli

## Dependencies (4)

- [boxen](https://npm.io/package/boxen.md) ^5.1.0
- [chalk](https://npm.io/package/chalk.md) ^4.1.2
- [jssha](https://npm.io/package/jssha.md) ^1.6.0
- [yargs](https://npm.io/package/yargs.md) ^17.7.2

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.2.1 (latest) — 2023-08-03
- 1.2.2 — 2023-08-03
- 1.1.2 — 2023-08-02
- 1.1.1 — 2023-08-02
- 1.1.0 — 2023-08-02
- 1.0.0 — 2023-08-02

## README

# TOTP ClI

Given a TOTP seed, you can generate one-time passcodes on your CLI, also receiving the time remaining for a particular code. Passing the `-c` option will also immediately copy it to the clipboard.

```bash
topt-seed-cli -s BD6ZWNRLEOG5JUQHC2YW6BXX2K675AZX


   ╔════════════╗
   ║            ║
   ║   047232   ║
   ║            ║
   ╚════════════╝

9 seconds remaining for this code.
```

## tl;dr

1. Install it globally using `npm i -g totp-seed-cli`
2. Pass it a seed and use the optional `-c` flag to copy the code to your clipboard: `totp -s ABCDEFGH -c`

## Installing

To use `totp` locally in your CLI, install it globally using npm:

`npm i -g totp-seed-cli`

## Usage

Use `-s` to pass in your seed:

`totp -s ABCDEFGH`

This will output the code to the console.

### Copy to clipboard

To display the code and the time remaining, but also copy it to the clipboard, pass `-c`:

`totp -s ABCDEFGH -c`

### Save seed and read it from local file:

To save the seed in a local file for future use, pass `-S`

`totp -s ABCDEFGH -S`

From here on, you can just call `totp`.

### Create an alias for your seed

Using your shell of choice, you can create an alias so you can call this from anywhere without having to pass your seed.
If you're using `zsh`, use your editor to edit your `.zshrc`:

1. `vi ~/.zshrc`

Add an alias with your seed and the copy command, such as:

`alias otp="totp -s ABCDEFGH -c"`

Save the file and restart your terminal. You can now simply call `otp` from anywhere.

**Acknowledgements**: the source for the `TOTP` Class is entirely sourced from the [Blendist's TOTP.io](https://github.com/venables/totp.io) project, which is the web equivalent of this project and where I got the inspiration to do this from.

## Requirements

Non-ESM packages specifically to work with `node v16.15.0`.

---
_Source: https://npm.io/package/totp-seed-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
