Overview
Command line interface for retrieving passwords from the Passwork password manager and securely using them in scripts and commands.
Passwork CLI operates in four modes:
- exec — extract passwords from items or shortcuts, add them to the variable environment, and run the specified command with access to the variables;
- get — get the field value from an element or shortcut, decrypt it locally, and output it to STDOUT;
- update — update an element or shortcut field via CLI with security in mind;
- api — allows to execute any Passwork API method and receive a response in JSON format.
Requirements
- Python 3.10+
- requests>=2.31.0
- python-dotenv>=1.0.0
- cryptography>=42.0.0
- pbkdf2>=1.3
Installation
You can install the package from PyPI or GitHub:
- PyPI
- GitHub (SSH)
- GitHub (HTTPS)
pip install passwork-python
pip install git+ssh://[email protected]:passwork-me/passwork-python.git
pip install git+https://github.com/passwork-me/passwork-python.git
Common parameters
All commands support the following parameters:
| Parameter | Environment variable | Description |
|---|---|---|
--host | PASSWORK_HOST | Passwork server URL |
--token | PASSWORK_TOKEN | Access token |
--refresh-token | PASSWORK_REFRESH_TOKEN | Refresh token (optional) |
--master-key | PASSWORK_MASTER_KEY | Master key for decryption |
--no-ssl-verify | Disable SSL certificate verification |