{"id":16372590,"url":"https://github.com/hedhyw/go-psw","last_synced_at":"2026-03-13T20:30:19.936Z","repository":{"id":57655179,"uuid":"455624411","full_name":"hedhyw/go-psw","owner":"hedhyw","description":"A tiny secure-random password generator","archived":false,"fork":false,"pushed_at":"2022-02-04T17:08:04.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-31T17:25:48.083Z","etag":null,"topics":["bdd-tests","cli","crypto","generator","go","golang","password","rand","random","random-generation","random-number-generators","secure"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hedhyw.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}},"created_at":"2022-02-04T16:47:40.000Z","updated_at":"2023-09-08T04:50:08.000Z","dependencies_parsed_at":"2022-09-01T01:40:34.170Z","dependency_job_id":null,"html_url":"https://github.com/hedhyw/go-psw","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fgo-psw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fgo-psw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fgo-psw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hedhyw%2Fgo-psw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hedhyw","download_url":"https://codeload.github.com/hedhyw/go-psw/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239921876,"owners_count":19718842,"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":["bdd-tests","cli","crypto","generator","go","golang","password","rand","random","random-generation","random-number-generators","secure"],"created_at":"2024-10-11T03:11:54.731Z","updated_at":"2026-03-13T20:30:19.840Z","avatar_url":"https://github.com/hedhyw.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-psw\n\n![Version](https://img.shields.io/github/v/tag/hedhyw/go-psw)\n[![Build Status](https://app.travis-ci.com/hedhyw/go-psw.svg?branch=main)](https://app.travis-ci.com/github/hedhyw/go-psw)\n[![Go Report Card](https://goreportcard.com/badge/github.com/hedhyw/go-psw)](https://goreportcard.com/report/github.com/hedhyw/go-psw)\n[![Coverage Status](https://coveralls.io/repos/github/hedhyw/go-psw/badge.svg?branch=main)](https://coveralls.io/github/hedhyw/go-psw?branch=main)\n[![PkgGoDev](https://pkg.go.dev/badge/github.com/hedhyw/go-psw)](https://pkg.go.dev/github.com/hedhyw/go-psw?tab=doc)\n\n\n**A tiny golang tool for generating a crypto-random password in a terminal.**\n\n\u003cimg alt=\"Golang logo\" src=\"https://raw.githubusercontent.com/rfyiamcool/golang_logo/master/png/golang_68.png\" height=\"200\" /\u003e\n\n## Installation\n\n```sh\ngo install github.com/hedhyw/go-psw/cmd/psw@latest\n```\n\n## Usage\n\n```sh\npsw [LENGTH] [CHARS_PATTERN]\n\n# Just generate a secure-random password:\npsw\n\n# Generate a password of length 10:\npsw 10\n\n# Generate only with given pattern (next example will print [a-zA-Z]):\npsw 10 aA\n\n# Special case (next example will print only [ёàは]):\npsw 10 ёàは\n```\n\n## Using as a library\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/hedhyw/go-psw/pkg/v1/consts\"\n\t\"github.com/hedhyw/go-psw/pkg/v1/generator\"\n)\n\nfunc main() {\n\tg := generator.NewCryptoRandGenerator()\n\n\tchars, err := g.GeneratePassword(\n\t\tconsts.Digits+consts.LowerLetters, // Chars to use.\n\t\t10,                                // Password length.\n\t)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(chars)\n}\n```\n\n## License\n\nSee [License](License).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedhyw%2Fgo-psw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhedhyw%2Fgo-psw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhedhyw%2Fgo-psw/lists"}