Thanks to visit codestin.com
Credit goes to github.com

Skip to content

genpas is a command-line password generator that creates strong, unique passwords every time. It allows you to customize length, include or exclude numbers and symbols, and optionally save passwords locally with labels. All operations are offline, ensuring your passwords remain private and secure.

Notifications You must be signed in to change notification settings

suryansh00001/genpas

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔑 genpas

A simple and secure CLI password generator with optional local saving. Don’t worry — we never store your passwords remotely. All generated passwords are saved only on your local machine in a passwords.json file.


✨ Features

  • Generate strong random passwords
  • Options to exclude numbers or symbols
  • Choose password length
  • Interactive prompt to save passwords with a custom label
  • Saved passwords stored locally in JSON format

📦 Installation

Install globally from npm:

npm install -g genpas

🚀 Usage

Generate a password (default length = 12):

genpas

Generate a password of length 16:

genpas -len=16

Exclude numbers:

genpas -nonum

Exclude symbols:

genpas -nosym

Show help:

genpas -h

💾 Saved Passwords

If you choose to save a password, it will be written to a local file named passwords.json.

Finding the password file

Since genpas is installed globally, the file is saved inside the global npm node_modules folder.

  1. First, get the global root path:
npm root -g

This will print something like:

  • Windows: C:\Users\LENOVO\AppData\Roaming\npm\node_modules
  • macOS/Linux: /usr/local/lib/node_modules
  1. Your saved passwords file will be here:
<npm-root>/genpas/passwords.json

To access your password you can easily do

cat <npm-root>/genpas/passwords.json

Quick commands to open the file

Windows (PowerShell)

Open in Notepad:

notepad ((npm root -g) + '\genpas\passwords.json')

Print to console:

Get-Content ((npm root -g) + '\genpas\passwords.json') | Out-String

macOS/Linux

Show contents:

cat "$(npm root -g)/genpas/passwords.json"

Open in editor:

xdg-open "$(npm root -g)/genpas/passwords.json"   # Linux
open "$(npm root -g)/genpas/passwords.json"       # macOS

⚠️ Note

Saving files inside node_modules isn’t ideal because updates may overwrite them. In a future update, saved passwords will move to your home directory (e.g., ~/.genpas_passwords.json).


🛠️ Development

Clone the repo and run locally:

git clone https://github.com/<your-username>/genpas.git
cd genpas
npm install
node index.js -len=12

📜 License

MIT © 2025 Suryansh Garg

About

genpas is a command-line password generator that creates strong, unique passwords every time. It allows you to customize length, include or exclude numbers and symbols, and optionally save passwords locally with labels. All operations are offline, ensuring your passwords remain private and secure.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published