https://github.com/sumithemmadi/totpjs
totpjs is a cli which generate 2FA One Time Passwords.
https://github.com/sumithemmadi/totpjs
Last synced: 6 months ago
JSON representation
totpjs is a cli which generate 2FA One Time Passwords.
- Host: GitHub
- URL: https://github.com/sumithemmadi/totpjs
- Owner: sumithemmadi
- License: mit
- Created: 2022-09-13T05:40:40.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-09-07T06:10:29.000Z (over 2 years ago)
- Last Synced: 2025-08-02T01:10:43.581Z (7 months ago)
- Language: JavaScript
- Size: 4.48 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# totpjs
[](https://www.npmjs.com/package/node-totpjs)
[](https://github.com/sumithemmadi/totpjs/stargazers)
[](https://github.com/sumithemmadi/totpjs)
[](https://github.com/sumithemmadi/totpjs/blob/main/LICENSE)
[](https://github.com/sumithemmadi/totpjs)
[](https://github.com/sumithemmadi/totpjs/issues)
`totpjs`/`node-totpjs` is a cli which generate 2FA One Time Passwords.

# INSTALLATION
- To install globally
```
npm install -g node-totpjs
```
- To use it in nodejs
```
npm install node-totpjs
```
and use it like.
```js
import { get_totp } from "node-totpjs";
console.log(get_totp("BSGSALKSNFASFASF"))
// 929926
```
# CLI-USAGE
- Install it globally
```
npm install -g node-totpjs
```
```
~$ totpjs --help
Usage:
totpjs add (Add a 2FA key)
totpjs remove (Remove a 2FA key)
Options:
--version Show version number [boolean]
-i, --interactive Interactively select 2FA account [boolean]
-h, --help Show help [boolean]
```
### Adding new 2FA Key
```
~$ totpjs add
```

### Removing 2FA Key
example/interactive.gif
```
~$ totpjs remove
```

### Select a particular account
```bash
~$ totpjs -i # Select a particular account
```

# LICENSE
MIT License
Copyright (c) 2022 Emmadi Sumith Kumar
## 💝 Sponsor and support me
If you find my projects helpful or inspiring, consider supporting me through GitHub Sponsors. Your sponsorship helps me dedicate more time and effort to open source development and creating impactful projects.
[:heart: Sponsor me on github](https://github.com/sponsors/sumithemmadi?o=sd&sc=t)
### 💖 Sponsors
[](https://github.com/sponsors/sumithemmadi/)
- I want to extend my sincere gratitude to all my sponsors for their generous support.