API and integrations
Passwork CLI
10 min
passwork cli is a command line tool for retrieving passwords from passwork and securely working with them in scripts, automation, and ci/cd main operating modes exec — extracts passwords, places them in environment variables, and runs the specified command with these variables api — allows executing any passwork api methods and receiving responses in json format what passwork cli is used for secure connection to databases and services — passwords are not saved in files but are substituted only during command execution deployment automation and ci/cd — secrets from passwork are automatically available in pipelines server administration — performing tasks using temporary environment variables integration with devops tools — quick password retrieval for scripts, ansible, terraform, and other tools installation you can install the package directly from github pip install git+ssh //git\@github com\ passwork me/passwork python git or pip install git+https //github com/passwork me/passwork python git usage examples get password and run script passwork cli exec password id 123456 cmd "python3 backup py" get multiple passwords from folder and start service passwork cli exec folder id 654321 cmd "docker compose up" get list of all vaults via api passwork cli api method get endpoint v1/vaults execute command with self signed certificate passwork cli exec no ssl verify password id 111222 cmd "ansible playbook site yml" passwork cli benefits passwords don't appear in command history and are not saved to disk access to passwords only during process execution support for working with self signed certificates flexible password filtering by tags, folders, vaults security all data is encrypted on the client side (when client side encryption mode is enabled) it's recommended to use environment variables for storing tokens and master keys technical documentation review the technical documentation for passwork cli