{"id":13827490,"url":"https://github.com/mkideal/onepw","last_synced_at":"2026-01-16T19:49:35.436Z","repository":{"id":144202323,"uuid":"57232676","full_name":"mkideal/onepw","owner":"mkideal","description":"onepw is a command line tool for managing passwords","archived":false,"fork":false,"pushed_at":"2020-07-11T11:59:05.000Z","size":72,"stargazers_count":112,"open_issues_count":2,"forks_count":10,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-08-04T09:06:49.812Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/mkideal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2016-04-27T17:29:38.000Z","updated_at":"2024-01-04T16:04:30.000Z","dependencies_parsed_at":"2023-06-18T07:01:38.657Z","dependency_job_id":null,"html_url":"https://github.com/mkideal/onepw","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkideal%2Fonepw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkideal%2Fonepw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkideal%2Fonepw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mkideal%2Fonepw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mkideal","download_url":"https://codeload.github.com/mkideal/onepw/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225486304,"owners_count":17481872,"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":[],"created_at":"2024-08-04T09:01:59.147Z","updated_at":"2026-01-16T19:49:35.423Z","avatar_url":"https://github.com/mkideal.png","language":"Go","funding_links":[],"categories":["Go","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"# onepw [![License](http://img.shields.io/badge/license-mit-blue.svg?style=flat-square)](https://raw.githubusercontent.com/mkideal/onepw/master/LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/mkideal/onepw)](https://goreportcard.com/report/github.com/mkideal/onepw)\n\n![screenshot.png](http://www.mkideal.com/assets/images/onepw/screenshot.png)\n\n## Install\n\n```sh\ngo get github.com/mkideal/onepw\n```\n\n## What's this\nonepw is a command line tool for managing passwords, provides `init`,`add`,`remove`,`list`,`find`,`generate`,`info` commands. You **MUST** remember the `master password`, and don't tell anyone!\n\n## Principles\n\n1. Generate Key by master password\n\n```\no--------o             o-----o\n| Master | KDF: scrypt |     |\n| Pass   |============\u003e| Key |\n| Word   |             |     |\no--------o             o-----o\n```\n\n2. Encrypt account and password\n\n```\no-----------o\n|           |\n| Random IV |==o\n|           |  |                o------------o\no-----------o  | CFB Encrypter  |            |\n               |===============\u003e| CipherText |\no-----------o  | AES Cipher     |            |\n|           |  | with Key       o------------o\n| PlainText |==o\n|           |\no-----------o\n```\n\n## Commands\n\n* help     - `display help`\n* version  - `display version`\n* init     - `init password box or modify master password`\n* add      - `add a new password or update old password`\n* remove   - `remove passwords by ids or (category,account)(aliases rm,del,delete)`\n* list     - `list all passwords(aliases ls)`\n* find     - `find password by id,category,account,tag,site and so on`\n* upgrade  - `upgrade to newest version(aliases up)`\n* generate - `a utility command for generating password(aliases gen)`\n* info     - `show low level information of password`\n\n### help - `show help information`\n\n```sh\n# show help information of onepw\n$\u003e onepw\n# or\n$\u003e onepw help\n\n# show help information of specific command\n$\u003e onepw help COMMAND\n# or\n$\u003e onepw COMMAND -h\n```\n\n### version - `show onepw version`\n\n```sh\n$\u003e onepw version\n# or\n$\u003e onepw -v\n```\n\n### init - `init password box`\nFirst of all, you should `init` a password box with master password.\n\n```sh\n# Will prompt for enter master password\n$\u003e onepw init\ntype the master password:\n```\n\n**NOTE**: The master password can be set by ENV variable ONEPW_MASTER.\n\n### add - `add a new command or update old password`\n\n```sh\nOptions:\n\n  -h, --help\n      display help information\n\n  --master[=$ONEPW_MASTER]\n      master password\n\n  --debug[=false]\n      usage debug mode\n\n  -c, --category\n      category of password\n\n  -u, --account\n      account of password\n\n  --site\n      website of password\n\n  --tag\n      tags of password\n\n  --id\n      password id for updating\n\n  --pw, --password\n      the password\n\n  --cpw, --confirm-password\n      confirm password\n```\n\n```sh\n$\u003e onepw add -c=email -u user@example.com\ntype the password:\nrepeat the password:\n```\n\n### list - `list all passwords, aliases ls`\n\n```sh\nOptions:\n\n  -h, --help\n      display help information\n\n  --master[=$ONEPW_MASTER]\n      master password\n\n  --debug[=false]\n      usage debug mode\n\n  --no-header[=false]\n      don't print header line\n```\n\n```sh\n$\u003e onepw list\n# or\n$\u003e onepw ls\n```\n\n### remove - `remove passwords by ids or account, aliases rm/del/delete`\n\n```sh\nUsage: onepw rm [ids...] [OPTIONS]\n\nOptions:\n\n  -h, --help\n      display help information\n\n  --master[=$ONEPW_MASTER]\n      master password\n\n  --debug[=false]\n      usage debug mode\n\n  -a, --all[=false]\n      remove all found passwords\n```\n\n### find - `find passwords by id,category,account,...`\n\n```sh\nUsage: onepw find \u003cWORD\u003e\n\nOptions:\n\n  -h, --help\n      display help information\n\n  --master[=$ONEPW_MASTER]\n      master password\n\n  --debug[=false]\n      usage debug mode\n\n  -p, --just-password[=false]\n      only show password\n\n  -f, --just-first[=false]\n      only show first result\n```\n\n### generate - `generate password, aliases gen`\n\n```sh\nUsage: onepw gen [OPTIONS] LEN\n\nOptions:\n\n  -h, --help\n      display help information\n\n  -n, --number=N[=1]\n      number of generated passwords\n\n  -d, --digit[=false]\n      whether the password contains digit\n\n  -c, --lower-char[=false]\n      whether the password contains lowercase character\n\n  -C, --upper-char[=false]\n      whether the password contains uppercase character\n\n  -s, --special-char[=false]\n      whether the password contains the special character\n\n  --sset, --special-set\n      custom special character set\n```\n\n```sh\n$\u003e onepw gen 12\nFA7vAeZML02r\n$\u003e onepw gen 12 -cs\niqva%kj*^!!f\n$\u003e onepw gen 16 -cCdS\n0g1b^TgAUXAij2KC\n```\n\n### info - `show low-level information of password`\n\n```sh\nUsage: onepw info \u003cids...\u003e\n\nOptions:\n\n  -h, --help\n      display help information\n\n  --master[=$ONEPW_MASTER]\n      master password\n\n  --debug[=false]\n      usage debug mode\n\n  -a, --all\n      show all found passwords\n```\n\n## Example\n\n```sh\n$\u003e echo \"export ONEPW_FILE=~/mypasswords/password.data\"\n$\u003e echo \"export ONEPW_MASTER=MySecret\"\n\n# init password box\n$\u003e onepw init\n\n# add a new password\n$\u003e onepw add -c email -u user@example.com\ntype the password: \nrepeat the password: \npassword d9437f07af7c8b035a4fa9513ace449f added\n\n# list all passwords\n$\u003e onepw ls\n+---------+----------+------------------+----------+---------------------------+\n| ID      | CATEGORY | ACCOUNT          | PASSWORD | UPDATED_AT                |\n+---------+----------+------------------+----------+---------------------------+\n| d9437f0 | email    | user@example.com | 123456   | 2016-04-29T00:54:36+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n\n# add a new password\n$\u003e onepw add -c github -u hello --pw=123456 --cpw=123456\npassword 3439d3178f35f56f4c3d6f27e7ccc9a7 added\n\n# list all passwords\n$\u003e onepw ls\n+---------+----------+------------------+----------+---------------------------+\n| ID      | CATEGORY | ACCOUNT          | PASSWORD | UPDATED_AT                |\n+---------+----------+------------------+----------+---------------------------+\n| 3439d31 | github   | hello            | 123456   | 2016-04-29T00:56:26+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n| d9437f0 | email    | user@example.com | 123456   | 2016-04-29T00:54:36+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n\n# add a new password\n$\u003e onepw add -c email -u user2@gmail.com --site=gmail.com --tag=google\ntype the password:\nrepeat the password:\npassword 2ca000f993a665337bebd4700cfd7c6c added\n\n# list all passwords\n$\u003e onepw ls\n+---------+----------+------------------+----------+---------------------------+\n| ID      | CATEGORY | ACCOUNT          | PASSWORD | UPDATED_AT                |\n+---------+----------+------------------+----------+---------------------------+\n| 2ca000f | email    | user2@gmail.com  | 123456   | 2016-04-29T00:58:49+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n| 3439d31 | github   | hello            | 123456   | 2016-04-29T00:56:26+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n| d9437f0 | email    | user@example.com | 123456   | 2016-04-29T00:54:36+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n\n# find passwords\n$\u003e onepw find mail\n+---------+-------+------------------+--------+---------------------------+\n| 2ca000f | email | user2@gmail.com  | 123456 | 2016-04-29T00:58:49+08:00 |\n+---------+-------+------------------+--------+---------------------------+\n| d9437f0 | email | user@example.com | 123456 | 2016-04-29T00:54:36+08:00 |\n+---------+-------+------------------+--------+---------------------------+\n\n# find first password\n$\u003e onepw find mail -f\n+---------+-------+------------------+--------+---------------------------+\n| 2ca000f | email | user2@gmail.com  | 123456 | 2016-04-29T00:58:49+08:00 |\n+---------+-------+------------------+--------+---------------------------+\n\n# find passwords, but only show password\n$\u003e onepw find mail -p\n123456\n123456\n\n# ^TRY:\n# onepw find mail -pf\n\n$\u003e onepw find hello\n+---------+--------+-------+--------+---------------------------+\n| 3439d31 | github | hello | 123456 | 2016-04-29T00:56:26+08:00 |\n+---------+--------+-------+--------+---------------------------+\n\n# remove passwords\n$\u003e onepw rm 343\ndeleted passwords:\n3439d3178f35f56f4c3d6f27e7ccc9a7\n\n# list all passwords\n$\u003e onepw ls\n+---------+----------+------------------+----------+---------------------------+\n| ID      | CATEGORY | ACCOUNT          | PASSWORD | UPDATED_AT                |\n+---------+----------+------------------+----------+---------------------------+\n| 2ca000f | email    | user2@gmail.com  | 123456   | 2016-04-29T00:58:49+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n| d9437f0 | email    | user@example.com | 123456   | 2016-04-29T00:54:36+08:00 |\n+---------+----------+------------------+----------+---------------------------+\n```\n\n## CHANGELOG\n\n[ChangeLog](https://github.com/mkideal/onepw/blob/master/CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkideal%2Fonepw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmkideal%2Fonepw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmkideal%2Fonepw/lists"}