{"id":14990310,"url":"https://github.com/kherrick/pwgen","last_synced_at":"2025-04-12T02:06:32.176Z","repository":{"id":6882447,"uuid":"8131751","full_name":"kherrick/pwgen","owner":"kherrick","description":"A password generator compiled as Wasm for use on the CLI, in a custom element, or as a module.","archived":false,"fork":false,"pushed_at":"2023-02-11T23:27:56.000Z","size":1218,"stargazers_count":78,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-12T02:06:27.387Z","etag":null,"topics":["custom-element","password-generator","pwgen","wasm","web-bundle","web-component","web-package","webassembly","webbundle"],"latest_commit_sha":null,"homepage":"https://kherrick.github.io/pwgen/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kherrick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-02-11T02:59:23.000Z","updated_at":"2025-02-14T05:59:40.000Z","dependencies_parsed_at":"2024-06-18T22:32:01.459Z","dependency_job_id":"74ea9e6c-cc08-4bb0-a137-a7a9b83266f8","html_url":"https://github.com/kherrick/pwgen","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":"0.017857142857142905","last_synced_commit":"13bc7087c0e65c4bdb9d75ff278304a49663a180"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherrick%2Fpwgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherrick%2Fpwgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherrick%2Fpwgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kherrick%2Fpwgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kherrick","download_url":"https://codeload.github.com/kherrick/pwgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248505863,"owners_count":21115354,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["custom-element","password-generator","pwgen","wasm","web-bundle","web-component","web-package","webassembly","webbundle"],"created_at":"2024-09-24T14:19:52.319Z","updated_at":"2025-04-12T02:06:32.152Z","avatar_url":"https://github.com/kherrick.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [pwgen](https://kherrick.github.io/pwgen/)\n\nA [password generator](https://kherrick.github.io/pwgen/) compiled as Wasm for use on the CLI, in a custom element, or as a module.\n\n\u003ca href=\"https://kherrick.github.io/pwgen/\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/kherrick/pwgen/master/assets/x-pwgen-screenshot.png\" width=\"200\"\u003e\n\u003c/a\u003e\n\n## Use with the CLI on Mac, Windows, and Linux\n\n[![npm version](https://img.shields.io/npm/v/pwgen.svg)](https://www.npmjs.com/package/pwgen)\n[![wapm version](https://wapm.io/package/kherrick/pwgen/badge.svg?style=flat)](https://wapm.io/package/kherrick/pwgen)\n\n### With npx\n\n```bash\nnpx pwgen -sy 20 1\n```\n\n### With npm, as a global package\n\n```bash\nnpm i -g pwgen\n```\n\n```bash\npwgen -sy 20 1\n```\n\n### With wapm\n\n```bash\nwapm install kherrick/pwgen\n```\n\n```bash\nwapm run pwgen -sy 20 1\n```\n\n## Use in HTML ([demo](https://jsbin.com/yuvazejipu/edit?html,console,output))\n\n```html\n\u003cx-pwgen\n  composed\n  flags=\"-sy\"\n  length=\"20\"\n  number=\"1\"\n\u003e\u003c/x-pwgen\u003e\n\n\u003cscript type=\"module\"\u003e\n  import 'https://unpkg.com/pwgen'\n\n  document.addEventListener(\n    'x-pwgen-handle-password',\n    ({ detail }) =\u003e {\n      console.log(detail.msg)\n    }\n  )\n\u003c/script\u003e\n```\n\n## Use in React\n\n```bash\nnpm i pwgen\n```\n\n```javascript\nimport React from 'react';\nimport 'pwgen';\n\nconst App: React.FC = () =\u003e {\n  return (\n    \u003cx-pwgen\u003e\u003c/x-pwgen\u003e\n  )\n}\n```\n\n## Use in Angular\n\n```bash\nnpm i pwgen\n```\n\nWithin the component:\n\n```typescript\nimport { Component, OnInit } from '@angular/core';\nimport { pwgen } from 'pwgen';\n\n@Component({\n  selector: 'app-root',\n  templateUrl: './app.component.html',\n  styleUrls: ['./app.component.css'],\n})\nexport class AppComponent implements OnInit {\n  password: string = '';\n\n  ngOnInit() {\n    pwgen({\n      arguments: ['-sy', '20', '1'],\n      print: (password: string) =\u003e (\n        this.password = password\n      ),\n    });\n  }\n}\n```\n\nWithin the template:\n\n```html\n\u003cng-container\u003e{{ password }}\u003c/ng-container\u003e\n```\n\n## Use in Node.js\n\n```bash\nnpm i pwgen\n```\n\n```js\nconst pwgen = require('pwgen')\n\nconst flags = '-1sy'\nconst length = '20'\nconst number = '10'\n\npwgen({\n  arguments: [ flags, length, number ],\n  print: stdout =\u003e {\n    console.log(`Password: ${stdout}`)\n  }\n})\n```\n\n## Test the experimental web bundle\n\n### Download [pwgen.wbn](https://kherrick.github.io/pwgen/wbn/dist/pwgen.wbn)\n\n### Read more about web packaging\n\n* [https://web.dev/web-bundles/](https://web.dev/web-bundles/)\n* [https://github.com/WICG/webpackage](https://github.com/WICG/webpackage)\n\n## Develop\n\n### Requirements\n\n* [Node.js](https://nodejs.org/en/download/)\n* [bash](https://www.gnu.org/software/bash/)\n* [Docker](https://hub.docker.com/search/?offering=community\u0026type=edition)\n\n### Clone the project and submodules\n\n```bash\ngit clone https://github.com/kherrick/pwgen \\\n  \u0026\u0026 cd pwgen \\\n  \u0026\u0026 git submodule update --init --recursive\n```\n\n### Start\n\n```bash\nnpm start\n```\n\n### Build\n\n```bash\nnpm run build\n```\n\n## Get Help\n\nShow command line usage and available options (flags):\n\n```bash\nnpx pwgen --help\n```\n\n```text\nUsage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ]\n\nOptions supported by pwgen:\n\n  -c or --capitalize\n  Include at least one capital letter in the password\n\n  -A or --no-capitalize\n  Don't include capital letters in the password\n\n  -n or --numerals\n  Include at least one number in the password\n\n  -0 or --no-numerals\n  Don't include numbers in the password\n\n  -y or --symbols\n  Include at least one special symbol in the password\n\n  -r \u003cchars\u003e or --remove-chars=\u003cchars\u003e\n  Remove characters from the set of characters to generate passwords\n\n  -s or --secure\n  Generate completely random passwords\n\n  -B or --ambiguous\n  Don't include ambiguous characters in the password\n\n  -h or --help\n  Print a help message\n\n  -H or --sha1=path/to/file[#seed]\n  Use sha1 hash of given file as a (not so) random generator\n\n  -C\n  Print the generated passwords in columns\n\n  -1\n  Don't print the generated passwords in columns\n\n  -v or --no-vowels\n  Do not use any vowels so as to avoid accidental nasty words\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkherrick%2Fpwgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkherrick%2Fpwgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkherrick%2Fpwgen/lists"}