Keeper Commander

raw JSON →
17.2.16 verified Fri May 01 auth: no python

Keeper Commander is a command-line and SDK interface for the Keeper Security platform. It allows you to manage vault records, perform administrative tasks, and automate security workflows. Current version 17.2.16, compatible with Python >=3.7. Release cadence is frequent with multiple minor versions per year.

pip install keepercommander
error ModuleNotFoundError: No module named 'keepercommander'
cause The package is not installed or installed in a different environment.
fix
Run 'pip install keepercommander' in the correct Python environment.
error keepercommander.exceptions.LoginFailed: Invalid credentials
cause Incorrect username or password, or environment variables not set properly.
fix
Verify your Keeper credentials and ensure environment variables KEEPER_USER and KEEPER_PASSWORD are set correctly.
error TypeError: login() got an unexpected keyword argument 'user'
cause Using an older version of keepercommander (pre-17.0) that expects positional arguments.
fix
Upgrade keepercommander: 'pip install --upgrade keepercommander' and adjust login call to use keyword arguments.
breaking In version 17.x, the login method parameters changed. Previously accepted separate username/password arguments; now expects a dictionary or uses environment variables. Code written for 16.x will fail.
fix Update login call to use environment variables or pass a config dictionary: commander.login(user='user', password='pass') or set env vars.
deprecated The 'get_records' method is deprecated in favor of 'search_records' which provides more filtering options.
fix Replace get_records() with search_records() and adjust filtering as needed.
gotcha When installing, ensure you have the required system dependencies for cryptography (openssl, etc.). On Windows, this may require Visual C++ build tools.
fix Install system packages: on Ubuntu: apt-get install build-essential libssl-dev libffi-dev python3-dev.

Basic login and record listing. Replace KEEPER_USER and KEEPER_PASSWORD environment variables with your credentials.

from keepercommander import KeeperCommander

# Initialize commander with your Keeper credentials
commander = KeeperCommander()
commander.login(os.environ.get('KEEPER_USER', ''), os.environ.get('KEEPER_PASSWORD', ''))

# List records
records = commander.get_records()
for record in records:
    print(record.get('title'))