Loading...
Loading...
Retrieve, inject, and manage secrets from Keeper Vault using KSM CLI (ksm). Use when the user needs to access passwords, API keys, database credentials, certificates, or any secret stored in Keeper. Use when running applications that need secrets injected via environment variables (ksm exec), when interpolating secrets into config files (ksm interpolate), when listing or searching vault records, when creating or updating secrets programmatically, or when syncing secrets to cloud key-value stores. Also use when the user mentions 'keeper', 'ksm', 'keeper secrets', 'keeper vault', 'keeper notation', 'keeper://', or asks about retrieving credentials for CI/CD, Docker, Kubernetes, or any DevOps pipeline. Prefer this skill over hardcoding credentials. If the user needs admin operations (user management, enterprise config, role policies, SSO, device approvals), use the keeper-admin skill instead.
npx skill4agent add keeper-security/keeper-agent-kit keeper-secretskeeper://| Need | Tool |
|---|---|
| Retrieve a secret (password, key, cert) | |
| Inject secrets into env vars at runtime | |
| Template secrets into config files | |
| List/search records shared with your app | |
| Create or update secret records | |
| Sync secrets to AWS/Azure secret stores | |
| Generate secure passwords | |
| Admin tasks (users, teams, roles, SSO) | Use |
| Create KSM Applications or Client Devices | Use |
| Manage PAM resources or rotation | Use |
pip install keeper-secrets-manager-cliksm version# Install with keyring support (recommended)
pip install keeper-secrets-manager-cli[keyring]
# Initialize with One-Time Access Token (set KSM_CLI_TOKEN in your shell first—see Keeper profile docs; do not pass --token with a literal value)
ksm profile init
# For containers/CI (no keyring available)
pip install keeper-secrets-manager-cli
# Prerequisite: export KSM_CLI_TOKEN from a trusted source, then:
ksm profile init
# Creates keeper.ini with 0600 permissions
# Auto-create profile from environment variable (containers; see Keeper docs)
ksm secret list # When KSM_TOKEN is set, profile may be auto-created on first useksm profile list
# After exporting KSM_CLI_TOKEN for each setup step:
ksm profile init --profile production
ksm profile init --profile staging
ksm secret list --profile production| Variable | Purpose |
|---|---|
| One-Time Access Token for |
| One-Time Access Token for auto-init in some container flows (see Keeper docs) |
| Base64 config string (for K8s/containers) |
| Path to keeper.ini |
| Active profile name |
| Keeper host (US, EU, AU, JP, CA, US_GOV) |
ksm secret list
# Output:
# UID Record Type Title
# ----------------------- -------------------- -------------------------
# SNzjw8tM1HsXEzXERCJrNQ login Stripe API Key
# 8f8I-OqPV58o2r91wVgZ_A databaseCredentials Production MySQL Database# Get full record as JSON
ksm secret get -u <RECORD_UID> --json
# Get a specific field value
ksm secret get -u <RECORD_UID> -f password
ksm secret get -u <RECORD_UID> -f login
# Get with JSONPath query
ksm secret get -u <RECORD_UID> --json -q '$.fields[?@.type=="password"].value[0]'
# Get by title
ksm secret get -t "Production MySQL Database" -f password
# Remove surrounding quotes from output (useful for scripting)
ksm secret get -u <RECORD_UID> -f password --rawkeeper://<RECORD_UID>/field/<FIELD_TYPE>keeper://<RECORD_UID>/custom_field/<LABEL>keeper://SNzjw8tM1HsXEzXERCJrNQ/field/login
keeper://SNzjw8tM1HsXEzXERCJrNQ/field/password
keeper://8f8I-OqPV58o2r91wVgZ_A/field/host
keeper://8f8I-OqPV58o2r91wVgZ_A/custom_field/ConnectionStringreferences/keeper-notation.mdkeeper://# Single secret
export DB_PASSWORD="keeper://8f8I-OqPV58o2r91wVgZ_A/field/password"
ksm exec -- myapp
# Inline
DB_PASSWORD="keeper://8f8I-OqPV58o2r91wVgZ_A/field/password" \
API_KEY="keeper://SNzjw8tM1HsXEzXERCJrNQ/field/password" \
ksm exec -- ./start_server.sh
# Docker example
docker run \
-e DB_PASSWORD="keeper://8f8I-OqPV58o2r91wVgZ_A/field/password" \
-e KSM_CONFIG="<base64-config>" \
myimage ksm exec -- /app/start.sh# Replace keeper:// placeholders in a template file
ksm interpolate --in-file config.tmpl --out-file config.yaml
# Example template (config.tmpl):
# database:
# host: keeper://8f8I-OqPV58o2r91wVgZ_A/field/host
# password: keeper://8f8I-OqPV58o2r91wVgZ_A/field/password# Create from editor
ksm secret add editor --record-type login --title "New API Key"
# Create from field arguments (supply sensitive field values from secure input, not sample literals)
ksm secret add field --record-type login --title "New API Key" \
--field "login=admin"
# Update a field (use secure input for password fields)
ksm secret update -u <RECORD_UID> --field "login=newuser"
# Delete a record
ksm secret delete -u <RECORD_UID>ksm secret password --length 32
ksm secret password --lc 8 --uc 8 -d 8 --sc 8# Sync to AWS Secrets Manager
ksm sync --type aws_sm --credentials <AWS_CREDS_RECORD_UID> \
--map <KEEPER_UID>=<AWS_SECRET_NAME>
# Sync to Azure Key Vault
ksm sync --type azure_kv --credentials <AZURE_CREDS_RECORD_UID> \
--map <KEEPER_UID>=<AZURE_SECRET_NAME>ksm folder list
ksm folder get -u <FOLDER_UID>ksm execksm interpolate---ksm secret get -- -AbCdEfGhenv:
KSM_CONFIG: ${{ secrets.KSM_CONFIG }}
steps:
- run: pip install keeper-secrets-manager-cli
- run: |
DB_PASSWORD="keeper://<UID>/field/password" \
ksm exec -- ./deploy.sh# Pass base64 config as env var
kubectl create secret generic ksm-config \
--from-literal=config=<BASE64_CONFIG>
# In pod spec, mount KSM_CONFIG and use ksm exec as entrypoint# One-time setup
pip install keeper-secrets-manager-cli[keyring]
# Prerequisite: export KSM_CLI_TOKEN, then:
ksm profile init
# Daily use - run your app with secrets injected
DB_URL="keeper://<UID>/field/url" \
API_KEY="keeper://<UID>/field/password" \
ksm exec -- npm run dev