Profile Command

Setup and initialization of the Keeper Secrets Manager device profile

profile command

Description: Initialize and switch between device profiles. In order to support multiple environments on the same device, you can also switch between Secrets Manager device profiles.
Sub-command and options to run
format: ksm profile <sub-command>
Initialize a new client device profile
List profiles that have been created, and note active profile
Export a configuration profile
Create a new configuration from an exported encrypted profile
Sets the active configuration profile


Initialize a client device profile.
ksm profile init
The keeper.ini file will be created in your current working directory. For the Windows or macOS binary applications, the keeper.ini will be created in the users home directory (ie ${HOME} or $env:USERPROFILE environment variables). The keeper.ini can be moved to the following locations:
  • The path defined by the environmental variable KSM_INI_DIR
  • The current directory
  • The user's home directory
    • ${HOME}
    • ${HOME}/.config/ksm
    • $env:USERPROFILE
  • Various system directories
    • /etc
    • /etc/ksm
    • /etc/keeper
    • $env:APPDATA/Keeper
    • $env:ProgamData/Keeper
    • $env:ProgramFiles/Keeper
optional parameters:
  • -t, --token <token> one time access token
  • -h, --hostname <XX> destination region
    Defaults to US region. Customers hosted in other regions must set this value:
    • USUnited States)
    • EU(Europe)
    • AU(Australia)
    • US_GOV(GovCloud)
  • --ini-file <FILENAME> save the new profile to this file
  • -p, --profile-name <NAME> set profile name If not provided, the profile will be set as "default"
$ ksm profile init --token XX:XXXXXXXX
Added profile _default to INI config file keeper.ini
As noted in the Quick Start Guide, you first get the token XXX from the Commander CLI:
My Vault> secrets-manager client add --app MyApplicationName


List all available profiles for the current Client Device.
ksm profile list
$ ksm profile list
Active Profile
======== ===============
* Test Server 1
Test Server 2
Local Dev


Export the current profile into a base64-encoded string.
ksm profile export [--plain] [--file-format] [PROFILE NAME]
optional parameters:
  • --plain Export profile without base64-encoding the string.
  • --file-format Export a profile to a specific file format. Available formats are:
    • ini - To be used by another instance of the CLI.
    • json - Can be used by the CLI and other Developer SDKs.
$ ksm profile export my_profile


Import a client device profile from an encrypted base64-encoded string.
ksm profile import [--output-file "INI filename"] <BASE64 CONFIG>
optional parameters:
  • --output-file <INI filename> Where to create the INI configuration file. If not set, will be create in current directory.
$ ksm profile import --output-file=my_profile BASE64_ENC_CONFIG


Set the currently active profile for this client device.
ksm profile active <PROFILE NAME>
$ ksm profile active production
production is now the active profile.

Profiles within Containers

If you are running the CLI inside of a containerized environment, you might not have the ability to initialize a profile. If no INI config file is found and the environmental variable KSM_TOKEN is found, a default profile will be auto-generated. A INI config file will be created and stored in the current working directory. That can be overridden with the environmental variable KSM_INI_DIR.

Default INI Filename

The default name of the ini file is keeper.ini, however this can overridden by using the KSM_INI_FILE environmental variable. By using KSM_INI_DIR and KSM_INI_FILE environmental variables you can completely change the location and name of the INI configuration file.