{"id":19879988,"url":"https://github.com/passbolt/passbolt_cli","last_synced_at":"2025-04-09T15:04:21.897Z","repository":{"id":7889586,"uuid":"56769627","full_name":"passbolt/passbolt_cli","owner":"passbolt","description":"Command line interface for passbolt API","archived":false,"fork":false,"pushed_at":"2023-07-18T21:19:40.000Z","size":421,"stargazers_count":158,"open_issues_count":14,"forks_count":30,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-09T15:03:35.987Z","etag":null,"topics":["cli","nodejs","passbolt"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/passbolt.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":"2016-04-21T11:53:46.000Z","updated_at":"2025-02-19T11:43:47.000Z","dependencies_parsed_at":"2024-11-12T17:09:59.056Z","dependency_job_id":"b8e849a8-b147-477c-a356-628ec0633d71","html_url":"https://github.com/passbolt/passbolt_cli","commit_stats":{"total_commits":76,"total_committers":13,"mean_commits":5.846153846153846,"dds":0.5263157894736843,"last_synced_commit":"289017ef1f48223273dea69285eecdc20da146b4"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/passbolt%2Fpassbolt_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/passbolt","download_url":"https://codeload.github.com/passbolt/passbolt_cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055276,"owners_count":21040156,"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":["cli","nodejs","passbolt"],"created_at":"2024-11-12T17:09:56.551Z","updated_at":"2025-04-09T15:04:21.859Z","avatar_url":"https://github.com/passbolt.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\t      ____                  __          ____\n\t     / __ \\____  _____ ____/ /_  ____  / / /_\n\t    / /_/ / __ `/ ___/ ___/ __ \\/ __ \\/ / __/\n\t   / ____/ /_/ (__  |__  ) /_/ / /_/ / / /_\n\t  /_/    \\__,_/____/____/_.___/\\____/_/\\__/\n\n\tOpen source password manager for teams\n\t(c) 2021 Passbolt SA\n\n## License\n\nPassbolt - Open source password manager for teams\n\n(c) 2021 Passbolt SA\n\nThis program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General\nPublic License (AGPL) as published by the Free Software Foundation version 3.\n\nThe name \"Passbolt\" is a registered trademark of Passbolt SA, and Passbolt SA hereby declines to grant a trademark\nlicense to \"Passbolt\" pursuant to the GNU Affero General Public License version 3 Section 7(e), without a separate\nagreement with Passbolt SA.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied\nwarranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See GNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License along with this program. If not,\nsee [GNU Affero General Public License v3](http://www.gnu.org/licenses/agpl-3.0.html).\n\n# What is the purpose of this repository\n\nThis repository is a command line interface for [passbolt API](https://github.com/passbolt/passbolt_api).\nIt allows a user to interact with the passbolt server without the use of [web extension](https://github.com/passbolt/passbolt_browser_extension).\n\nCurrently works as a read only access only.\n\n# Prerequisite\nIn order to use passbolt CLI you will need:\n- Gnupg v2\n- Nodejs LTS or more recent\n\n# How to get started?\n\nCopy the repository\n```\ngit clone git@github.com:passbolt/passbolt_cli.git\n```\n\nMove inside the new directory\n```\ncd passbolt_cli\n```\n\nInstall npm dependencies\n```\nnpm install\n```\n\nMake the symlink on our path point to the index.js\n```\n[sudo] npm link\n```\n\nCreate or copy a configuration file with a user and a server config\n```\nmkdir ~/.config/passbolt\ncp app/config/config.default.json ~/.config/passbolt/config.json\n```\n\nOpen the newly created config file and set the details.\nYou can look at the examples in the config folder.\n\n# Configuration\n## Domain config\nYou need to setup the domain `baseUrl`, and the associated key `fingerprint`\nYou also need to make sure the server public key is in your GnuPG keyring.\n\nIf you do not know the domain public key or fingerprint you can get them like follow\n```\n$ passbolt server-key --domain=https://www.passbolt.test | gpg --import\n$ passbolt server-key --fingerprint --domain=https://www.passbolt.test\n```\n\n## User config\nYou will need to download your private key from the passbolt interface, for example\nduring the backup step of the setup, or once logged on your profile workspace.\n\nImport this key in your GnuPG keyring and get a hold of the fingerprint.\nSet all the information in the `user` section of the configuration file.\n\n## Example configuration\nIf you are using a default passbolt server instance with Selenium tests data installed then it will work out the box\nwith Ada for example:\n```\n{\n  \"domain\" : {\n    \"baseUrl\": \"http://passbolt.dev\",\n    \"publicKey\" : {\n      \"fingerprint\" : \"2FC8945833C51946E937F9FED47B0811573EE67E\"\n    }\n  },\n  \"user\" : {\n    \"firstname\": \"Ada\",\n    \"lastname\" : \"Lovelace\",\n    \"email\" : \"ada@passbolt.com\",\n    \"privateKey\" : {\n      \"fingerprint\": \"03F60E958F4CB29723ACDF761353B5B15D9B054F\"\n    }\n  }\n}\n```\n\n## Additional settings\nSome additional options are available:\n\n###  Gpg trust\n\nYou can define the trust model when encrypting:\n```\n  \"gpg\" : {\n    \"trust\": \"always\"\n  }\n```\n\n### Working with self signed certificates\n\nBy default SSL request will be refused for a connection which is not authorized with the list of \nsupplied CAs. *For testing purposes* you can set rejectUnauthorized to false, to ignore issues \nwith the certificate (authority, not matching names, etc).\n\nPlease [review other options](https://github.com/request/request#using-optionsagentoptions) \nthat allow finer and safer control for self signed certificate, see. \n```\n  \"agentOptions\": {\n    \"rejectUnauthorized\": false\n  }\n```\n\n### Mfa preferences\n\nIt is possible to set the order of preference for MFA providers if MFA is setup and requested.\nWith this configuration if Yubikey and TOTP providers are both enabled for the organization and the user,\nyubikey OTP will be used as MFA. If it is not enabled for the organization for example, it will fall back\nto Totp.\n```\n  \"mfa\": {\n    \"providers\": [\"yubikey\",\"totp\"]\n  },\n```\n\n# What commands do to you support?\n\nRight now the basics, only authentication and read operations.\n```\n  Usage: passbolt [options] [command]\n\n\n  Commands:\n    auth           Authentication actions, login or logout\n    get            View the OpenPGP data block of a given resource\n    find           Find one or more resources\n    server-key     Fetch the server public key\n    users          List all users\n    user           View one user details\n    help [cmd]     display help for [cmd]\n\n  Options:\n\n    -h, --help     output usage information\n    -V, --version  output the version number\n```\n\n## Authentication\nAuthentication is based on [GPGAuth](https://www.passbolt.com/help/tech/auth), so it uses your private key\nand your passphrase if you have one.\n\nOptionally you can provide your passphrase if you do not want gnupg handle the pinentry.\nPlease note that this obviously less safe.\n```\n$ passbolt auth login --passphrase='\u003cpassphrase\u003e'\n\nGPGAuth Skipping, you are already logged in\n```\n\nYou can also logout. If let say you change your user config, or want to clear your session.\n```\n$ passbolt auth logout\n```\n\nYou can check if you are logged in or not.\n```\n$ passbolt auth check\n```\n\n## Find a password\n```\n$ passbolt find\n\nNAME                            USERNAME             URI                                     MODIFIED             UUID\nInkscape                        vector               https://inkscape.org/                   2016-05-15 16:04:49  17c66127-0c5e-3510-a497-2e6a105109db\nEnlightenment                   efl                  https://www.enlightenment.org/          2016-05-15 16:04:49  2af40344-b330-30a8-ac26-64b2776f07e0\nfree software foundation europe fsfe                 https://fsfe.org/index.en.html          2016-05-15 16:04:49  31bf093f-dd27-391d-ae9d-f511ef41dd12\nftp                             user                 ftp://192.168.1.1                       2016-05-15 16:04:49  4a2f98e8-b326-3384-aa2b-c3c9a81be3f7\n...\n```\nYour can select the columns you want to display using the `--columns` arguments.\nNon existing collumns will be ignored.\n\n```\n$ passbolt find --columns=name,uuid\n```\n\n## Get the encrypted password\n\nOnce you know the UUID from the find you can get it as follow\n```\n$ passbolt get 664735b2-4be7-36d9-a9f8-08d42998faf8\n-----BEGIN PGP MESSAGE-----\nVersion: GnuPG v2\n\nhQIMA1P90Qk1JHA+ARAAmp59nJOyb4awNBo9x32Vn01ggw77571EGjnBA0gOXwQD\n+mANJj9YiU9Wx8vM77WuUo8o7O5uXzf6mpo/QgK1pyoNl0nOviAYUoKdTuC2dUKG\n5eS8DUb4SA/XDlOSywkRkRdwDm/BlQvfWCFPqX1kacivBa3RBR2tuojGMSw0sjAq\nzUZZ5iDIMMUhvCzgALcAr84NaUfB5Tb1VLArVDadGx5/qzGFCa2Fris+mBq2dVuk\nX0Jy+jmWXaob2EDjVm49rcKrMWbHDtmWKl4eAJZnGWrhsOT1PBikSXQorILLdkjD\nVFCSX4a8hK6SeWO49fwC/Q8NBCx7at3zvstrie+aoQe/gMQhcHTUu64z/hBhCNww\nJhxfyTdLGHq9j7jPkUPgkw135SvYpeY4Nzk70/hc7tDD0EYDlgVtTNdTiVYVliHN\nGQ4qkjwIog7WQy0FQ+DaA6+WANVpVDfjODUzLwr5ef7ZkfWe0XkfG0oRSyIfui9d\ngsuoTc74n61T9dTxx/Vp9uPU7nLR+mRRSuXqy/tdinI7jEN5f2i98ikX+OxU5QIv\nM+xLWLKKWY+hjUcb1z36UhTi2D5TeW4GL7QEcpT/mteNw3gHPBkjECdKg8mOSXE7\nli6NsKABJ+I3013ibQKL360HH22tCdlMYGPSQjOwjafy2Uiyid1w8+TAoRAwlmnS\nQQFAaEJ7c2o2BO5cLIVD/rhP/zJjAV1uUQnJwe6EExpMTL9Iw38MZj+q4VjfRw2q\nINNhsjl+27LCiCNmH8RNvPce\n=Bbft\n-----END PGP MESSAGE-----\n```\n\n## Putting it all together\n\nOf course you can chain and pipe things up like:\n\n```\n$ passbolt get $(passbolt find  | awk '/inkscape/ { print $NF }') | gpg -q --no-tty \n```\n\n```\n-q and --no-tty \n```\nare optional and ensures that only the password is printed.\n## Running the tests\n\n```\n$ [sudo] npm install -g mocha\n$ mocha tests\n```\n\n## List the users\n```\n$ passbolt users\n\nFIRST-NAME           LAST-NAME            USERNAME              FINGERPRINT                              UUID\nFrances              Allen                frances@passbolt.com  98DA33350692F21BD5F83A17E8DC5617477FB14C 1c137bd7-2838-3c3d-a021-d2986d9126f5\nKathleen             Antonelli            kathleen@passbolt.com 14D07AFFDE916BC904F17AFB4D203642A73AE279 201b442c-d6ca-3ee6-a443-ce669ca0ec6e\nJean                 Bartik               jean@passbolt.com     8F758E3BDD8445361A8A6AD073BAC28524AA1193 7c7afd29-1b98-3c3e-ae55-adedc333fb4b\n...\n```\n\nYour can select the columns you want to display using the `--columns` arguments.\n\n```\n$ passbolt users --columns=created,username\n```\n\n## Find a user\n```\n$ passbolt user 1c137bd7-2838-3c3d-a021-d2986d9126f5\n\nFIRST NAME           LAST NAME            USERNAME              FINGERPRINT                              UUID\nFrances              Allen                frances@passbolt.com  98DA33350692F21BD5F83A17E8DC5617477FB14C 1c137bd7-2838-3c3d-a021-d2986d9126f5\n...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassbolt%2Fpassbolt_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpassbolt%2Fpassbolt_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpassbolt%2Fpassbolt_cli/lists"}